Git Product home page Git Product logo

webcl-conformance's People

Contributors

alldne avatar goberle avatar junmin-zhu avatar mikeseven avatar rohitkumar9 avatar sharathkamathk avatar shilpashri avatar sibasamal avatar sibasamal05 avatar steveneliuk avatar toaarnio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webcl-conformance's Issues

Review::master_r10162013::WebCLCommandQueue::enqueueCopyImageToBuffer(...)

[0]The same issue described in #2 are also present here, mainly that of the incorrect assumptions of the memory types (MEM_READ_ONLY, MEM_READ_WRITE, MEM_WRITE_ONLY).

[1] missing tests for MEM_OBJECT_ALLOCATION_FAILURE, INVALID_CONTEXT, INVALID_IMAGE_SIZE

[2] please be mindful that dst_offset is is weight_height_bytes per image element, not pixels. Only source origin and region or defined in pixels,

[3] obviously event testing,

[4-functionality] should provide functional testing where dst_offset is used, please be mindful of what was statet in [2].

[4-functionality] should provide testing that uses different src_origin and regions...

Conformance tests should be deterministic

Some tests fuzz by using Math.random(). It's great to have fuzz tests, but they should be separate from the actual conformance tests. We should use fuzz tests to advise in the creation of conformance tests, though.

getDevices(): DEVICE_NOT_FOUND should be an accepted result

According to the spec, getDevices(deviceType) must throw DEVICE_NOT_FOUND if a device of the given deviceType is not available on the platform. However, the conformance tests are expecting to get an array of WebCLDevices:

FAIL webCLPlatform.getDevices(webcl.DEVICE_TYPE_GPU); threw exception [WebCLPlatform.getDevices] DEVICE_NOT_FOUND
FAIL webCLPlatform.getDevices(webcl.DEVICE_TYPE_ACCELERATOR); threw exception [WebCLPlatform.getDevices] DEVICE_NOT_FOUND

These tests should PASS, not FAIL.

This occurs in conformance/bindingTesting/globalObject/cl_platform_getDevices.html.

Please include Changelog for master_r10162013

The recently pushed branch (master_r10162013) looks a lot better than the previous iteration. We all appreciate the amount of work involved,

A couple small comments seen below:
-please detail the differences between master_r10162013 and master branches,
-If there are major architectural changes then please include a new diagram that details layout.

Normative practice is to include a changelog and/or release notes,

This will make it easier for reviewers to target the specific changes for review,

Thank you,

