Compare commits
9 Commits
Author | SHA256 | Date | |
---|---|---|---|
003c389e33 | |||
642c3fac29 | |||
3bf7a6020d | |||
|
b417418a58 | ||
ba0ead88e5 | |||
b367ab0004 | |||
7b50d0199c | |||
491c11a2a9 | |||
|
02c1ed5486 |
@@ -1,13 +0,0 @@
|
|||||||
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")
|
|
2
maint.README
Normal file
2
maint.README
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
By default POCL uses the TBB backend. If libpocl-devices-tbb is not installed, the OpenCL runtime will not be able to find any devices.
|
||||||
|
To force POCl to use the CPU backend, set the environment variable POCL_DEVICES=cpu.
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:82314362552e050aff417318dd623b18cf0f1d0f84f92d10a7e3750dd12d3a9a
|
|
||||||
size 1928607
|
|
3
pocl-7.0.tar.gz
Normal file
3
pocl-7.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f55caba8c3ce12bec7b683ce55104c7555e19457fc2ac72c6f035201e362be08
|
||||||
|
size 3766036
|
@@ -1,203 +0,0 @@
|
|||||||
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<WorkItemAAResult>
|
|
||||||
+#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<WorkItemAAResult> {
|
|
||||||
- friend AAResultBase<WorkItemAAResult>;
|
|
||||||
+class WorkItemAAResult : public AAResultB {
|
|
||||||
+ friend AAResultB;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static char ID;
|
|
66
pocl.changes
66
pocl.changes
@@ -1,3 +1,68 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 22 15:18:21 UTC 2025 - Eyad Issa <eyadlorenzo@gmail.com>
|
||||||
|
|
||||||
|
- Drop the _service file
|
||||||
|
- Use Source Urls instead of obs_scm
|
||||||
|
- Add option to build with the vulkan experimental device
|
||||||
|
- Build with level0 experimental device
|
||||||
|
- Update to version 7.0:
|
||||||
|
* PoCL received the official OpenCL 3.0 conformance stamp with the
|
||||||
|
CPU (x86-64) and Level Zero drivers.
|
||||||
|
* Support for LLVM versions 19 and 20
|
||||||
|
* Support for dynamic device addition and network discovery.
|
||||||
|
This new feature allows discovery of remote servers located in
|
||||||
|
LAN or WAN environments and enables runtime addition of
|
||||||
|
discovered devices to the remote client's platform. Network
|
||||||
|
discovery is performed thorugh mDNS, unicast-DNS-SD, and
|
||||||
|
DHT-based mechanisms, using Avahi and OpenDHT libraries.
|
||||||
|
* New experimental support for Defined Built-in Kernels (DBK) has
|
||||||
|
been added to the CPU drivers
|
||||||
|
* The old "work-item replication" work-group function generation
|
||||||
|
method was removed to clean up the kernel compiler.
|
||||||
|
* Full changes at
|
||||||
|
/usr/share/doc/packages/pocl/notes_7_0.rst
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 6 13:30:37 UTC 2025 - Eyad Issa <eyadlorenzo@gmail.com>
|
||||||
|
|
||||||
|
- Disable SPIR-V Support on Leap 15.x (missing llvm-spirv)
|
||||||
|
- Enable CPU TBB driver
|
||||||
|
- Add note for users/packagers in maint.README.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 28 01:52:48 UTC 2024 - Eyad Issa <eyadlorenzo@gmail.com>
|
||||||
|
|
||||||
|
- 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 <dimstar@opensuse.org>
|
Thu Feb 29 14:57:59 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
@@ -445,4 +510,3 @@ Tue Oct 7 19:16:42 UTC 2014 - mardnh@gmx.de
|
|||||||
|
|
||||||
- initial stable package, version 0.10
|
- initial stable package, version 0.10
|
||||||
based on home:mnhauke:opencl:testing/pocl
|
based on home:mnhauke:opencl:testing/pocl
|
||||||
|
|
||||||
|
118
pocl.spec
118
pocl.spec
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package pocl
|
# spec file for package pocl
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
# Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org>
|
# Copyright (c) 2014 Guillaume GARDET <guillaume@opensuse.org>
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@@ -17,38 +17,65 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define sover 2
|
%global sover 2
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1600
|
||||||
|
%bcond_without spirv
|
||||||
|
%else
|
||||||
|
%bcond_with spirv
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1600
|
||||||
|
%bcond_without ttb
|
||||||
|
%else
|
||||||
|
%bcond_with ttb
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} >= 1600
|
||||||
|
%bcond_without levelzero
|
||||||
|
%else
|
||||||
|
%bcond_with levelzero
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%bcond_with vulkan
|
||||||
|
|
||||||
Name: pocl
|
Name: pocl
|
||||||
Version: 3.1
|
Version: 7.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Portable Computing Language - an OpenCL implementation
|
Summary: Portable Computing Language - an OpenCL implementation
|
||||||
# The whole code is under MIT
|
# The whole code is under MIT
|
||||||
# except include/utlist.h which is under BSD (and unbundled)
|
# except include/utlist.h which is under BSD (and unbundled)
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Tools/Other
|
Group: Development/Tools/Other
|
||||||
URL: http://portablecl.org/
|
URL: https://portablecl.org/
|
||||||
Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Source98: maint.README
|
||||||
Source99: pocl-rpmlintrc
|
Source99: pocl-rpmlintrc
|
||||||
Patch0: link_against_libclang-cpp_so.patch
|
# Version 7.0: Supports LLVM versions 19 and 20
|
||||||
# PATCH-FIX-UPSTREAM - pocl-llvm16.patch - enables support for LLVM 16
|
BuildRequires: ((clang-devel >= 19 with clang-devel < 21) or clang20-devel)
|
||||||
# https://github.com/pocl/pocl/commit/20d1bfa9bfd301964f7b2fc6d7f4589dd04e1b5c
|
BuildRequires: cmake >= 3.15
|
||||||
# https://github.com/pocl/pocl/commit/bf50f0052e4248cd1acfaaa8da95c5e4ca52f815
|
|
||||||
Patch1: pocl-llvm16.patch
|
|
||||||
BuildRequires: cmake
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: ninja
|
BuildRequires: ninja
|
||||||
BuildRequires: ocl-icd-devel
|
|
||||||
BuildRequires: opencl-headers
|
BuildRequires: opencl-headers
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} > 150500
|
BuildRequires: pkgconfig(OpenCL)
|
||||||
BuildRequires: ((clang-devel >= 6.0.0 with clang-devel < 17) or clang15-devel)
|
|
||||||
%else
|
|
||||||
BuildRequires: ((clang-devel >= 6.0.0 with clang-devel < 17) or clang16-devel)
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(hwloc)
|
BuildRequires: pkgconfig(hwloc)
|
||||||
|
BuildRequires: pkgconfig(ocl-icd)
|
||||||
# PPC has limited support/testing from upstream
|
# PPC has limited support/testing from upstream
|
||||||
# s390(x) is also not supported, so use ExclusiveArch
|
# s390(x) is also not supported, so use ExclusiveArch
|
||||||
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 riscv64
|
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 riscv64
|
||||||
|
%if %{with ttb}
|
||||||
|
BuildRequires: pkgconfig(tbb)
|
||||||
|
%endif
|
||||||
|
%if %{with spirv}
|
||||||
|
BuildRequires: libLLVMSPIRVLib-devel
|
||||||
|
BuildRequires: spirv-tools
|
||||||
|
%endif
|
||||||
|
%if %{with levelzero}
|
||||||
|
BuildRequires: pkgconfig(level-zero)
|
||||||
|
%endif
|
||||||
|
%if %{with vulkan}
|
||||||
|
BuildRequires: pkgconfig(vulkan)
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Portable Computing Language (pocl) is an implementation of the OpenCL standard
|
Portable Computing Language (pocl) is an implementation of the OpenCL standard
|
||||||
@@ -67,6 +94,7 @@ and multithread.
|
|||||||
%package -n libpocl%{sover}
|
%package -n libpocl%{sover}
|
||||||
Summary: Shared Library part of pocl
|
Summary: Shared Library part of pocl
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
Recommends: libpocl-devices-tbb = %{version}
|
||||||
|
|
||||||
%description -n libpocl%{sover}
|
%description -n libpocl%{sover}
|
||||||
Portable Computing Language (pocl) is an implementation of the OpenCL standard
|
Portable Computing Language (pocl) is an implementation of the OpenCL standard
|
||||||
@@ -75,6 +103,26 @@ heterogenous GPUs/accelerators.
|
|||||||
|
|
||||||
This subpackage contains the shared library part of pocl.
|
This subpackage contains the shared library part of pocl.
|
||||||
|
|
||||||
|
%package -n libpocl-devices-tbb
|
||||||
|
Summary: TBB device for pocl
|
||||||
|
|
||||||
|
%description -n libpocl-devices-tbb
|
||||||
|
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 Thread Building Blocks (TBB) device for pocl.
|
||||||
|
|
||||||
|
%package -n libpocl-devices-levelzero
|
||||||
|
Summary: Level Zero device for pocl
|
||||||
|
|
||||||
|
%description -n libpocl-devices-levelzero
|
||||||
|
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 Level Zero device for pocl.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for the Portable Computing Language
|
Summary: Development files for the Portable Computing Language
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
@@ -93,11 +141,31 @@ This subpackage provides the development files needed for pocl.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%define __builder ninja
|
%global __builder ninja
|
||||||
%cmake \
|
%cmake \
|
||||||
-DENABLE_CUDA=0 \
|
|
||||||
-DENABLE_ICD=ON \
|
|
||||||
-DPOCL_INSTALL_ICD_VENDORDIR=%{_datadir}/OpenCL/vendors \
|
-DPOCL_INSTALL_ICD_VENDORDIR=%{_datadir}/OpenCL/vendors \
|
||||||
|
-DENABLE_LLVM=ON \
|
||||||
|
-DWITH_LLVM_CONFIG=%{_bindir}/llvm-config \
|
||||||
|
-DENABLE_ICD=ON \
|
||||||
|
-DSTATIC_LLVM=OFF \
|
||||||
|
-DENABLE_REMOTE_DISCOVERY_AVAHI=ON \
|
||||||
|
-DENABLE_REMOTE_ADVERTISEMENT_AVAHI=ON \
|
||||||
|
-DENABLE_REMOTE_DISCOVERY_DHT=ON \
|
||||||
|
-DENABLE_REMOTE_ADVERTISEMENT_DHT=ON \
|
||||||
|
-DENABLE_CUDA=OFF \
|
||||||
|
-DINSTALL_OPENCL_HEADERS=OFF \
|
||||||
|
%if %{with spirv}
|
||||||
|
-DENABLE_SPIRV=ON \
|
||||||
|
%endif
|
||||||
|
%if %{with ttb}
|
||||||
|
-DENABLE_TBB_DEVICE=ON \
|
||||||
|
%endif
|
||||||
|
%if %{with levelzero}
|
||||||
|
-DENABLE_LEVEL0=ON \
|
||||||
|
%endif
|
||||||
|
%if %{with vulkan}
|
||||||
|
-DENABLE_VULKAN=ON \
|
||||||
|
%endif
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
-DKERNELLIB_HOST_CPU_VARIANTS=distro \
|
-DKERNELLIB_HOST_CPU_VARIANTS=distro \
|
||||||
%endif
|
%endif
|
||||||
@@ -113,7 +181,7 @@ This subpackage provides the development files needed for pocl.
|
|||||||
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150300
|
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} <= 150300
|
||||||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
||||||
%endif
|
%endif
|
||||||
-DWITH_LLVM_CONFIG=%{_bindir}/llvm-config
|
%{nil}
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
@@ -142,4 +210,14 @@ This subpackage provides the development files needed for pocl.
|
|||||||
%{_libdir}/libpocl.so
|
%{_libdir}/libpocl.so
|
||||||
%{_libdir}/pkgconfig/pocl.pc
|
%{_libdir}/pkgconfig/pocl.pc
|
||||||
|
|
||||||
|
%if %{with ttb}
|
||||||
|
%files -n libpocl-devices-tbb
|
||||||
|
%{_libdir}/pocl/libpocl-devices-tbb.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with levelzero}
|
||||||
|
%files -n libpocl-devices-levelzero
|
||||||
|
%{_libdir}/pocl/libpocl-devices-level0.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user