Compare commits

...

80 Commits

Author SHA256 Message Date
Ana Guerrero
491c11a2a9 Accepting request 1233665 from science
OBS-URL: https://build.opensuse.org/request/show/1233665
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=34
2024-12-30 11:51:29 +00:00
Dominique Leuenberger
51a8647482 Accepting request 1153817 from science
OBS-URL: https://build.opensuse.org/request/show/1153817
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=33
2024-03-01 22:37:39 +00:00
904f092fdf Accepting request 1153351 from home:dimstar:rpm4.20:p
Prepare for RPM 4.20

OBS-URL: https://build.opensuse.org/request/show/1153351
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=77
2024-03-01 09:34:16 +00:00
Ana Guerrero
4fd0f7cda6 Accepting request 1147332 from science
OBS-URL: https://build.opensuse.org/request/show/1147332
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=32
2024-02-18 19:24:51 +00:00
Martin Hauke
95bc6aceb7 Accepting request 1147034 from home:mlin7442:rebuild_fails_156
fix build in Leap 15.6

OBS-URL: https://build.opensuse.org/request/show/1147034
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=75
2024-02-17 14:42:11 +00:00
Ana Guerrero
110bbf8c3a Accepting request 1126904 from science
OBS-URL: https://build.opensuse.org/request/show/1126904
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=31
2023-11-16 19:31:08 +00:00
Martin Hauke
78ef10c839 Accepting request 1124266 from home:dimstar:Factory
- BuildRequire clang16-devel whenever clang-devel is not in the
  range >= 6 < 17.

OBS-URL: https://build.opensuse.org/request/show/1124266
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=73
2023-11-16 14:31:44 +00:00
Dominique Leuenberger
1b8226600f Accepting request 1087020 from science
OBS-URL: https://build.opensuse.org/request/show/1087020
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=30
2023-05-14 14:31:49 +00:00
Martin Hauke
9b3a47b82b Accepting request 1086866 from home:Kieltux:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/1086866
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=71
2023-05-13 20:57:59 +00:00
Dominique Leuenberger
73453f6d87 Accepting request 1045225 from science
OBS-URL: https://build.opensuse.org/request/show/1045225
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=29
2022-12-24 17:26:22 +00:00
Martin Hauke
82223d22f2 Accepting request 1045200 from openSUSE:Factory:RISCV
- Use generic-rv64 cpu on riscv64

OBS-URL: https://build.opensuse.org/request/show/1045200
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=69
2022-12-24 15:18:25 +00:00
Dominique Leuenberger
ef1f2265d9 Accepting request 1040409 from science
OBS-URL: https://build.opensuse.org/request/show/1040409
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=28
2022-12-06 13:23:23 +00:00
Martin Hauke
56e69c6c74 Accepting request 1040383 from home:mimi_vx:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/1040383
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=67
2022-12-05 19:04:13 +00:00
Dominique Leuenberger
6b7f92399e Accepting request 1032912 from science
OBS-URL: https://build.opensuse.org/request/show/1032912
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=27
2022-11-02 17:20:37 +00:00
Martin Hauke
8de442f2d5 Accepting request 1032859 from home:dimstar:Factory
- IF clang-devel is >= 15, force dependency to clang14-devel.

OBS-URL: https://build.opensuse.org/request/show/1032859
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=65
2022-11-02 15:09:54 +00:00
Dominique Leuenberger
3989ed01e7 Accepting request 1001517 from science
OBS-URL: https://build.opensuse.org/request/show/1001517
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=26
2022-09-07 09:06:18 +00:00
Martin Hauke
695b557269 Accepting request 1001506 from home:StefanBruens:branches:science
- 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.

OBS-URL: https://build.opensuse.org/request/show/1001506
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=63
2022-09-06 19:34:32 +00:00
Dominique Leuenberger
5284e1a3ed Accepting request 981390 from science
OBS-URL: https://build.opensuse.org/request/show/981390
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=25
2022-06-09 12:11:58 +00:00
Martin Hauke
e6a3b2e2e1 Accepting request 980782 from home:aaronpuchert:branches:science
- 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.

OBS-URL: https://build.opensuse.org/request/show/980782
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=61
2022-06-08 20:53:15 +00:00
Dominique Leuenberger
b1d8469c7a Accepting request 928413 from science
OBS-URL: https://build.opensuse.org/request/show/928413
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=24
2021-10-31 21:55:51 +00:00
Matthias Mailänder
b878a78ea9 Accepting request 928258 from home:mnhauke:opencl:stable
- 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)