Review::master_r11302013: buffimgs/*{HTML, ImageData}*

HTML interoperability functions were recently moved from the core spec into two separate extensions (WEBCL_html_image and WEBCL_html_video).

All conformance test cases that involve HTML elements should be similarly separated from core test cases.

Review::master_r11302013: buffimgs/*

When testing the variants of createImage and createBuffer that take in a hostPtr or an HTML element, it's currently left unchecked whether the newly created image or buffer is actually filled with the given data.

As it stands, a dummy implementation that simply ignores hostPtr will pass the test suite.

There should be additional test cases that do an enqueueRead from the newly created buffer/image and then check whether the elements are the same that were passed in.

Review::master_r11302013: basicoperations/cl_context_createCommandQueue.html

API takes single optional webcldevice as argument, not an array.

...
var webCLDevices = wtu.getDevices(webCLPlatforms);
...

shouldBeType("webCLContext.createCommandQueue(webCLDevices);", "WebCLCommandQueue");
shouldBeType("webCLContext.createCommandQueue(webCLDevices, webcl.QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);", "WebCLCommandQueue");
shouldBeType("webCLContext.createCommandQueue(webCLDevices, webcl.QUEUE_PROFILING_ENABLE);", "WebCLCommandQueue");
shouldBeType("webCLContext.createCommandQueue(null, webcl.QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);", "WebCLCommandQueue");
shouldBeType("webCLContext.createCommandQueue(null, webcl.QUEUE_PROFILING_ENABLE);", "WebCLCommandQueue");

...

API says createCommandQueue takes a WebCLDevice not a JSArray of WebCLDevice's.

Tests should be updated.

CONFORMANCE MASTER_R10162013 [22 - 34]

CONFORMANCE MASTER_R10162013 [22 - 34]

22 - WebCLCommandQueue.enqueueWriteImage (WebCLImage image, CLboolean blockingWrite, sequence origin, sequence region, CLuint hostRowPitch, ArrayBufferView hostPtr, optional sequence? eventWaitList, optional WebCLEvent? event)

All the of INVALID_VALUE exception are tested with only webcl.MEM_READ_WRITE, could be interesting to check for all the MEM flags.

The check of originInvalid, regionInvalid and hostRowPitchInvalid, could be more hard about the parameter like use negative value and null value;

Missing test case (Already have FIXME about that) :
-> INVALID_IMAGE_SIZE
-> INVALID_EVENT_WAIT_LIST
-> EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST

The functionality, it's good, may be not enough verbose between each call of enqueueWrite / enqueueCopy / enqueueRead.

23 - WebCLCommandQueue.enqueueWriteImage(args…, ImageData srcPixels)

Same comment than [22] WebCLCommandQueue.enqueueWriteImage
Missing test case about event and image, and don’t have FIXME about that inside the html

-> INVALID_IMAGE_SIZE
-> INVALID_EVENT_WAIT_LIST
-> EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST

24 - WebCLCommandQueue.enqueueWriteImage(args…, HTMLCanvasElement)

Same comment than [22] WebCLCommandQueue.enqueueWriteImage

Missing test case (Already have FIXME about that) :
-> INVALID_VALUE invalid canvas

25 - WebCLCommandQueue.enqueueWriteImage(args…, HTMLImageElement srcImage)

Same comment than [22] WebCLCommandQueue.enqueueWriteImage

Missing test case (Already have FIXME about that) :
-> INVALID_HOST_PTR invalid image

26 - WebCLCommandQueue.enqueueWriteImage(args…, HTMLVideoElement srcVideo)

The flags must be only MEM_READ_ONLY, The test for exception with other flags is missing

Error line 66 and 70 webCLImageReadWrite is not defined must be webCLImageRead

Missing test case (Already have FIXME about that) :
-> INVALID_HOST_PTR invalid video

27 - WebCLCommandQueue.enqueueNDRangeKernel (WebCLKernel kernel, CLuint workDim, sequence globalWorkOffset, sequence globalWorkSize, sequence localWorkSize, optional sequence eventWaitList = null, optional WebCLEvent event = null)

OK

Missing test case (Already have FIXME about that) :
-> INVALID_CONTEXT when the context of all the event are not the same
-> INVALID_EVENT_WAIT_LIST if an event is Invalid
-> MEM_OBJECT_ALLOCATION_FAILURE
-> INVALID_IMAGE_SIZE

28 - WebCLCommandQueue.enqueueMarker(webCLEvent)

29 - WebCLCommandQueue.enqueueBarrier()

30 - WebCLCommandQueue.enqueueWaitForEvents (sequence eventWaitList)

31 - WebCLCommandQueue.finish()

32 - WebCLCommandQueue.flush()

33 - WebCLCommandQueue.release()

34 - WebCLCommandQueue.getInfo(CLEnum name)

OK

Review::master_r12132013: functionalityTesting/basics/createContext.html

  1. typos in return statements:
        if (typeof(type) != 'undefined' && type != null) {
            // ALL and default cannot be checked for. They are just alias to other types.
            if (type == webcl.DEVICE_TYPE_ALL || type == webcl.DEVICE_TYPE_DEFAULT)
                return true;

            if (contextProperty.deviceType != type)
                return "CONTEXT_PROPERTIES::type != type of WebCLContext::devices.";

            for (i = 0; i < contextDevices.length; i++)
                if (contextDevices[i].getInfo(webcl.DEVICE_TYPE) != type)
                    return "CONTEXT_PROPERTIES::devices.type != type of WebCLContext::devices.";
        }

it should really return "devicetype" stuff not, "devices".

  1. test fails on WebKit/WebCL on

shouldBeTrue("createContext(null, null, webcl.DEVICE_TYPE_ACCELERATOR)");

But my box does not have a "accelerator" cl device, so expectations should be relaxed.

  1. it returns sometimes booleans, sometimes strings. it is rather confuse.

Review::master_r12132013: bindingTesting/programAndKernel/cl_program_build.html

// Testing for exception "INVALID_OPERATION".
kernelSource = wtu.readKernel("../../../resources/kernels/nbody_simulation.cl");
webCLProgram = wtu.createProgram(webCLContext, kernelSource);
wtu.build(webCLProgram, webCLDevice, null, callback);
shouldThrowExceptionName("webCLProgram.build(webCLDevice);", "INVALID_OPERATION");

exception should only be thrown by the last line if the previous "build" call was not finished.

in my debug though, it shows that the "callback" executes before the exception line executes, so the call passes normally without exception.

Maybe a very large program source, that actually takes time to compile could be what we need, but it is not guarantee anyways.

Well, test should be fixed, regardless.

Review: conformance/bindingTesting/fetchInfo/cl_event_getinfo.html

42 var webCLContext = wtu.createContext();
43 var webCLEvent = wtu.createEvent(webCLContext);
44 var webCLCommandQueue = wtu.createCommandQueue(webCLContext);
45
46 shouldBeNull("webCLEvent.getInfo(webcl.EVENT_CONTEXT)");
47 shouldBeNull("webCLEvent.getInfo(webcl.EVENT_COMMAND_QUEUE)");
48 shouldBeNonNull("webCLEvent.getInfo(webcl.EVENT_COMMAND_EXECUTION_STATUS)");
49 shouldBeNonNull("webCLEvent.getInfo(webcl.EVENT_COMMAND_TYPE)");

this ^ is not correct: createEvent returns a WebCLUserEvent, which does have a valid context to begin with.

It it was a WebCLEvent instance, it would only have a valid underlying cl_event object after being initialized by the associated 'queue' method.

I suggest changing the return of wtu.createEvent to be a WebCLEvent, and introduce a wtu.createUserEvent to use where it is appropriated.

Master: functionalityTesting/basics/createContext.html problem

If one picks up a device different than GPU, and run functionalityTesting/basics/createContext.html, it will fail.

Reason:

  • say one chooses CPU&GPU.
  • when line 95 get executed, it calls createContext without parameters .
    shouldBeType("createContext()", "WebCLContext");
  • in cl_utils, if no parameter is passed, but global has say CPU, the it will be used to create the context.
  • when one tries to compare CPU == default device, it fails (line 51)
    51 if (param1 == undefined) {
    52 var defaultDevice = wtu.getDevices(webCLPlatform, webcl.DEVICE_TYPE_DEFAULT)[0];
    53 if (contextDevices[0].getInfo(webcl.DEVICE_TYPE) !== defaultDevice.getInfo(webcl.DEVICE_TYPE)) {
    54 console.log("Failed in validating the number of devices, when no argument is passed.");
    55 return null;

Test framework/runner not working on Firefox

When running test cases using the test runner (webcl-conformance-tests.html), nearly all of them fail when trying to create a command queue. For example, here's the output from cl_commandqueue_getinfo.html:

webCLCommandQueue :: getInfo() test case.
1 : FAIL WebCLContext :: createCommandQueue threw exception : INVALID_VALUE

However, when loading cl_commandqueue_getinfo.html into a separate browser tab, it works fine. The same goes for pretty much all test cases.

This may have something to do with the way the test runner is caching WebCL resources in window.top.CLGlobalVariables. The fact that WebCL resources are created using eval statements may also related.

Review::master_r11302013: basicoperations/cl_kernel_setArg.html

var webCLSampler = wtu.createSampler(webCLContext, true, webcl.ADDRESS_MIRRORED_REPEAT, webcl.FILTER_NEAREST);
shouldBeUndefined("webCLSquareKernel.setArg(0, webCLSampler);");

var webCLBuffer = wtu.createBuffer(webCLContext, webcl.MEM_READ_WRITE, DATA_SIZE);
shouldBeUndefined("webCLSquareKernel.setArg(0, webCLBuffer);");

var webCLImageDescriptorObject  = wtu.getSupportedImageFormats(webCLContext, webcl.MEM_READ_ONLY, "100", "100");
var webCLImage = wtu.createImage(webCLContext, webcl.MEM_READ_ONLY, webCLImageDescriptorObject);
shouldBeUndefined("webCLSquareKernel.setArg(0, webCLImage);");

first and third setArg calls throw exceptions: the kernel expects a memory, and not a sample or image. The second call passes, as expected.

OpenCL spec says:

  • sample: "If the argument is of type sampler_t , the arg_value entry must be a pointer to the sampler object."
  • image: "The memory object specified as argument value must be a 2D image object if the argument is declared to be of type image2d_t."

functionalityTesting/buildingAndRunning/setArg_Vector{4,8,16}.html have syntax errors

failed: WebCLKernel setArg() vector8 type throws exception: Can't find variable: y
failed: WebCLKernel setArg() vector8 type throws exception: Can't find variable: y
failed: WebCLKernel setArg() vector8 type throws exception: Can't find variable: y
failed: WebCLKernel setArg() vector8 type throws exception: Can't find variable: y

they are is also very hard to understand.

Review::master_r12132013: bindingTesting/eventsAndCallbacks/cl_webcl_waitForEvents.html

47 var wtu = WebCLTestUtils;
48 var webCLContext = wtu.createContext();
...
50 var webCLEvent = wtu.createEvent(webCLContext);
51 var webCLEvent1 = wtu.createEvent(webCLContext);
...
53
54 shouldBeUndefined("webcl.waitForEvents([webCLEvent, webCLEvent1]);");

both webCLEvent and webCLEvent1 are not associated to any command queue command, so they will never return.

the best an implementation can do is throw an invalid_event exception. Otherwise, the waitForEvents call will wait for every, hanging the tab (and in the case on WebKit, any further OpenCL calls on any tab)

55 shouldBeUndefined("webcl.waitForEvents([webCLEvent, webCLEvent1], callback);");

this should also throw any exception as far as I can tell.

Review::master_r10162013::WebCLCommandQueue::enqueueCopyBufferToImage(...)

[0]The same issue described in #2 are also present here, mainly that of the incorrect assumptions of the memory types (MEM_READ_ONLY, MEM_READ_WRITE, MEM_WRITE_ONLY).

[1] missing tests for INVALID_IMAGE_SIZE, MEM_OBJECT_ALLOCATION_FAILURE, INVALID_EVENT_WAIT_LIST, INVALID_CONTEXT

[2] region is in bytes... given this a region size of [10, 10] seems strange, and functional testing with region = new Int32Array([2, 5]); also seems strange.

[3-functional] * the functional testing is much more complete for this test case and should be used as an example for all other enqueueCopy* functional tests. Only complaint is the choice of byte sizes for the region. They really do not make much sense considering the width, height, and type (int32array).

Some tests throw exceptions:

conformance/bindingTesting/programAndKernel/cl_program_build.html throws:

TypeError: 'undefined' is not an object (evaluating 'event.status')

conformance/bindingTesting/programAndKernel/cl_kernel_getArgInfo.html and
onformance/bindingTesting/queues/cl_commandQueue_enqueueCopyBuffer.html both throw:

TypeError: 'undefined' is not an object (evaluating 'text.replace')

conformance/bindingTesting/queues/cl_commandQueue_enqueueNDRangeKernel.html throws:

GET file:///Users/a1.gomes/Devel/Samsung/webkit-webcl-conformance/conformance/resources/kernels/square.cl The requested URL was not found on this server.

conformance/bindingTesting/globalObject/cl_webcl_getSupportedExtensions.html throws:

unknown test:conformance/bindingTesting/globalObject/cl_webcl_getSupportedExtensions.html webcl-test-harness.js:537
getTest webcl-test-harness.js:537
notifyFinished webcl-test-harness.js:561
notifyFinishedToHarness

Review::master_r10162013::WebCLCommandQueue::enqueueCopyImage(...)

[0]The same issue described in #2 are also present here, mainly that of the incorrect assumptions of the memory types (MEM_READ_ONLY, MEM_READ_WRITE, MEM_WRITE_ONLY).

[1] missing tests for IMAGE_FORMAT_MISMATCH, INVALID_IMAGE_SIZE, INVALID_EVENT_WAIT_LIST

[2-functionality] for the functionality testing it is difficult to isolate what webcl call failed. WebCL uses exception specifically for this reason, using this functionality to isolate where the issue resides is extremely important and should be used throughout the functionality testing. Basically, check for an exception.

[3-functionality] in the log it should detail the the origin, region, etc.

Review::master_r10162013::WebCLCommandQueue.enqueueCopyBuffer(...)

WebCLCommandQueue.enqueueCopyBuffer()
Comments:
-missing checks for MISALIGNED_SUB_BUFFER_OFFSET, MEM_OBJECT_ALLOCATION_FAILURE,
-should likely test more invalid {src,dst}Offsets, such as negative numbers.
-XXX this is very important, and mentioned previously, the memory_flags {MEM_READ_WRITE, MEM_READ_ONLY, MEM_WRITE_ONLY, ETC} are only kernel side constraints and not host API constraints. ie writing to a buffer that was created with the MEM_READ_ONLY flag is only erroneous when writing to that buffer in a kernel. More explicitly, these tests should all be valid, assuming the {src,dst}Offsets & numBytes are valid:

// Testing with destination buffer as MEM_READ_ONLY memory object.
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferRead, dstBufferRead, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferWrite, dstBufferRead, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferReadWrite, dstBufferRead, srcOffset, dstOffset, numBytes)");
// Testing with destination buffer as MEM_WRITE_ONLY memory object.
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferRead, dstBufferWrite, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferWrite, dstBufferWrite, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferReadWrite, dstBufferWrite, srcOffset, dstOffset, numBytes)");
// Testing with destination buffer as MEM_READ_WRITE memory object.
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferRead, dstBufferReadWrite, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferWrite, dstBufferReadWrite, srcOffset, dstOffset, numBytes)");
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferReadWrite, dstBufferReadWrite, srcOffset, dstOffset, numBytes)"); 

-XXX there is nothing wrong with using the same buffer as src and destination as long as the offsets, and number of bytes, are valid. ie this looks okay:

var srcOffset2 = BUFFER_SIZE / 2;
var dstOffset2 = 0;
numBytes = 10;
shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferReadWrite, srcBufferReadWrite, srcOffset2, dstOffset2, numBytes)");

-from the previous, 'shouldBeUndefined', what does that actually mean? Im starting to think that means success, but then how could the previous test (
// Using same buffer as source and destination. shouldBeUndefined("webCLCommandQueue.enqueueCopyBuffer(srcBufferReadWrite, srcBufferReadWrite, srcOffset, dstOffset, numBytes)");)
be successful, given they are overlapping because they have the srcOffSet==dstOffset, this seems like it should throw MEM_COPY_OVERLAP. Maybe i missed something?

functionalityTesting/basics/createCommandQueue.html review

39 try {
40 debug("CreateCommandQueue functionality test case.");
41
42 var wtu = WebCLTestUtils;
43 var webCLContext = wtu.createContext(webcl.DEVICE_TYPE_ALL);

43 should throw an exception. TYPE_ALL can not be used to create a context.

bindingTesting/eventsAndCallbacks/cl_webcl_waitForEvents.html review

Spec says:
"INVALID_EVENT_WAIT_LIST -- if a callback is not provided, and any event in eventWaitList is a WebCLUserEvent or a newly created (non-activated) WebCLEvent"

Line 68 should throw.

64 /*
65 * Testcases with webCLUserEvent.
66 */
67 var webCLUserEvent = wtu.createUserEvent(webCLContext);
68 shouldBeUndefined("webcl.waitForEvents([webCLUserEvent]);");

