aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-28commandqueue: Removed redundant mutex locking in Event::addDependentEvent()llvm_3_6Gil Pitney
The commandqueue sanity test (tests/test_commandqueue.cpp) was failing. This was due to a lock being taken twice in a row from the same thread, with a mutex type of PTHREAD_MUTEX_DEFAULT, where re-locking produces undefined behaviour. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-28LLVM 3.6: Change sense of test on return result of Linker::LinkModules()Gil Pitney
Previous test was wrong. - if (!stdlib || !Result) { + if (!stdlib || Result) { Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-28LLVM 3.6: Update handling of reqd_work_group_size kernel attributeGil Pitney
Previous casting to attempt to get the name of the node was erroneous, and led to seg fault. This has been fixed. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-28LLVM 3.6: Set ThreadModel to posixGil Pitney
Without explicitly setting the ThreadModel, clang asserts. This is new behaviour with LLVM 3.6. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-27LLVM 3.6: More updates due to change in MetaData for kernel.cppGil Pitney
Based on patch thanks to Author: Tom Gall <tom.gall@linaro.org> Date: Mon Jan 26 12:54:14 2015 -0600 add added updates based on comments in http://llvm.org/docs/doxygen/html/classllvm_1_1ConstantInt.html Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-26LLVM 3.6: Silence the tautological-undefined-compare warning.Gil Pitney
Clang and GCC are now complaining about (this == 0) comparisons. Rather than remove the comparison, keeping it for safety, and just silencing the warning for this file (src/core/object.cpp) only. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-26LLVM 3.6: Enable __builtin_shufflevector only for x86Gil Pitney
This macro seems to require MMX extension. This can be revisited later for ARM once Image support added. The macro will stil work for ARM, but will call the C implementation rather than the clang builtin. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-26LLVM 3.6: Update llvm::EngineBuilder call to account for unique_ptr argsGil Pitney
Also, removed call to .setUseMCJIT() method (removed in LLVM 3.6). Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-24LLVM 3.6: more handling of std::unique_ptrGil Pitney
Passing a raw pointer to addRemappedFile(). Act->takeModule() returns a unique_ptr, so we need the raw pointer, taking it back by release() method. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-24LLVM 3.6: Updates due to new LLVM MetaData typesGil Pitney
Needed to cast to get llvm::Value from node->getOperand(). Changes to deal with use of std::unique_ptr, and API change taking MemoryBufferRef instead of MemoryBuffer. Change in Linker::LinkModules which now takes a DiagnosticHandler instead of a string. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-24LLVM 3.6: Make addDependentEvent() constGil Pitney
More updates due to C++11, used by LLVM. Made addDependentEvent() const function. As a result, cast away const on some pthread library function calls and other calls in that const member function. Also, made p_dependent_events mutable, since std library functions were working on it. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2015-01-22LLVM 3.6: Update CMake files to build for LLVM 3.6 and newer CMAKEGil Pitney
Upated to look for LLVM 3.6 llvm-config. Also made a few syntax fixes for newer CMAKE version > 2.8. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-16v0.9: Shamrock README and TODO listsshamrock_v0.9Khronos_conformanceGil Pitney
and updated CREDITS Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-15Remove test test_basic_parameter_types from sanity testsGil Pitney
This test was added as an aid to debug a particular Khronos test, which is now fixed, so is being removed. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-15cpu.h: Allow printf() to be called from kernels for debugging.Gil Pitney
Fix prototype so printf() can be called from kernels. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-15Merge remote-tracking branch 'showliu/Khronos_conformance' into ↵Gil Pitney
Khronos_conformance Merge in fix to sanity test: test kernel.
2014-12-11fixed the tests kernel fail problemShow Liu
2014-12-10prefetch: Implemented prefetch builtin (noop'ed)Gil Pitney
Also, updated CL_DEVICE_LOCAL_MEM_SIZE and Buffer::Buffer() constructor so that Khrnos basic "prefetch" test can pass. Previously, it was trying to allocate huge global buffers (computed based on the LOCAL_MEM_SIZE) and was failing. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-09Fixed the incomplete kernellist when resurrect kernel from released kernel list.Show Liu
2014-12-09Fixed the kernel will been push into kernellist twice issue when create a ↵Show Liu
new kernel. The new kernel push back into kernellist at createKernel() function already.
2014-12-08Adjust CL_DEVICE_MAX_WORK_GROUP_SIZE and CL_DEVICE_MAX_WORK_ITEM_SIZES values.Gil Pitney
Some Khronos basic tests were crashing with huge work group sizes. This patch adjusts values down so that Khronos basic tests local_arg_def and local_kernel_def can now pass. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-08Ensure kernel arguments to local address space allocated on 128 byte boundaryGil Pitney
Buffers in local space, passed as kernel parameters, are allocated at runtime by shamrock. This patch ensures such allocated memory is aligned for maximum OpenCL data type alignment (double16). Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-08Added -ffake-address-space-map option to generate LLVM IR address spacesGil Pitney
Previously, shamrock was not able to get address space attributes from LLVM's getAddressSpace() API for function (kernel) arguments, as they didn't exist in the generated LLVM IR. Now, we use a clang option to force address space mapping, causing addrspace(<n>) attrs to be inserted. See the discussion here: https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg76370.html This was a necessary step to get many of the Khronos basic tests involving local variables and parameters to not crash. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-12-08builtins: Fixed nextafter builtin; updated INFINITY definition.Gil Pitney
Redefined nextafter to use __builtin_nextafterf(), and INFINITY to use __builtin_inff(). This enables the Khronos basic test kernel_limit_constants to pass. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-11-21test: parameter types: updated to test for int4 to float4 conversion.basic_parameter_typesGil Pitney
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-11-21Fixed kernel stub argument marshalling code to ensure proper alignmentGil Pitney
Previously, shamrock was generating load instructions in the kernel stub with a strict type alignment, which was not being followed by the argument marshalling code. This resulted in a NEON vld1 instruction failing in the kernel stub, and trashing a base register which was not 16 byte aligned. Now the marshalling code calculates the proper alignement for each argument, and is based on a buffer aligned to double16 to begin with. With this patch, all the vector sub-tests of the Khronos basic_parameter_types test now pass. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-11-19clCreateBuffer(): Ensure allocation meets minimum alignment for double16 typeGil Pitney
Previously, clCreateBuffer() was using malloc to allocate buffers, which caused havoc with NEON instructions expecting 128 bit alignment for float4 vectors. Now, use posix_memallign() to ensure alignment meets requirements of largest OpenCL data type (double16). Also, update clGetDeviceInfo()'s CL_DEVICE_MEM_BASE_ADDR_ALIGN and CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE accordingly. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-11-17Remove redundant getPointerToFunction() call.Gil Pitney
JIT's getPointerToFunction() call was redundant and deprecated by getFunctionAddress(). Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-11-13Test: Added unit test to help debug Khronos basic_parameter_types vector testGil Pitney
See tests/basic_parameter_types.txt for usage. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2014-10-28Initial Commit: Based on TI OpenCL v0.8, originally based on clover.shamrock_v0.8Gil Pitney
This is a continuation of the clover OpenCL project: http://people.freedesktop.org/~steckdenis/clover based on the contributions from Texas Instruments for Keystone II DSP device: git.ti.com/opencl and adding contributions from Linaro for ARM CPU-only support. See README.txt for more info, and build instructions. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>