khronosgroup / webcl-conformance Goto Github PK
View Code? Open in Web Editor NEWWebCL conformance tests
WebCL conformance tests
[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...
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.
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.
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,
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.
When i run the test a red background is displayed as seen in image one. Likewise, if 'view more' is selected there is a test that failed, as seen in image two. However, image three shows the test passed everything.
This information is misleading and one could think it passed, when it actually didnt.
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.
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.
it returns a WebCLPlatform, but the function names is in plural. It might imply something different.
I suggest, it gets renamed to "getPlatform".
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
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".
shouldBeTrue("createContext(null, null, webcl.DEVICE_TYPE_ACCELERATOR)");
But my box does not have a "accelerator" cl device, so expectations should be relaxed.
A number of test cases are currently failing on systems that have either a CPU or a GPU device, but not both.
It must be possible for a CPU-only or GPU-only system to pass the conformance suite.
In my Mac, there is no ACCELERATOR cl device. Test then throws an exception DEVICE_NOT_FOUND, which should be fine.
Test expectation should be relaxed to accommodate so.
when pressed, it shows all tests' ouput on the up right corner frame.
// 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.
options:
it will make identifying, debugging and fixing the failures easier.
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.
If one picks up a device different than GPU, and run functionalityTesting/basics/createContext.html, it will fail.
Reason:
it is not useful.
Maybe we should show all logs here? Maybe all failures? Maybe all successes?
Please advice.
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.
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:
failed: webCLMemoryObject.getInfo(webcl.MEM_FLAGS) should be 4. Was 36.
If the implementation zeros-out the buffer/image data, it has to set COPY_HOST_PTR flag. So getInfo(webcl.MEM_FLAGS) will be
originalFlag |= COPY_HOST_PTR
This is a placeholder, details will come.
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.
Line 45 - 45 shouldBeTrue("webCLCommandQueue.enqueueWaitForEvents(webCLEvent);");
It should not be "true", but instead throw an INVALID_EVENT_WAIT_LIST exception
Line 54 - shouldThrowExceptionName("webCLCommandQueue.enqueueWaitForEvents();", "INVALID_EVENT_WAIT_LIST");
In WebKit it throws a "TypeError", given that the parameter is mandatory.
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.
[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).
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
[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.
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?
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.
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]);");
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.
TypedArray usage have to tighten. For example, with the patch [1], WebKit/WebCL is able to pass some of the tests.
Basically, a "int* kernel" parameter has to be written into a Int32Array array, instead of Float32Array.
More modifications might be needed.
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
.
We should have the conformance tests hosted online, and the easiest way to do that is via GitHub itself.
The repository admin just needs to toggle a switch in the repo settings, and the test suite will be automatically mirrored at https://khronosgroup.github.io/WebCL-conformance.
Who's the repository admin, anyway?
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");
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.
[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.
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..
@@ -52,7 +52,7 @@ var getProgram = function (webCLContext, kernelSource) {
return null;
else {
for (i = 0; i < associatedDevices.length; i++) {
if (typeof(associatedDevices[i]) != WebCLDevice)
typeof returns "object" which I think it is fine. Maybe the check should be improved: instanceof, shouldBeType, etc?
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.
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.
Hello,
Trying to run the recent upload and the computeinfo subdirectory is missing,
Please fix the scripts,
I'm getting the following failure on the device getInfo tests:
4 : FAIL typeof webCLDevice.getInfo(webcl.DEVICE_VENDOR_ID) should be string. Was number.
However, the WebCL spec, section 3.3, says that the return type is a CLuint.
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,
OpenCL1.1/WebCL 1.0 says: "throw PROFILING_INFO_NOT_AVAILABLE -- if this WebCLEvent is a user event object".
wtu.enqueueNDRangeKernel(webCLCommandQueue, webCLKernel, globalWorkSize.length, [], globalWorkSize, localWorkSize);
For that, wtu.enqueueNDRangeKernel should also take extra two parameters, for eventList and event.
"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".
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.
failed: webcl.waitForEvents([webCLUserEvent]); should be undefined. Threw exception INVALID_EVENT_WAIT_LIST
failed: webcl.waitForEvents([webCLUserEvent], callback); should be undefined. Threw exception INVALID_EVENT_WAIT_LIST
failed: undefined
failed: successfullyParsed should be true. Threw exception ReferenceError
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.