Tests expecting wrong type of return value

A number of tests in the test suite are currently expecting the implementation to return a TypedArray, e.g. Int32Array, where the correct expectation would be a regular JavaScript array. This occurs in testing, for example, webCLDevice.getInfo(webcl.DEVICE_MAX_WORK_ITEM_SIZES).

The specified return type in the WebCL spec is sequence<CLuint>. The representation of WebIDL sequence type in JavaScript is a regular array, not a TypedArray.

Need tests to ensure OpenCL C 1.2 features are not accepted

WebCL implementations must make sure that OpenCL C 1.2 features, such as new built-ins and fp64 datatypes, are explicitly disabled when running on top of an OpenCL 1.2 driver.

We need at least one extra test to check for the 1.2 built-ins, and another to test for fp64 support. The tests need to have kernel code attempting to use the 1.2 features, and a check to see that program.build() fails with BUILD_PROGRAM_FAILURE.

bindingTesting/globalObject/cl_webcl_createContext.html review

getAndValidateDevices will return null on Mac for ACCELERATOR type, and store it in webCLDevicesACCELERATOR (line 95).

then it is passed to createContext (line 105), which does not understand 'null'.

95 var webCLDevicesACCELERATOR = getAndValidateDevices(webCLPlatform, webcl.DEVICE_TYPE_ACCELERATOR);
96 if(webCLDevicesACCELERATOR)
97 shouldBeTypeOrException("webcl.createContext(webCLDevicesACCELERATOR[0]);", "WebCLContext", "DEVICE_NOT_FOUND");
98
99 /*
100 * Creating context on sequence of devices.
101 */
102 debug("\n(sequence devices)");
103 shouldBeTypeOrException("webcl.createContext(webCLDevicesCPU);", "WebCLContext", "DEVICE_NOT_FOUND");
104 shouldBeTypeOrException("webcl.createContext(webCLDevicesGPU);", "WebCLContext", "DEVICE_NOT_FOUND");
105 shouldBeTypeOrException("webcl.createContext(webCLDevicesACCELERATOR);", "WebCLContext", "DEVICE_NOT_FOUND");

