summaryrefslogtreecommitdiff
path: root/utests/setenv.sh.in
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Add OCL20 env for utestPan Xiuli2016-12-301-0/+2
| | | | | | | We need to set env for OpenCL 2.0 in utest. Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
* Add a sanity test in clGetDeviceIDsRebecca N. Palmer2015-05-181-0/+2
| | | | | | | | | | | | | | Run a small __local-using kernel in clGetDeviceIDs; if this returns the wrong result, return CL_DEVICE_NOT_FOUND. As far as I can see, there's no way to tell in advance (except unreliably with a global version check) whether __local-using batches will be accepted...so the easiest solution is probably to just try running one and see what result we get. Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com> Reviewed-by: "Luo, Xionghu" <xionghu.luo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Enable libocl and disable the usage of the old huge header.Junyan He2014-09-041-2/+3
| | | | | | | | | | | | | | | The llvm ir print out is modified. From the OCL_OUTPUT_LLVM_BEFORE_EXTRA_PASS and OCL_OUTPUT_LLVM, we change to OCL_OUTPUT_LLVM_BEFORE_LINK OCL_OUTPUT_LLVM_AFTER_LINK OCL_OUTPUT_LLVM_AFTER_GEN The first one print out the IR before link the bitcode lib. The second one print out the IR result after linking. Then last one print out the IR after gen translating. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
* extract libgbeinterp.so from runtime (libcl.so)Guo Yejun2014-05-301-0/+1
| | | | | | | | | | | | | currently, there are same symbol names in libinterp.a (inside libcl.so) and libgbe.so (compiler), and so have to dlopen libgbe.so with RTLD_DEEPBIND, this flag makes std::cerr inside libgbe crash. extract the interp part from libcl.so as libgbeinterp.so, therefore, first dlopen libgbe.so without RTLD_DEEPBIND, then dlopen libgbeinterp.so with RTLD_DEEPBIND, to fix the std:cerr crash issue. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* separate runtime(libcl.so) and compiler(libgbe.so)Guo Yejun2014-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On embedded/handheld devices, storage and memory are scarce, it is necessary to provide only the OpenCL runtime library with small size, and only the executable binary kernel will be supported on such device. At the beginning of process (before function main), OpenCL runtime (libcl.so) will try to load the compiler (libgbe.so), the system's behavior is the same as before if successfully loaded, otherwise, the runtime assumes no OpenCL compiler in the system, and the device info will be changed as CL_DEVICE_COMPILER_AVAILABLE=false and CL_DEVICE_PROFILE="EMBEDDED_PROFILE", the clBuildProgram returns CL_COMPILER_NOT_AVAILABLE if the program is created with clCreateProgramWithSource, following the OpenCL spec. To simulate the case without OpenCL compiler, just delete the file libgbe.so, or export OCL_NON_COMPILER=1. Some explanation of the binary kernel interpreter (libinterp.a): libinterp.a is used to interpret the binary kernel inside runtime, and the runtime library libcl.so is built against libinterp.a. Since the code to interpret binary kernel is tightly integrated inside the compiler, to avoid code duplicate, a new file gbe_bin_interpreter.cpp is created to include some other .cpp files; to make libinterp.a small (the purpose to make libcl.so small), the macro GBE_COMPILER_AVAILABLE is used to make only the needed code active when build for libinterp.a. V2: code base is changed to call function gbe_set_image_base_index in gbe_bin_generater, while this function is modified in this patch as gbe_set_image_base_index_compiler, fix it accordingly. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com> Tested-by: Zhigang Gong <zhigang.gong@linux.intel.com>
* Refine the method to find pch and pcm files.Zhigang Gong2014-01-161-0/+5
When compile user kernels, we need to find the precompiled header file and the precompiled module file. The previous implementation will find the build directory then find the system directory. This is not elegant when it is packaged to a distro. It doesn't need to search the build directory. So I change the default search path to the system directory only. And for the deveoper, I change the build script to set a proper environment variable and make the gbe bin generator and the utest could find the local pch files and pcm files firstly. The only change is now, after the build process. Before the user run the utests, it need to set up the environment firstly. Just invoke . utest/setenv.sh. Then everything should be the same as previous. This setenv.sh also set the OCL_KERNEL_PATH, so you don't need to set it manually now. This patch also update the document. v2: add the missing setenv.sh. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Tested-by: "Song, Ruiling" <ruiling.song@intel.com>