OBS-URL: https://build.opensuse.org/request/show/928258
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=60
2021-10-31 17:28:52 +00:00
Dominique Leuenberger
defa8053fa Accepting request 861549 from science
OBS-URL: https://build.opensuse.org/request/show/861549
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=23
2021-01-08 16:37:46 +00:00
Dirk Stoecker
d7b34331e9 Accepting request 858637 from home:mnhauke:opencl:stable
- 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

OBS-URL: https://build.opensuse.org/request/show/858637
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=58
2021-01-08 08:51:46 +00:00
Dominique Leuenberger
daceaa4e97 Accepting request 843814 from science
OBS-URL: https://build.opensuse.org/request/show/843814
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=22
2020-10-26 15:19:41 +00:00
Martin Hauke
00cfcee09e Accepting request 843703 from home:mimi_vx:branches:science
- remove broken installation workaround

OBS-URL: https://build.opensuse.org/request/show/843703
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=56
2020-10-24 19:29:48 +00:00
Dominique Leuenberger
774fea0adf Accepting request 817238 from science
OBS-URL: https://build.opensuse.org/request/show/817238
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=21
2020-06-26 19:49:45 +00:00
Martin Hauke
48d28f85ca Accepting request 817237 from home:sndirsch:branches:science
- moved pocl.icd to /usr/share/OpenCL/vendors for real ...

OBS-URL: https://build.opensuse.org/request/show/817237
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=54
2020-06-26 11:13:25 +00:00
Martin Hauke
79574b5fae Accepting request 817133 from home:sndirsch:branches:science
- 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)

OBS-URL: https://build.opensuse.org/request/show/817133
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=53
2020-06-26 08:14:51 +00:00
Dominique Leuenberger
a964507a41 Accepting request 745273 from science
OBS-URL: https://build.opensuse.org/request/show/745273
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=20
2019-11-18 19:07:54 +00:00
Martin Hauke
629efb1049 Accepting request 745268 from home:StefanBruens:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/745268
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=51
2019-11-04 21:32:39 +00:00
Dominique Leuenberger
e0a8c12291 Accepting request 720127 from science
OBS-URL: https://build.opensuse.org/request/show/720127
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=19
2019-08-05 08:36:15 +00:00
Martin Hauke
829fed3675 Accepting request 719902 from home:StefanBruens:branches:science
- Fix build with LTO enabled
- Fixup build/runtime dependencies
- Correct opencl header lookup

OBS-URL: https://build.opensuse.org/request/show/719902
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=49
2019-07-31 21:55:55 +00:00
Dominique Leuenberger
aeadd6ac30 Accepting request 691907 from science
OBS-URL: https://build.opensuse.org/request/show/691907
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=18
2019-04-08 08:38:25 +00:00
Martin Hauke
e75b135db6 Accepting request 691906 from home:mnhauke:branches:science
OBS-URL: https://build.opensuse.org/request/show/691906
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=47
2019-04-05 19:59:46 +00:00
Martin Hauke
23e7816edd Accepting request 691904 from home:mnhauke:branches:science
- Adjust required clang version (clang < 9) since clang 8 is now
  supported by upstream.

OBS-URL: https://build.opensuse.org/request/show/691904
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=46
2019-04-05 19:58:02 +00:00
Martin Hauke
cb98fe7909 Accepting request 691606 from home:mnhauke:branches:science
- 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)