Review: bindingTesting/contextAndCreate/cl_context_createImage.html

As far as I can understand, we might be sending the wrong hostPtr's when creating images. We need the following data to get its size of a buffer that represents an image:

-width
-height
-how many channels (via channel order)
-how many bytes per channel (channel data type)

the buffer has to be then
width * height * numberOfChannels * numberOfBytesPerChannel

in cl_context_createImage , width and height are 100, and SIZE is 1024, so the buffer created is smaller than it needs to be.

Please confirm and adjust the tests as needed.

Review::master_r10162013::WebCLCommandQueue::enqueueCopyBufferRect(...)

[0]The same issue described in #2 are also present here, mainly that of the incorrect assumptions of the memory types (MEM_READ_ONLY, MEM_READ_WRITE, MEM_WRITE_ONLY).

[1]eight calls to createBuffer, each of size 78MB (320x240x1024), means that one requires 629MB of memory. This seems a little resource hungry and some mobile devices may not even have that much memory available. Smaller sizes would be suggested or the release() of those objects that are no longer needed.

[1b] var BUFFER_SIZE = 320 * 240 * 1024; should be replaced with var BUFFER_SIZE = rectWidth * rectHeight * 1024;

[1c] why 1024? There is no type of size 1024 bytes... the most would be that of a say a 64 bit float of eight bytes. Maybe something more reasonable would suffice?

