From 02c1ed5486266361cb3927876647a11a4c4b533d1d80605ad3cc35476869695a Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Sat, 28 Dec 2024 07:50:40 +0000 Subject: [PATCH] - Use _service file to create tarball from git - Enable SPIR-V support - Remove pocl-llvm16.patch - Remove link_against_libclang-cpp_so.patch - Update to version 6.0: - Update to version 5.0: - Update to version 4.0: OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=79 --- .gitattributes | 23 ++ .gitignore | 1 + _service | 21 ++ link_against_libclang-cpp_so.patch | 13 + pocl-3.1.tar.gz | 3 + pocl-6.0.obscpio | 3 + pocl-llvm16.patch | 203 ++++++++++++ pocl-rpmlintrc | 1 + pocl.changes | 481 +++++++++++++++++++++++++++++ pocl.obsinfo | 4 + pocl.spec | 139 +++++++++ 11 files changed, 892 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 link_against_libclang-cpp_so.patch create mode 100644 pocl-3.1.tar.gz create mode 100644 pocl-6.0.obscpio create mode 100644 pocl-llvm16.patch create mode 100644 pocl-rpmlintrc create mode 100644 pocl.changes create mode 100644 pocl.obsinfo create mode 100644 pocl.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..58dd54c --- /dev/null +++ b/_service @@ -0,0 +1,21 @@ + + + + pocl + https://github.com/pocl/pocl.git + git + v6.0 + @PARENT_TAG@ + v(.*) + + + + + yes + + + gz + pocl-*.tar + + + diff --git a/link_against_libclang-cpp_so.patch b/link_against_libclang-cpp_so.patch new file mode 100644 index 0000000..3138559 --- /dev/null +++ b/link_against_libclang-cpp_so.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake +index 2827d64..e186bc1 100644 +--- a/cmake/LLVM.cmake ++++ b/cmake/LLVM.cmake +@@ -239,7 +239,7 @@ string(STRIP "${LLVM_SYSLIBS}" LLVM_SYSLIBS) + #################################################################### + + # llvm-config does not include clang libs +-if((9 LESS LLVM_MAJOR) AND (NOT STATIC_LLVM)) ++if((8 LESS LLVM_MAJOR) AND (NOT STATIC_LLVM)) + # For Clang 10+, link against a single shared library instead of multiple component shared + # libraries. + if("${LLVM_LIBNAMES}" MATCHES "LLVMTCE") diff --git a/pocl-3.1.tar.gz b/pocl-3.1.tar.gz new file mode 100644 index 0000000..235ba49 --- /dev/null +++ b/pocl-3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82314362552e050aff417318dd623b18cf0f1d0f84f92d10a7e3750dd12d3a9a +size 1928607 diff --git a/pocl-6.0.obscpio b/pocl-6.0.obscpio new file mode 100644 index 0000000..fe6325a --- /dev/null +++ b/pocl-6.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b5ccd6b9b1cb241e5e89f9cb8b327cbc98be977afe4ff71151e7ddac1be8914 +size 42336269 diff --git a/pocl-llvm16.patch b/pocl-llvm16.patch new file mode 100644 index 0000000..43245a6 --- /dev/null +++ b/pocl-llvm16.patch @@ -0,0 +1,203 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c8741b6..85de3968 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -520,7 +520,7 @@ if(ENABLE_LLVM) + # of the code, since this macro adds another layer of complexity. + if(LLVM_VERSION VERSION_LESS_EQUAL 14.0) + set(ENABLE_LLVM_OPAQUE_POINTERS OFF CACHE INTERNAL "llvm opaque pointers" FORCE) +- elseif(LLVM_VERSION VERSION_EQUAL 15.0) ++ elseif(LLVM_VERSION VERSION_EQUAL 15.0 OR LLVM_VERSION VERSION_EQUAL 16.0) + option(ENABLE_LLVM_OPAQUE_POINTERS "Handle the change to llvm opaque pointers." ON) + else() + set(ENABLE_LLVM_OPAQUE_POINTERS ON CACHE INTERNAL "llvm opaque pointers" FORCE) +diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake +index 18138f36..00ad2186 100644 +--- a/cmake/LLVM.cmake ++++ b/cmake/LLVM.cmake +@@ -122,8 +122,10 @@ string(REPLACE "${LLVM_PREFIX}" "${LLVM_PREFIX_CMAKE}" LLVM_LIBDIR "${LLVM_LIBDI + run_llvm_config(LLVM_INCLUDEDIR --includedir) + string(REPLACE "${LLVM_PREFIX}" "${LLVM_PREFIX_CMAKE}" LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}") + +-run_llvm_config(LLVM_SRC_ROOT --src-root) +-run_llvm_config(LLVM_OBJ_ROOT --obj-root) ++if(LLVM_VERSION_MAJOR LESS 16) ++ run_llvm_config(LLVM_SRC_ROOT --src-root) ++ run_llvm_config(LLVM_OBJ_ROOT --obj-root) ++endif() + string(REPLACE "${LLVM_PREFIX}" "${LLVM_PREFIX_CMAKE}" LLVM_OBJ_ROOT "${LLVM_OBJ_ROOT}") + run_llvm_config(LLVM_ALL_TARGETS --targets-built) + run_llvm_config(LLVM_HOST_TARGET --host-target) +@@ -772,12 +774,35 @@ endif() + + #################################################################### + +-if(ENABLE_HOST_CPU_DEVICES AND NOT DEFINED ${CL_DISABLE_HALF}) +- set(CL_DISABLE_HALF 0) +- message(STATUS "Checking fp16 support") +- custom_try_compile_clang_silent("__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU}) +- if(RESV) ++# Clang documentation on Language Extensions: ++# __fp16 is supported on every target, as it is purely a storage format ++# _Float16 is currently only supported on the following targets... SPIR, x86 ++# DIsabled for non-x86-64 because of limitations: ++# The _Float16 type requires SSE2 feature and above due to the instruction ++# limitations. When using it on i386 targets, you need to specify -msse2 ++# explicitly. ++# For targets without F16C feature or above, please make sure: ++# Use GCC 12.0 and above if you are using libgcc. ++# If you are using compiler-rt, use the same version with the compiler. ++# Early versions provided FP16 builtins in a different ABI. A workaround is ++# to use a small code snippet to check the ABI if you cannot make sure of it. ++ ++if(ENABLE_HOST_CPU_DEVICES AND NOT DEFINED CL_DISABLE_HALF) ++ # LLVM <15 doesn't support FP16 emulation ++ # LLVM 15 crashes on some code, with the FP16 emulation ++ # CONFORMANCE disables FP16 b/c it's incomplete ++ # enabled on x86-64 only for now ++ if((LLVM_VERSION_MAJOR LESS 16) OR ENABLE_CONFORMANCE OR (NOT X86_64)) ++ message(STATUS "FP16 support disabled") + set(CL_DISABLE_HALF 1) ++ else() ++ set(CL_DISABLE_HALF 0) ++ message(STATUS "Checking fp16 support") ++ custom_try_compile_clang_silent("_Float16 callfp16(_Float16 a) { return a * 1.8f16; };" "_Float16 x=callfp16((_Float16)argc);" ++ RESV ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU}) ++ if(RESV) ++ set(CL_DISABLE_HALF 1) ++ endif() + endif() + endif() + +diff --git a/cmake/bitcode_rules.cmake b/cmake/bitcode_rules.cmake +index 3d1a373f..10a309c2 100644 +--- a/cmake/bitcode_rules.cmake ++++ b/cmake/bitcode_rules.cmake +@@ -167,7 +167,7 @@ function(compile_ll_to_bc FILENAME SUBDIR BCLIST) + list(APPEND ${BCLIST} "${BC_FILE}") + set(${BCLIST} ${${BCLIST}} PARENT_SCOPE) + +- if(LLVM_VERSION VERSION_EQUAL 15.0) ++ if(LLVM_VERSION VERSION_EQUAL 15.0 OR LLVM_VERSION VERSION_EQUAL 16.0) + # both of these are necesssary. some of the files (like barrier.ll) + # don't contain any pointers and thus cannot be guessed; if llvm-as + # produces the wrong opaque-type file, later llvm-link will fail +diff --git a/include/_kernel_c.h b/include/_kernel_c.h +index e1038ea5..73ad9d18 100644 +--- a/include/_kernel_c.h ++++ b/include/_kernel_c.h +@@ -112,7 +112,7 @@ typedef uint uint16 __attribute__((__ext_vector_type__(16))); + /* NOTE: the Clang's __fp16 does not work robustly in C mode, + it might produce invalid code at least with half vectors. + Using the native 'half' type in OpenCL C mode works better. */ +-typedef __fp16 half; ++typedef _Float16 half; + + typedef half half2 __attribute__((__ext_vector_type__(2))); + typedef half half3 __attribute__((__ext_vector_type__(3))); +diff --git a/lib/CL/pocl_llvm_build.cc b/lib/CL/pocl_llvm_build.cc +index 3ef6e0c5..84413a48 100644 +--- a/lib/CL/pocl_llvm_build.cc ++++ b/lib/CL/pocl_llvm_build.cc +@@ -263,7 +263,7 @@ int pocl_llvm_build_program(cl_program program, + + size_t fastmath_flag = user_options.find("-cl-fast-relaxed-math"); + +-#if (CLANG_MAJOR == 15) ++#if (CLANG_MAJOR == 15) || (CLANG_MAJOR == 16) + #ifdef LLVM_OPAQUE_POINTERS + ss << "-opaque-pointers "; + #else +diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc +index 3cc7fcc5..0690af17 100644 +--- a/lib/CL/pocl_llvm_utils.cc ++++ b/lib/CL/pocl_llvm_utils.cc +@@ -273,7 +273,9 @@ void InitializeLLVM() { + initializeAnalysis(Registry); + initializeTransformUtils(Registry); + initializeInstCombine(Registry); ++#ifdef LLVM_OLDER_THAN_16_0 + initializeInstrumentation(Registry); ++#endif + initializeTarget(Registry); + } + +@@ -390,7 +392,7 @@ void pocl_llvm_create_context(cl_context ctx) { + + data->Context = new llvm::LLVMContext(); + assert(data->Context); +-#if (CLANG_MAJOR == 15) ++#if (CLANG_MAJOR == 15) || (CLANG_MAJOR == 16) + #ifdef LLVM_OPAQUE_POINTERS + data->Context->setOpaquePointers(true); + #else +diff --git a/lib/llvmopencl/BarrierTailReplication.cc b/lib/llvmopencl/BarrierTailReplication.cc +index 98bc0635..43802f73 100644 +--- a/lib/llvmopencl/BarrierTailReplication.cc ++++ b/lib/llvmopencl/BarrierTailReplication.cc +@@ -352,7 +352,11 @@ BarrierTailReplication::ReplicateBasicBlocks(BasicBlockVector &new_graph, + i2 != e2; ++i2) { + Instruction *i = i2->clone(); + reference_map.insert(std::make_pair(&*i2, i)); ++#ifdef LLVM_OLDER_THAN_16_0 + new_b->getInstList().push_back(i); ++#else ++ i->insertInto(new_b, new_b->end()); ++#endif + } + + // Add predicates to PHINodes of basic blocks the replicated +diff --git a/lib/llvmopencl/ParallelRegion.cc b/lib/llvmopencl/ParallelRegion.cc +index dfe56e03..639bd686 100644 +--- a/lib/llvmopencl/ParallelRegion.cc ++++ b/lib/llvmopencl/ParallelRegion.cc +@@ -201,12 +201,17 @@ ParallelRegion::chainAfter(ParallelRegion *region) + #endif + + BasicBlock *successor = t->getSuccessor(0); +- Function::BasicBlockListType &bb_list = +- successor->getParent()->getBasicBlockList(); +- +- for (iterator i = begin(), e = end(); i != e; ++i) ++ Function *F = successor->getParent(); + ++#ifdef LLVM_OLDER_THAN_16_0 ++ Function::BasicBlockListType &bb_list = ++ F->getBasicBlockList(); ++ for (iterator i = begin(), e = end(); i != e; ++i) + bb_list.insertAfter(tail->getIterator(), *i); ++#else ++ for (iterator i = begin(), e = end(); i != e; ++i) ++ F->insert(tail->getIterator(), *i); ++#endif + t->setSuccessor(0, entryBB()); + + t = exitBB()->getTerminator(); +diff --git a/lib/llvmopencl/WorkItemAliasAnalysis.cc b/lib/llvmopencl/WorkItemAliasAnalysis.cc +index 02dcd2ec..8a85b25a 100644 +--- a/lib/llvmopencl/WorkItemAliasAnalysis.cc ++++ b/lib/llvmopencl/WorkItemAliasAnalysis.cc +@@ -51,6 +51,12 @@ using namespace llvm; + typedef llvm::MemoryLocation Location; + typedef llvm::AliasResult AliasResult; + ++#ifdef LLVM_OLDER_THAN_16_0 ++#define AAResultB AAResultBase ++#else ++#define AAResultB AAResultBase ++#endif ++ + /// WorkItemAliasAnalysis - This is a simple alias analysis + /// implementation that uses pocl metadata to make sure memory accesses from + /// different work items are not aliasing. +@@ -58,8 +64,8 @@ typedef llvm::AliasResult AliasResult; + + // LLVM 3.8+ + +-class WorkItemAAResult : public AAResultBase { +- friend AAResultBase; ++class WorkItemAAResult : public AAResultB { ++ friend AAResultB; + + public: + static char ID; diff --git a/pocl-rpmlintrc b/pocl-rpmlintrc new file mode 100644 index 0000000..67d25fd --- /dev/null +++ b/pocl-rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package") diff --git a/pocl.changes b/pocl.changes new file mode 100644 index 0000000..3b7d78e --- /dev/null +++ b/pocl.changes @@ -0,0 +1,481 @@ +------------------------------------------------------------------- +Sat Dec 28 01:52:48 UTC 2024 - Eyad Issa + +- Use _service file to create tarball from git +- Enable SPIR-V support + +- Remove pocl-llvm16.patch +- Remove link_against_libclang-cpp_so.patch + +- Update to version 6.0: + * New CPU driver which uses Threading Building Blocks for + task scheduling + * Experimental cl_ext_buffer_device_address prototype + * Multi-device command buffer infrastructure + * Command queue priority/throttle hints + * Support for using OpenMP for task scheduling in the + "cpu" driver + * Improvements to the Remote driver + * Improvements to the Level Zero driver + * Improvements to the CUDA driver + +- Update to version 5.0: + * New backend: Remote + * CUDA driver: More OpenCL 3.0 features and extensions + implemented + * RISC-V CPU support improved + * Other CPU improvements + * Experimental built-in-kernel library based FPGA backend + +- Update to version 4.0: + * Support for Clang/LLVM 16.0 + * CPU driver improvements + * New Level Zero driver + +------------------------------------------------------------------- +Thu Feb 29 14:57:59 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN. + +------------------------------------------------------------------- +Fri Feb 16 08:20:55 UTC 2024 - Max Lin + +- BuildRequires clang15-devel on Leap 15.6 + * the default clang-devel is clang17 and Leap15 doesn't + have clang16 + +------------------------------------------------------------------- +Wed Nov 8 16:12:20 UTC 2023 - Dominique Leuenberger + +- BuildRequire clang16-devel whenever clang-devel is not in the + range >= 6 < 17. + +------------------------------------------------------------------- +Sat May 13 05:43:35 UTC 2023 - Carsten Ziepke + +- Add pocl-llvm16.patch, enables support for LLVM 16 +- Use BuildRequires ocl-icd-devel instead pkgconfig(OpenCL), fix + have choice for pkgconfig(OpenCL) for SLE + +------------------------------------------------------------------- +Sat Dec 24 12:27:06 UTC 2022 - Andreas Schwab + +- Use generic-rv64 cpu on riscv64 + +------------------------------------------------------------------- +Mon Dec 5 13:43:13 UTC 2022 - Ondřej Súkup + +- Update to version 3.1 + * Support CLang/LLVM 15 + * Much improved SPIR-V support for CPU and CUDA drivers + * Major rework of the custom device driver. + * Various improvements to the work-in-progress Vulkan driver + * Basic implementation of cl_khr_command_buffer + +------------------------------------------------------------------- +Wed Nov 2 10:13:14 UTC 2022 - Dominique Leuenberger + +- IF clang-devel is >= 15, force dependency to clang14-devel. + +------------------------------------------------------------------- +Tue Sep 6 16:34:33 UTC 2022 - Stefan Brüns + +- Update to version 3.0 + * Minimal OpenCL 3.0 feature set should be now supported + (official conformance stamp still to apply for). + * Support for Clang/LLVM 14.0. + * Improved tracing and visualization. + * Support for generating specialized work-group functions and + include them in the PoCL kernel program binaries. + * Fixed printf for SPIR-V. + * A lot of other fixes and improvements. + +------------------------------------------------------------------- +Sat Jun 4 14:33:49 UTC 2022 - Aaron Puchert + +- Use LLVM 13 on Tumbleweed, since LLVM 14 does not yet work + according to upstream. (gh#pocl/pocl#1047, gh#pocl/pocl#1048) +- Require at least version 6 of clang-devel, older versions are + not supported. (Otherwise configuration will fail.) +- Strip prefix from CMAKE_INSTALL_LIBDIR on older distributions + to fix paths there. + +------------------------------------------------------------------- +Sat Oct 30 11:37:16 UTC 2021 - Martin Hauke + +- Update to version 1.8 + * Support for Clang/LLVM 13 + * Improved debugging support with Valgrind, LTTNG + * Improved support for SPIR/SPIR-V on CUDA +- Update to version 1.7 + * Support for Clang/LLVM 12 + * Improved support for cross-compiling + * Improved support for SPIR-V binaries when using CPU device + * Implemented OpenCL 3.0 features: clGetDeviceInfo queries + + CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES (Minimal implementation) + + CL_DEVICE_ATOMIC_FENCE_CAPABILITIES (Minimal implementation) + +------------------------------------------------------------------- +Fri Dec 25 14:30:16 UTC 2020 - Martin Hauke + +- Update to version 1.6 + * Support for LLVM 11. + * CUDA kernels using constant __local blocks are now ABI + incompatible with previous release. Users need to delete their + pocl cache. + * Improved debugging of OpenCL code with CPU driver. + * Improved the PTX code generation for __local blocks. + * Improved handling of command queue barriers + * Fix LLVM loop vectorizing remarks printing + (POCL_VECTORIZER_REMARKS=1). + * Fix an issue in which the loop vectorizer produced code with + invalid memory reads (issue #757). + * Fix compilation error when CMake option SINGLE_LLVM_LIB is + set to OFF. + * Fix wrongly output dlerror (Undefined symbol) after dlopen, + caused by a previous libdl call in an ICD loader + * [CPU] safety margin of pocl's CPU driver local memory + allocation has been reduced to a much more reasonable value + * [CPU] buffer size for OpenCL printf is now configurable with + PRINTF_BUFFER_SIZE CMake variable + * [CPU] local memory size reported is now the size of last level + of non-shared data cache (usually L1 or L2 depending on CPU), + if hwloc can determine it. +- Update patch link_against_libclang-cpp_so.patch + +------------------------------------------------------------------- +Fri Oct 23 22:46:28 UTC 2020 - Ondřej Súkup + +- remove broken installation workaround + +------------------------------------------------------------------- +Fri Jun 26 11:05:12 UTC 2020 - Stefan Dirsch + +- moved pocl.icd to /usr/share/OpenCL/vendors for real ... + +------------------------------------------------------------------- +Thu Jun 25 09:53:25 UTC 2020 - Stefan Dirsch + +- Update to version 1.5 + * Added support for LLVM/Clang 10.0 +- adjusted link_against_libclang-cpp_so.patch +- move pocl.icd from /usr/etc/OpenCL/vendors to + /usr/share/OpenCL/vendors (boo#1173005) + +------------------------------------------------------------------- +Mon Nov 4 20:04:34 UTC 2019 - Stefan Brüns + +- Update to version 1.4 + * Support for LLVM/Clang 8.0 and 9.0 + * Support for LLVM older than 6.0 has been removed. + * Improved SPIR and SPIR-V support for CPU device + * pocl-accel: An example driver and support infrastructure for + OpenCL 1.2 CL_DEVICE_TYPE_CUSTOM hardware accelerators. +- Remove upstreamed fix_resources_path_version_dependency.patch +- Fix build with single-component libclang-cpp.so, add + link_against_libclang-cpp_so.patch + +------------------------------------------------------------------- +Sun Jul 28 19:15:03 UTC 2019 - Stefan Brüns + +- Use GCC (default host compiler) for compiling the library itself, + and only compile the openCL kernel bytecode with clang, which is the + upstream default setup. This also fixes problems where clang chokes + on the GCC LTO options. +- Drop unused boost_headers, glew, ncurses and uthash devel BuildRequires. +- Remove unneeded extra linker flags. +- Fix build on ARM, and enable Arch64 (needs explicit CPU specification), + supported since pocl 1.1. +- Fix failing header lookup when minor libclang version changes + (https://github.com/pocl/pocl/issues/747), add + fix_resources_path_version_dependency.patch +- Require implementation (libpocl2) from the main package which + contains the ICD referencing it. + +------------------------------------------------------------------- +Fri Apr 5 19:56:21 UTC 2019 - Martin Hauke + +- Adjust required clang version (clang < 9) since clang 8 is now + supported by upstream. + +------------------------------------------------------------------- +Thu Apr 4 19:21:26 UTC 2019 - Martin Hauke + +- Update to version 1.3 + * Support for Clang/LLVM 8.0. + Bug Fixes: + * Fixed kernel debug symbol generation. + * HSA: fix kernel caching. + * Fix clCreateImage doesn't fail with unsupported image type. + * Fix handle non-kernel functions with barriers properly. + * Fix Unable to build pocl with CUDA support with LLVM 7 and host + GCC 8.2. + * Fix image format/size handling with multiple devices in context. + * Fix padding issue with context arrays that manifested as unaligned + access errors after autovectorization. + Notable Internal Changes + * Add group ids as hidden kernel arguments instead of digging + them up from the context struct. + * Ability to generate the final binary via separate assembly text + + assembler call. Useful for supporting LLVM targets without direct + binary emission support. + * Use Clang's Driver API for launching the final linkage step. This + way we utilize the toolchain registry with correct linkage steps + required for the target at hand. + * Add 'device_aux_functions' to the driver layer attributes. This + can be used to retain device-specific functions required by the + target across the pruning of unused globals. + * The "default kernels" hack which was used to store kernel metadata, + has been removed. Kernel metadata are now stored only once, in + cl_program struct; every new cl_kernel structs holds only a pointer. + * Major 'pthread' CPU driver cleanup. + * Major Workgroup.cc cleanup. +- Remove reproducible.patch (fixed upstream) + +------------------------------------------------------------------- +Wed Oct 31 12:13:35 UTC 2018 - Bernhard Wiedemann + +- Add reproducible.patch to make build result independent of + build system CPU (boo#1110722) + +------------------------------------------------------------------- +Tue Sep 25 10:30:51 UTC 2018 - Ondřej Súkup + +- update to version 1.2 + * Support for LLVM/Clang 7.0 and 6.0 + * HWLOC 2.0 support +- build kernels with distro support - detect and load cpu + optimized code on runtime + +------------------------------------------------------------------- +Mon Jul 30 04:53:06 UTC 2018 - bwiedemann@suse.com + +- Disable compile time CPU-detection + instead always asume core2 (boo#1100677) + +------------------------------------------------------------------- +Tue May 15 20:34:02 UTC 2018 - mimi.vx@gmail.com + +- move nonversioned lib to main package + +------------------------------------------------------------------- +Fri Mar 9 17:17:10 UTC 2018 - mardnh@gmx.de + +- Update to version 1.1 + * Support for LLVM/Clang 6.0 and 5.0. + * Experimental SPIR and SPIR-V support + * Improved kernel compilation speed +- Several tests have problems on some OBS workers while the same + tests run perfectly fine in a local chroot. + Disable tests for now. + +------------------------------------------------------------------- +Mon Mar 5 19:34:47 UTC 2018 - mardnh@gmx.de + +- Create subpackage for the shared library +- Run tests after the build + +------------------------------------------------------------------- +Wed Jan 31 14:51:17 UTC 2018 - msrb@suse.com + +- Remove dependency on clang-devel-static. (bnc#1065464) + * It was removed, clang-devel now again provides everything + necessary as shared libraries. + +------------------------------------------------------------------- +Tue Dec 19 18:44:43 UTC 2017 - mardnh@gmx.de + +- Update to version 1.0 + Highlights + * Improved automatic local work-group sizing on kernel enqueue, taking + into account standard constraints, SIMD width for vectorization as + well as the number of compute units available on the device. + * Support for NVIDIA GPUs via a new CUDA backend (currently experimental). + * Removed support for BBVectorizer. + * LLVM 5.0 is now supported. + * A few build options have been added for distribution builds, + see README.packaging. + * Somewhat improved scalability in the CPU driver. CPUs with many cores + and programs using a lot of WIs with small kernels can run somewhat faster. + * Full conformance with OpenCL 1.2 standard, enabled by default. There are + some caveats though - see the documentation. + * When conformance is enabled, some kernel library functions might be + slower than in previous releases. + * Pocl now reports OpenCL 1.2 instead of 2.0, except HSA enabled builds. + * Updated format of pocl binaries, which is NOT backwards compatible. + * You'll need to clean any kernel caches. + * Fixed several memory leaks. + * Unresolved symbols (missing/misspelled functions etc) in a kernel will + result in error in clBuildProgram() instead of pocl silently ignoring + them and then aborting at dlopen(). + * New env variable POCL_MEMORY_LIMIT=N limits the Global memory size + reported by pocl to N gigabytes. + * New env variable POCL_AFFINITY (defaults to 0): if enabled, sets + the affinity of each CPU driver pthread to a single core. + * Improved AVX512 support (with LLVM 5.0). Note that even with LLVM 5.0 + there are still a few bugs (see pocl issue #555); AVX512 + LLVM 4.0 are + a lot more broken, and probably not worth trying. + * POCL_DEBUG env var has been revamped. You can now limit debuginfo to + these categories (or their combination): all,error,warning,general + memory,llvm,events,cache,locking,refcounts,timing,hsa,tce,cuda + * The old setting POCL_DEBUG=1 now equals error+warning+general. +- Remove patch: + * pocl-disable-tests.diff +- Disable CUDA backend since it depends on CUDA_TOOLKIT which is + not available in Factory + +------------------------------------------------------------------- +Thu Oct 26 14:13:18 UTC 2017 - mpluskal@suse.com + +- Simplify spec file a bit +- Enable CUDA backend +- Enable all available cpu specific kernels for intel platform + +------------------------------------------------------------------- +Sat Oct 21 06:28:35 UTC 2017 - mpluskal@suse.com + +- We need clang4-devel-static to build with current clang packaging +- Small spec-file cleanup + * drop conditionals for older releases then Factory as building + was not possible anyways + +------------------------------------------------------------------- +Wed Jul 12 10:50:47 UTC 2017 - jengelh@inai.de + +- Description should say what it is, not what it plans in the + future. + +------------------------------------------------------------------- +Sat Jul 8 17:29:43 UTC 2017 - mardnh@gmx.de + +- Fix runtime linking issues (missing crtbeginS.so) + - Require gcc for Factory + +------------------------------------------------------------------- +Mon Jul 3 21:23:21 UTC 2017 - mardnh@gmx.de + +- Fix path in the ICD-file + +------------------------------------------------------------------- +Fri May 19 08:49:22 UTC 2017 - idonmez@suse.com + +- Update library name for uthash -> libut2 + +------------------------------------------------------------------- +Tue May 16 18:59:30 UTC 2017 - mardnh@gmx.de + +- Update to 0.14 + - Support for LLVM/Clang versions 3.9 and 4.0. Version 3.9 was the first + release to include all frontend features for OpenCL 2.0. + - Ability to build pocl in a mode where online compilation is not + supported to run in hosts without LLVM and binaries compiled offline + e.g. using poclcc. + - pocl's binary format now can contain all the necessary bits to + execute the programs on a host without online compiler support. + - Initial support for out-of-order execution execution of command queues. + - It's now possible to cross-compile pocl when building an offline + compiler build. + - New driver api extension to support out-of-order and asynchronous + devices/drivers. + - Pthread and HSA drivers are now fully asynchronous. + - CMake now the only supported build system, autotools removed. + - LTTng tracing support +- Add patches: + - pocl-disable-tests.diff + - compilation errors on some tests disable tests for now +- Remove patches: + - 0001-Fixes-357-broken-build-with-GCC-6.1.patch + - fixed upstream + +------------------------------------------------------------------- +Thu Feb 2 10:52:12 UTC 2017 - adam.majer@suse.de + +- use individual libboost-*-devel packages instead of boost-devel + +------------------------------------------------------------------- +Fri Jan 20 08:45:21 UTC 2017 - mpluskal@suse.com + +- Use llvm3_8 for building and as runtime dependency + +------------------------------------------------------------------- +Sun Oct 9 09:17:33 UTC 2016 - mpluskal@suse.com + +- Use cmake macros +- Use ninja to speedup building + +------------------------------------------------------------------- +Mon Jul 4 15:04:04 UTC 2016 - mardnh@gmx.de + +- Add patch: 0001-Fixes-357-broken-build-with-GCC-6.1.patch + * Fix build with GCC 6.x + +------------------------------------------------------------------- +Tue Apr 5 07:18:43 UTC 2016 - mpluskal@suse.com + +- Update to 0.13 + * kernel compiler support for LLVM/Clang 3.8 + * initial (partial) OpenCL 2.0 support + * CMake build system almost on parity with autotools + * Improved HSA support + * Other optimizations and bug fixes + +------------------------------------------------------------------- +Mon Oct 26 20:02:35 UTC 2015 - mardnh@gmx.de + +- update to version 0.12 + Highlights + * Support for HSA-compliant devices (kernel agents). The GPU of AMD Kaveri + now works through pocl with a bunch of test cases in the AMD SDK 2.9 example + suite. + * New and improved kernel cache system that enables caching + kernels with #includes. + * Support for LLVM/Clang 3.7. + * Little endian MIPS32 now passes almost all pocl testsuite tests. + + OpenCL Runtime/Platform API support + * Transferred buffer read/write/copy offset calculation to device driver side. + - these driver api functions have changed; got offset as a new argument. + * Maximum allocation is not limited to 1/4th of total memory size. + * Maximum image dimensions grow to fit maximum allocation. + * clGetDeviceInfo() reports better information about CPU vendor and cache. + * experimental clCreateSubDevices() for pthread CPU device. + + OpenCL C Builtin Function Implementations + * Implemented get_image_dim(). + + Bugfixes + * Avoid infinite loops when users recycle an event waiting list. + * Correctly report the base address alignment. + * Lots of others. + + Misc + * Tests now using new cl2.hpp, removing dependency on OpenGL headers + +- remove OpenGL-related packages from BuildRequires +- add rpmlintrc + +------------------------------------------------------------------- +Wed Jul 1 14:54:09 UTC 2015 - cdenicolo@suse.com + +- license update: MIT + overall license is MIT, other licenses refere to build scripts only. + +------------------------------------------------------------------- +Thu Mar 12 19:11:26 UTC 2015 - mardnh@gmx.de + +- update to version 0.11 + This release adds: + * kernel compiler support for LLVM/Clang 3.6, + * caching of compiled OpenCL kernels + * initial Android support + * experimental Windows support (many things still broken there) + * two new examples, Cloverleaf and Halide, updated AMDSDK examples + * better debugging possibilities + * initial MIPS architecture support + +------------------------------------------------------------------- +Tue Oct 7 19:16:42 UTC 2014 - mardnh@gmx.de + +- initial stable package, version 0.10 + based on home:mnhauke:opencl:testing/pocl diff --git a/pocl.obsinfo b/pocl.obsinfo new file mode 100644 index 0000000..6b98364 --- /dev/null +++ b/pocl.obsinfo @@ -0,0 +1,4 @@ +name: pocl +version: 6.0 +mtime: 1718712945 +commit: 952bc559f790e5deb5ae48692c4a19619b53fcdc diff --git a/pocl.spec b/pocl.spec new file mode 100644 index 0000000..ecf9536 --- /dev/null +++ b/pocl.spec @@ -0,0 +1,139 @@ +# +# spec file for package pocl +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2014 Guillaume GARDET +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define sover 2 +Name: pocl +Version: 6.0 +Release: 0 +Summary: Portable Computing Language - an OpenCL implementation +# The whole code is under MIT +# except include/utlist.h which is under BSD (and unbundled) +License: MIT +Group: Development/Tools/Other +URL: https://portablecl.org/ +Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source99: pocl-rpmlintrc +# Version 6.0: Supports LLVM versions 14.0 to 18.0 +BuildRequires: ((clang-devel >= 14 with clang-devel < 19) or clang18-devel) +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libLLVMSPIRVLib-devel +BuildRequires: ninja +BuildRequires: ocl-icd-devel +BuildRequires: opencl-headers +BuildRequires: pkgconfig +BuildRequires: pkgconfig(hwloc) +# PPC has limited support/testing from upstream +# s390(x) is also not supported, so use ExclusiveArch +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 riscv64 + +%description +Portable Computing Language (pocl) is an implementation of the OpenCL standard +which can be adapted for new targets and devices, both for homogeneous CPU and +heterogenous GPUs/accelerators. + +pocl uses Clang as an OpenCL C frontend and LLVM for the kernel compiler +implementation, and as a portability layer. If your desired target has an LLVM +backend, it should be possible to get OpenCL support by using pocl. + +pocl yields improved performance portability by using a kernel compiler that +can generate multi-work-item work-group functions that exploit various types of +parallel hardware resources, such as VLIW, superscalar, SIMD, SIMT, multicore +and multithread. + +%package -n libpocl%{sover} +Summary: Shared Library part of pocl +Group: System/Libraries + +%description -n libpocl%{sover} +Portable Computing Language (pocl) is an implementation of the OpenCL standard +which can be adapted for new targets and devices, both for homogeneous CPU and +heterogenous GPUs/accelerators. + +This subpackage contains the shared library part of pocl. + +%package devel +Summary: Development files for the Portable Computing Language +Group: Development/Languages/Other +Requires: %{name} = %{version} +Requires: libpocl%{sover} = %{version} +Requires: opencl-headers >= 2.2 + +%description devel +Portable Computing Language (pocl) is an implementation of the OpenCL standard +which can be adapted for new targets and devices, both for homogeneous CPU and +heterogenous GPUs/accelerators. + +This subpackage provides the development files needed for pocl. + +%prep +%autosetup -p1 + +%build +%define __builder ninja +%cmake \ + -DENABLE_CUDA=OFF \ + -DENABLE_SPIRV=ON \ + -DENABLE_ICD=ON \ + -DPOCL_INSTALL_ICD_VENDORDIR=%{_datadir}/OpenCL/vendors \ +%ifarch %{ix86} x86_64 + -DKERNELLIB_HOST_CPU_VARIANTS=distro \ +%endif +%ifarch %{arm} + -DLLC_HOST_CPU=cortex-a9 \ +%endif +%ifarch aarch64 + -DLLC_HOST_CPU=cortex-a53 \ +%endif +%ifarch riscv64 + -DLLC_HOST_CPU=generic-rv64 \ +%endif +%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150300 + -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ +%endif + -DWITH_LLVM_CONFIG=%{_bindir}/llvm-config + +%cmake_build + +%install +%cmake_install + +%post -n libpocl%{sover} -p /sbin/ldconfig +%postun -n libpocl%{sover} -p /sbin/ldconfig + +%files +%doc CHANGES README.* doc/sphinx/source/*.rst +%license LICENSE +%dir %{_datadir}/OpenCL/ +%dir %{_datadir}/OpenCL/vendors +%{_datadir}/OpenCL/vendors/pocl.icd +%{_bindir}/poclcc +%dir %{_libdir}/pocl/ +%{_libdir}/pocl/libpocl-devices-basic.so +%{_libdir}/pocl/libpocl-devices-pthread.so +%{_datadir}/pocl/ + +%files -n libpocl%{sover} +%{_libdir}/libpocl.so.%{sover}* + +%files devel +%{_libdir}/libpocl.so +%{_libdir}/pkgconfig/pocl.pc + +%changelog