aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2016-06-29 22:09:06 +0000
committerGil Pitney <gil.pitney@linaro.org>2016-06-29 22:50:59 +0000
commitbad91d101e6587afec3d06d8b7e182ba3c136bb7 (patch)
tree6c0c08ca80b980725a1c2e0676d6bf02ec0a986f
parent3f53cee30e45b7225b895f9c79c90a6722e2196a (diff)
downloadshamrock-bad91d101e6587afec3d06d8b7e182ba3c136bb7.tar.gz
Fixed erroneous determination of number of kernels associated with a program
Previously, CL_INVALID_OPERATION was being returned when trying to compile a binary loaded program. This is fixed, enabling now all 72 of the v1.2 Khronos API conformance tests to pass. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r--src/core/program.cpp2
-rw-r--r--tests/api_test_failures.lst36
2 files changed, 1 insertions, 37 deletions
diff --git a/src/core/program.cpp b/src/core/program.cpp
index 9e2703e..1b981da 100644
--- a/src/core/program.cpp
+++ b/src/core/program.cpp
@@ -603,7 +603,7 @@ cl_int Program::compile(const char *options,
// Note this causes some Khronos tests to fail, like test_compiler options_build_macro,
// options_build_macro_existence, and options_include_directory, and
// test_api binary_create, as they all violate the spec in this regard.
- if (getNumKernels() > 0) {
+ if (kernelList.size() > 0) {
p_state = Failed;
return(CL_INVALID_OPERATION);
}
diff --git a/tests/api_test_failures.lst b/tests/api_test_failures.lst
deleted file mode 100644
index f4c52f5..0000000
--- a/tests/api_test_failures.lst
+++ /dev/null
@@ -1,36 +0,0 @@
-Khronos API Test Failures
-===========================
-Khronos Test Version: OpenCL 1.2
-
-Usage:
-% cd opencl_conformance/test_conformance/api
-% test_api <test-name>
-
-
-<test-name>:
-Failure Mode:
-Analysis:
-
-binary_create
-=============
-Failure Mode:
-------------
-ERROR: Unable to build binary program! (CL_INVALID_OPERATION from /home/gpitney/opencl_1_2_conformance/test_conformance/api/test_binary.cpp:113)
-
-
-Analysis:
----------
-This is expected. It is my claim that this test is violating the spec, by
-attempting to build a proram with kernels already attached to the program.
-
-See this comment in src/core/program.cpp:
-// Per the v1.2 spec for clBuildProgram() and clCompileProgram():
-// "Returns: CL_INVALID_OPERATION if there are kernel objects attached to program."
-// Note this causes some Khronos tests to fail, like
-// test_compiler options_build_macro options_build_macro_existence options_include_directory, and
-// test_api binary_create, as they all violate the spec in this regard.
- if (getNumKernels() > 0) {
- p_state = Failed;
- return(CL_INVALID_OPERATION);
- }
-