[2] just to be complete, when using context2::webclcommandqueuenew object with buffers from context1, one should test say a valid buffer from context2 with an invalid buffer from context1, and the various permutations of those args.

[3] need to test for MISALIGNED_SUB_BUFFER_OFFSET.

[4-functionality] for the functionality testing it is difficult to isolate what webcl call failed. WebCL uses exception specifically for this reason, using this functionality to isolate where the issue resides is extremely important and should be used throughout the functionality testing. Basically, check for an exception.

[5-functionality] in the log it should detail the the origin, offset, region, etc.

[6-functionality] the choice of origin, offset, and region could be better, we are speaking of bytes here.

Review::master_r11302013: setArg/setArg_Vector2.html oddness

Test has the following code:
...
var kernel_arg_types = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Int32Array, Uint32Array, Float32Array];
var kernel_arg_values = [
[ [-10, -11], [10, 11], [-10, -11], [10, 11], [-10, -11], [10, 11], [0, -10, 0, -1], [0, 10, 0, 11], [10.0, 11.0]],
[ [-78, -11], [178, 11], [-178, -11], [178, 11], [-178, -11], [178, 11], [0, -178, 0, -1], [0, 178, 0, 11], [178.78, 11.78]]
];
var VECTOR_SIZE = 2;
...