OBS-URL: https://build.opensuse.org/request/show/691606
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=45
2019-04-05 14:51:19 +00:00
Dominique Leuenberger
7644118963 Accepting request 646209 from science
OBS-URL: https://build.opensuse.org/request/show/646209
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=17
2018-11-08 08:48:23 +00:00
Martin Hauke
39fe8c4c9b Accepting request 645732 from home:bmwiedemann:branches:science
Add upstream reproducible.patch to make build result independent of build system CPU (boo#1110722)

OBS-URL: https://build.opensuse.org/request/show/645732
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=43
2018-11-03 16:54:46 +00:00
Dominique Leuenberger
fc1e72a730 Accepting request 638018 from science
OBS-URL: https://build.opensuse.org/request/show/638018
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=16
2018-09-25 13:44:45 +00:00
Dirk Stoecker
f956c9995e Accepting request 638014 from home:mimi_vx:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/638014
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=41
2018-09-25 11:19:16 +00:00
Dominique Leuenberger
0ac072f3ba Accepting request 627128 from science
OBS-URL: https://build.opensuse.org/request/show/627128
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=15
2018-08-03 10:39:08 +00:00
Martin Hauke
17aaac5cf0 Accepting request 626138 from home:bmwiedemann:branches:science
Disable compile time CPU-detection
  instead always asume core2 (boo#1100677)

OBS-URL: https://build.opensuse.org/request/show/626138
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=39
2018-08-02 17:22:53 +00:00
Dominique Leuenberger
065d6ae684 Accepting request 609064 from science
OBS-URL: https://build.opensuse.org/request/show/609064
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=14
2018-05-16 09:43:22 +00:00
Ismail Dönmez
5bd435fab4 Accepting request 607716 from home:mimi_vx:branches:science
typo ..

OBS-URL: https://build.opensuse.org/request/show/607716
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=37
2018-05-16 08:18:38 +00:00
fd2ef28460 Accepting request 607712 from home:mimi_vx:branches:science
- move nonversioned lib to main package

OBS-URL: https://build.opensuse.org/request/show/607712
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=36
2018-05-15 21:09:21 +00:00
ab288ec8be Accepting request 607660 from home:mimi_vx:branches:science
fix

OBS-URL: https://build.opensuse.org/request/show/607660
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=35
2018-05-15 18:27:50 +00:00
b416bd3511 Accepting request 607653 from home:mimi_vx:branches:science
- remove lib subpackage - part of libs isnt clearly versioned

OBS-URL: https://build.opensuse.org/request/show/607653
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=34
2018-05-15 17:43:11 +00:00
Ismail Dönmez
90ac70aa6e Accepting request 589772 from home:mnhauke:opencl:stable
- 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. 

- Create subpackage for the shared library
- Run tests after the build

OBS-URL: https://build.opensuse.org/request/show/589772
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=33
2018-03-29 08:42:43 +00:00
Dominique Leuenberger
33643dc378 Accepting request 571526 from science
OBS-URL: https://build.opensuse.org/request/show/571526
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=13
2018-02-01 20:29:33 +00:00
Martin Hauke
6c7efe3f2b Accepting request 571473 from home:michalsrb:branches:science
- Remove dependency on clang-devel-static. (bnc#1065464)
  * It was removed, clang-devel now again provides everything
    necessary as shared libraries.

OBS-URL: https://build.opensuse.org/request/show/571473
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=31
2018-01-31 19:32:30 +00:00
Dominique Leuenberger
65798d57ef Accepting request 558754 from science
OBS-URL: https://build.opensuse.org/request/show/558754
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=12
2018-01-17 20:55:49 +00:00
Klaus Kämpf
36d900419b Accepting request 558673 from home:mnhauke:opencl:stable
- Update to version 1.0
- Remove patch:
  * pocl-disable-tests.diff
- Disable CUDA backend since it depends on CUDA_TOOLKIT which is
  not available in Factory

old: science/pocl
new: home:mnhauke:opencl:stable/pocl rev None
Index: pocl.changes
===================================================================
--- pocl.changes (revision 28)
+++ pocl.changes (revision 9)
@@ -1,4 +1,46 @@
 -------------------------------------------------------------------
+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
Index: pocl.spec
===================================================================
--- pocl.spec (revision 28)
+++ pocl.spec (revision 9)
@@ -17,9 +17,9 @@
 #
 
 
-%define sover  1.7.0
+%define sover  2.0.0
 Name:           pocl
-Version:        0.14
+Version:        1.0
 Release:        0
 Summary:        Portable Computing Language - an OpenCL implementation
 # The whole code is under MIT
@@ -30,7 +30,6 @@
 Url:            http://portablecl.org/
 Source0:        http://portablecl.org/downloads/%{name}-%{version}.tar.gz
 Source99:       pocl-rpmlintrc
-Patch0:         pocl-disable-tests.diff
 BuildRequires:  clang
 BuildRequires:  clang-devel
 BuildRequires:  clang-devel-static
@@ -84,12 +83,11 @@
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 %define __builder ninja
 %cmake \
-  -DENABLE_CUDA=1 \
+  -DENABLE_CUDA=0 \
   -DENABLE_ICD=1 \
   -DPOCL_INSTALL_ICD_VENDORDIR=%{_sysconfdir}/OpenCL/vendors \
   -DCMAKE_C_COMPILER=clang  \
@@ -124,9 +122,9 @@
 %dir %{_sysconfdir}/OpenCL/vendors
 %{_sysconfdir}/OpenCL/vendors/pocl.icd
 %{_bindir}/poclcc
-%{_libdir}/libpocl.so.1
+%{_libdir}/libpocl.so.2
 %{_libdir}/libpocl.so.%{sover}
-%{_libdir}/libpoclu.so.1
+%{_libdir}/libpoclu.so.2
 %{_libdir}/libpoclu.so.%{sover}
 %{_libdir}/pocl/
 %{_datadir}/pocl/
Index: pocl-1.0.tar.gz
===================================================================
Binary file pocl-1.0.tar.gz (revision 9) added
Index: pocl-0.14.tar.gz
===================================================================
Binary file pocl-0.14.tar.gz (revision 28) deleted
Index: pocl-disable-tests.diff
===================================================================
--- pocl-disable-tests.diff (revision 28)
+++ pocl-disable-tests.diff (deleted)
@@ -1,19 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 18d36e7..3c20763 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1000,10 +1000,10 @@ message(STATUS "POCLU LINK OPTS: ${POCLU_LINK_OPTIONS}")
- # poclcc bin
- add_subdirectory("bin")
- 
--if (OCS_AVAILABLE)
--  add_subdirectory("tests")
--  add_subdirectory("examples")
--endif()
-+#if (OCS_AVAILABLE)
-+#  add_subdirectory("tests")
-+#  add_subdirectory("examples")
-+#endif()
- 
- add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} ${COMMAND_USES_TERMINAL})
-

OBS-URL: https://build.opensuse.org/request/show/558673
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=29
2017-12-20 09:36:25 +00:00
Dominique Leuenberger
83d969fa5a Accepting request 536905 from science
1

OBS-URL: https://build.opensuse.org/request/show/536905
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=11
2017-10-27 12:01:21 +00:00
Martin Hauke
a0f69e859e Accepting request 536898 from home:pluskalm:branches:science
- Simplify spec file a bit
- Enable CUDA backend
- Enable all available cpu specific kernels for intel platform

OBS-URL: https://build.opensuse.org/request/show/536898
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=27
2017-10-26 14:49:42 +00:00
Dominique Leuenberger
ba64294c95 Accepting request 535645 from science
1

OBS-URL: https://build.opensuse.org/request/show/535645
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=10
2017-10-21 18:22:05 +00:00
Martin Hauke
55f398c898 Accepting request 535638 from home:pluskalm:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/535638
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=25
2017-10-21 08:52:56 +00:00
Dominique Leuenberger
d0b5b931a6 Accepting request 509806 from science
1

OBS-URL: https://build.opensuse.org/request/show/509806
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=9
2017-07-17 07:09:02 +00:00
Martin Hauke
32a8f6b8d2 Accepting request 509735 from home:jengelh:branches:science
- Description should say what it is, not what it plans in the
  future.

OBS-URL: https://build.opensuse.org/request/show/509735
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=23
2017-07-12 15:14:47 +00:00
Ismail Dönmez
6d0696c9aa Accepting request 508962 from home:mnhauke:opencl:stable
- Fix runtime linking issues (missing crtbeginS.so)
  - Require gcc for Factory

OBS-URL: https://build.opensuse.org/request/show/508962
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=22
2017-07-11 12:26:40 +00:00
Dominique Leuenberger
21a8c8da36 Accepting request 508003 from science
1

OBS-URL: https://build.opensuse.org/request/show/508003
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=8
2017-07-04 09:58:26 +00:00
Ismail Dönmez
2a04ff0f0a Accepting request 507938 from home:mnhauke:opencl:stable
- Fix path in the ICD-file

OBS-URL: https://build.opensuse.org/request/show/507938
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=20
2017-07-04 07:58:23 +00:00
Dominique Leuenberger
2c6fb0395b Accepting request 496512 from science
- Update library name for uthash -> libut2 

- 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

- use individual libboost-*-devel packages instead of boost-devel

OBS-URL: https://build.opensuse.org/request/show/496512
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=7
2017-06-28 08:35:50 +00:00
Ismail Dönmez
bd426cbd3d - Update library name for uthash -> libut2
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=18
2017-05-19 08:49:48 +00:00
Ismail Dönmez
e17250d6ea Accepting request 495724 from home:mnhauke:opencl:stable
- 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

OBS-URL: https://build.opensuse.org/request/show/495724
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=17
2017-05-18 08:29:48 +00:00
Martin Hauke
6ad6b7b9d1 Accepting request 454136 from home:adamm:branches:devel:libraries:c_c++
- use individual libboost-*-devel packages instead of boost-devel

OBS-URL: https://build.opensuse.org/request/show/454136
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=16
2017-02-06 17:45:06 +00:00
Dominique Leuenberger
3af8fb7744 Accepting request 451568 from science
1

OBS-URL: https://build.opensuse.org/request/show/451568
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=6
2017-01-24 09:36:56 +00:00
Ismail Dönmez
0ca2389bb7 Accepting request 451559 from home:pluskalm:branches:science
- Use llvm3_8 for building and as runtime dependency

OBS-URL: https://build.opensuse.org/request/show/451559
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=14
2017-01-20 09:04:04 +00:00
Dominique Leuenberger
65c8ae3fb1 Accepting request 434006 from science
1

OBS-URL: https://build.opensuse.org/request/show/434006
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=5
2016-10-10 14:25:05 +00:00
Martin Hauke
f667c3481a Accepting request 433980 from home:pluskalm:branches:science
- Use cmake macros
- Use ninja to speedup building

OBS-URL: https://build.opensuse.org/request/show/433980
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=12
2016-10-09 18:20:32 +00:00
Dominique Leuenberger
0758aa4a3e Accepting request 407813 from science
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/407813
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=4
2016-07-15 10:51:59 +00:00
Matthias Mailänder
89c9b90d01 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=10 2016-07-04 19:16:15 +00:00
Matthias Mailänder
b8c69dda68 Accepting request 406457 from home:mnhauke:branches:science
- Add patch: 0001-Fixes-357-broken-build-with-GCC-6.1.patch
  * Fix build with GCC 6.x

OBS-URL: https://build.opensuse.org/request/show/406457
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=9
2016-07-04 19:15:29 +00:00
Dominique Leuenberger
f489a8cc3a Accepting request 384540 from science
- 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 (forwarded request 384336 from pluskalm)

OBS-URL: https://build.opensuse.org/request/show/384540
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=3
2016-04-08 07:39:35 +00:00
Martin Hauke
9e05584cff Accepting request 384336 from home:pluskalm:branches:science
- 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

OBS-URL: https://build.opensuse.org/request/show/384336
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=7
2016-04-05 14:03:01 +00:00
Dominique Leuenberger
8e2d5fe9d5 Accepting request 341078 from science
1

OBS-URL: https://build.opensuse.org/request/show/341078
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=2
2015-10-28 16:30:39 +00:00
Dmitry Roshchin
9c962ad7ab Accepting request 341067 from home:mnhauke:opencl:stable
update to version 0.12

OBS-URL: https://build.opensuse.org/request/show/341067
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=5
2015-10-26 21:54:13 +00:00
Stephan Kulow
37eb05c642 Accepting request 314778 from science
OBS-URL: https://build.opensuse.org/request/show/314778
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pocl?expand=0&rev=1
2015-07-05 16:02:30 +00:00
Dmitry Roshchin
1692272803 Accepting request 314751 from home:dec16180:ldig:branches:science
license update: MIT
overall license is MIT, other licenses refere to build scripts only.

OBS-URL: https://build.opensuse.org/request/show/314751
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=3
2015-07-01 19:06:29 +00:00
Matthias Mailänder
6f3400860b OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=2 2015-06-10 18:42:42 +00:00
Matthias Mailänder
0c9543f837 Accepting request 311488 from home:mnhauke:opencl:stable
import pocl 0.11 to science:pocl

OBS-URL: https://build.opensuse.org/request/show/311488
OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=1
2015-06-10 18:42:22 +00:00
3 changed files with 0 additions and 219 deletions

View File

@ -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")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82314362552e050aff417318dd623b18cf0f1d0f84f92d10a7e3750dd12d3a9a
size 1928607

View File

@ -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;