var i;
for (i = 0; i < kernel_arg_values.length; i++) {
    try {
        var j, kernel_arg_value = kernel_arg_values[i];
        for (j = 0; j < kernel_arg_types.length; j++) {
            var input = eval("new kernel_arg_types[j](kernel_arg_value[j]);");
            if (input.length != VECTOR_SIZE) {
                testFailed(" kernel_arg_types[i] Input value is not of right length!.");
                continue;
            }

"kernel_arg_values" has some vector elements whose length is 4, so "input.length != VECTOR_SIZE" check above will fail, given that VECTOR_SiZE is always 2.

I wonder why it happens..

getInfo(DEVICE_QUEUE_PROPERTIES) test should expect 0, 1, 2, or 3

I'm getting the following failure on the device getInfo tests:

39 : FAIL webCLDevice.getInfo(webcl.DEVICE_QUEUE_PROPERTIES) is neither QUEUE_PROFILING_ENABLE nor QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE nor null.

However, the return type corresponding to DEVICE_QUEUE_PROPERTIES is specified to be a CLenum. Therefore, zero (0) should be a legal and expected return value, whereas null should be considered an error.

Test loader should use relative URLs

The test suite is currently loading the individual tests from absolute URLs, e.g. /conformance/bindingTesting/cl_webcl_getPlatforms.html. Note the forward slash in the beginning. This means that test loading fails if the conformance suite is hosted on, for example, http://khronosgroup.github.io/WebCL-conformance.

The suggested fix is to turn all absolute URLs into relative URLs, e.g. ../../../path/to/testcase/test.html. Note that relative URLs are already used when loading kernel sources, it's just the HTML loading that fails.

master_r12132013 incorrect directory path to resources directory

Take the following,
WebCL-conformance/conformance/bindingTesting/contextAndCreatecl_context_createCommandQueue.html

<script src="../../../../resources/js-test-post-js"></script> should be
<script src="../../../resources/js-test-post-js"></script> 

Please close once fixed and reference commit,

Review::master_r12132013: bindingTesting/fetchInfo/cl_event_getProfilingInfo.html

  1. Test throws an exception because it uses a "CL User Event", returned by wtu.createEvent

OpenCL1.1/WebCL 1.0 says: "throw PROFILING_INFO_NOT_AVAILABLE -- if this WebCLEvent is a user event object".

  1. line 66: should not the "event" be passed as a parameter to enqueueNDRangeKernel?

wtu.enqueueNDRangeKernel(webCLCommandQueue, webCLKernel, globalWorkSize.length, [], globalWorkSize, localWorkSize);

For that, wtu.enqueueNDRangeKernel should also take extra two parameters, for eventList and event.

  1. an exception will continue to be thrown even after 1 and 2 are fixed. That is because the spec says:

"throw PROFILING_INFO_NOT_AVAILABLE -- if the execution status of this WebCLEvent is not COMPLETE"

the way we can force the kernel to run is to call queue.finish manually before querying for the profiling info. If the kernel has ran, then the event execution status will be "COMPLETE".

  1. If we change the event from a WebCLUserEvent to a WebCLEvent, as per the spec the setStatus line will throw an error, given that it is a method of the former only.

Review::master_r12132013: bindingTesting/contextAndCreate/cl_context_createCommandQueue.html

http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf , section 4.2, table 4.3, page 42 says,

"CL_DEVICE_QUEUE_PROPERTIES

Describes the command-queue properties supported by the device.
This is a bit-field that describes one or more of the following values:
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
CL_QUEUE_PROFILING_ENABLE
These properties are described in table 5.1 .
The mandated minimum capability is: CL_QUEUE_PROFILING_ENABLE."

So the following condition should be relaxed as shown below in the test (line 49):

shouldBeType("webCLContext.createCommandQueue(null, webcl.QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);", "WebCLCommandQueue");

should be

shouldBeTypeOrException("webCLContext.createCommandQueue(null, webcl.QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);", "WebCLCommandQueue", "INVALID_QUEUE_PROPERTIES");

Reason: it is not mandatory that a device supports QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE as per OpenCL 1.1 spec quote above.

isStrict Global Var (defined in cl_global.js) should be Depicted in Test Results.

The js-test-pre.js helped class defines the fcn shouldThrowExceptionName(_a, _e) and the fcn does not annotate the results when non-strict mode is selected. This leads to the following,

Specifically, when troubleshooting erroneous results it is very difficult to find the correct test case that is failing when non-strict mode is being used. One suggestion would be adding the expected exception, in addition to the returned exception, plus prefix the fact that the test-mode is non-strict and passes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.