Skip to content

Commit e4f0b96

Browse files
rafbielslrpabloal42and
authored
Require AdaptiveCpp >=24.06 and rename all hipSYCL references to AdaptiveCpp (uxlfoundation#699)
Co-authored-by: Pablo Lopez <pablo.lopez@codeplay.com> Co-authored-by: lrpablo <155004933+lrpablo@users.noreply.github.com> Co-authored-by: Andrey Alekseenko <al42and@gmail.com>
1 parent 984e910 commit e4f0b96

42 files changed

Lines changed: 118 additions & 128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,12 @@ else()
292292
# Find necessary packages
293293
if(ONEMATH_SYCL_IMPLEMENTATION)
294294
string( TOLOWER "${ONEMATH_SYCL_IMPLEMENTATION}" ONEMATH_SYCL_IMPLEMENTATION)
295-
if (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "hipsycl")
296-
message(STATUS "Looking for hipSYCL")
297-
find_package(hipSYCL CONFIG REQUIRED)
295+
if (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp")
296+
message(STATUS "Looking for AdaptiveCpp")
297+
find_package(AdaptiveCpp CONFIG REQUIRED)
298+
if (${AdaptiveCpp_VERSION} VERSION_LESS "24.6")
299+
message(FATAL_ERROR "AdaptiveCpp version 24.6 or higher is required but ${AdaptiveCpp_VERSION} was found")
300+
endif()
298301
set(USE_ADD_SYCL_TO_TARGET_INTEGRATION true)
299302
set (CMAKE_CXX_STANDARD 17)
300303
add_library(ONEMATH::SYCL::SYCL INTERFACE IMPORTED)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Supported domains include: BLAS, LAPACK, RNG, DFT, SPARSE_BLAS
175175
Supported compilers include:
176176
- [Intel(R) oneAPI DPC++ Compiler](https://software.intel.com/en-us/oneapi/dpc-compiler): Intel proprietary compiler that supports CPUs and Intel GPUs. Intel(R) oneAPI DPC++ Compiler will be referred to as "Intel DPC++" in the "Supported Compiler" column of the tables below.
177177
- [oneAPI DPC++ Compiler](https://github.com/intel/llvm): Open source compiler that supports CPUs and Intel, NVIDIA, and AMD GPUs. oneAPI DPC++ Compiler will be referred to as "Open DPC++" in the "Supported Compiler" column of the tables below.
178-
- [AdaptiveCpp Compiler](https://github.com/AdaptiveCpp/AdaptiveCpp) (formerly known as hipSYCL): Open source compiler that supports CPUs and Intel, NVIDIA, and AMD GPUs.</br>**Note**: The source code and some documents in this project still use the previous name hipSYCL during this transition period.
178+
- [AdaptiveCpp Compiler](https://github.com/AdaptiveCpp/AdaptiveCpp): Open source compiler that supports CPUs and Intel, NVIDIA, and AMD GPUs.
179179

180180
#### Linux*
181181

@@ -584,7 +584,7 @@ Product | Supported Version | License
584584
[Ninja](https://ninja-build.org/) | 1.10.0 | [Apache License v2.0](https://github.com/ninja-build/ninja/blob/master/COPYING)
585585
[GNU* FORTRAN Compiler](https://gcc.gnu.org/wiki/GFortran) | 7.4.0 or higher | [GNU General Public License, version 3](https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gfortran/Copying.html)
586586
[Intel(R) oneAPI DPC++ Compiler](https://software.intel.com/en-us/oneapi/dpc-compiler) | Latest | [End User License Agreement for the Intel(R) Software Development Products](https://software.intel.com/en-us/license/eula-for-intel-software-development-products)
587-
[AdaptiveCpp](https://github.com/AdaptiveCpp/AdaptiveCpp) | Later than [2cfa530](https://github.com/AdaptiveCpp/AdaptiveCpp/commit/2cfa5303fd88b8f84e539b5bb6ed41e49c6d6118) | [BSD-2-Clause License ](https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/LICENSE)
587+
[AdaptiveCpp](https://github.com/AdaptiveCpp/AdaptiveCpp) | 24.06 or higher | [BSD-2-Clause License ](https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/LICENSE)
588588
[oneAPI DPC++ Compiler binary for x86 CPU](https://github.com/intel/llvm/releases) | Daily builds | [Apache License v2](https://github.com/intel/llvm/blob/sycl/sycl/LICENSE.TXT)
589589
[oneAPI DPC++ Compiler source for NVIDIA and AMD GPUs](https://github.com/intel/llvm) | Daily source releases | [Apache License v2](https://github.com/intel/llvm/blob/sycl/sycl/LICENSE.TXT)
590590
[Intel(R) oneAPI Math Kernel Library](https://software.intel.com/en-us/oneapi/onemkl) | Latest | [Intel Simplified Software License](https://software.intel.com/en-us/license/intel-simplified-software-license)

cmake/FindcuRAND.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
find_package(CUDA 10.0 REQUIRED)
6060
get_filename_component(SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
6161

62-
if (NOT (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "hipsycl"))
62+
if (NOT (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp"))
6363
# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
6464
# the OpenCL include headers 1.2 onward is required. This is used to bypass NVIDIA OpenCL headers
6565
find_path(OPENCL_INCLUDE_DIR
@@ -79,7 +79,7 @@ find_package(Threads REQUIRED)
7979

8080
include(FindPackageHandleStandardArgs)
8181

82-
if (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "hipsycl")
82+
if (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp")
8383
find_package_handle_standard_args(cuRAND
8484
REQUIRED_VARS
8585
CUDA_TOOLKIT_INCLUDE

docs/building_the_project_with_adaptivecpp.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Environment Setup
1212
Build and install AdaptiveCpp. For a detailed description of available
1313
AdaptiveCpp backends, their dependencies, and installation, see the
1414
`AdaptiveCpp installation readme
15-
<https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/installing.md#compilation-flows>`_.
15+
<https://adaptivecpp.github.io/AdaptiveCpp/installing/>`_.
1616

1717
#.
1818
Clone this project. The root directory of the cloned repository will be
@@ -35,13 +35,13 @@ On Linux (other OSes are not supported with the AdaptiveCpp compiler):
3535
3636
# Inside <path to onemath>
3737
mkdir build && cd build
38-
cmake .. -DONEMATH_SYCL_IMPLEMENTATION=hipsycl \ # Indicate that AdaptiveCpp is being used.
39-
-DENABLE_MKLGPU_BACKEND=False \ # MKLGPU backend is not supported by AdaptiveCpp
40-
-DENABLE_<BACKEND_NAME>_BACKEND=True \ # Enable backend(s) (optional)
41-
-DENABLE_<BACKEND_NAME_2>_BACKEND=True \ # Multiple backends can be enabled at once.
42-
-DHIPSYCL_TARGETS=omp/;hip:gfx90a,gfx906 \ # Set target architectures depending on supported devices.
43-
-DBUILD_FUNCTIONAL_TESTS=False \ # See section *Building the tests* for more on building tests. True by default.
44-
-DBUILD_EXAMPLES=False # Optional: True by default.
38+
cmake .. -DONEMATH_SYCL_IMPLEMENTATION=adaptivecpp \ # Indicate that AdaptiveCpp is being used.
39+
-DENABLE_MKLGPU_BACKEND=False \ # MKLGPU backend is not supported by AdaptiveCpp
40+
-DENABLE_<BACKEND_NAME>_BACKEND=True \ # Enable backend(s) (optional)
41+
-DENABLE_<BACKEND_NAME_2>_BACKEND=True \ # Multiple backends can be enabled at once.
42+
-DACPP_TARGETS=omp\;hip:gfx90a,gfx906 \ # Set target architectures depending on supported devices.
43+
-DBUILD_FUNCTIONAL_TESTS=False \ # See section *Building the tests* for more on building tests. True by default.
44+
-DBUILD_EXAMPLES=False # Optional: True by default.
4545
cmake --build .
4646
cmake --install . --prefix <path_to_install_dir> # required to have full package structure
4747
@@ -53,9 +53,9 @@ configurations table
5353
<https://github.com/uxlfoundation/oneMath?tab=readme-ov-file#supported-configurations>`_,
5454
and the CMake option names are given in the table below. Some backends may
5555
require additional parameters to be set. See the relevant section below for
56-
additional guidance. The target architectures must be specified with
57-
``HIP_TARGETS``. See the `AdaptiveCpp documentation
58-
<https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/using-hipsycl.md#adaptivecpp-targets-specification>`_.
56+
additional guidance. The target architectures may be specified with ``ACPP_TARGETS``,
57+
otherwise the ``generic`` target is used. See the `AdaptiveCpp documentation
58+
<https://adaptivecpp.github.io/AdaptiveCpp/using-acpp/#adaptivecpp-targets-specification>`_.
5959

6060
If a backend library supports multiple domains (i.e. BLAS, DFT, RNG), it may be
6161
desirable to only enable selected domains. For this, the ``TARGET_DOMAINS``
@@ -129,14 +129,14 @@ Building for CUDA
129129
The CUDA backends can be enabled with ``ENABLE_CUBLAS_BACKEND``,
130130
``ENABLE_CUFFT_BACKEND`` and ``ENABLE_CURAND_BACKEND``.
131131

132-
The target architecture must be set using the ``HIPSYCL_TARGETS`` parameter. For
132+
The target architecture may be specified using the ``ACPP_TARGETS`` parameter. For
133133
example, to target a Nvidia A100 (Ampere architecture), set
134-
``-DHIPSYCL_TARGETS=cuda:sm_80``, where the figure ``80`` corresponds to a CUDA
134+
``-DACPP_TARGETS=cuda:sm_80``, where the figure ``80`` corresponds to a CUDA
135135
compute capability of 8.0. The correspondence between compute capabilities and
136136
Nvidia GPU products is given on the `Nvidia website
137137
<https://developer.nvidia.com/cuda-gpus>`_. Multiple architectures can be
138138
enabled using a comma separated list. See the `AdaptiveCpp documentation
139-
<https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/using-hipsycl.md#adaptivecpp-targets-specification>`_.
139+
<https://adaptivecpp.github.io/AdaptiveCpp/using-acpp/#adaptivecpp-targets-specification>`_.
140140

141141
No additional parameters are required for using CUDA libraries. In most cases,
142142
the CUDA libraries should be found automatically by CMake.
@@ -149,13 +149,13 @@ Building for ROCm
149149
The ROCm backends can be enabled with ``ENABLE_ROCBLAS_BACKEND``,
150150
``ENABLE_ROCFFT_BACKEND`` and ``ENABLE_ROCRAND_BACKEND``.
151151

152-
The target architecture must be set using the ``HIPSYCL_TARGETS`` parameter. See
152+
The target architecture may be specified using the ``ACPP_TARGETS`` parameter. See
153153
the `AdaptiveCpp documentation
154-
<https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/using-hipsycl.md#adaptivecpp-targets-specification>`_.
155-
For example, to target the MI200 series, set ``-DHIPSYCL_TARGETS=hip:gfx90a``.
154+
<https://adaptivecpp.github.io/AdaptiveCpp/using-acpp/#adaptivecpp-targets-specification>`_.
155+
For example, to target the MI200 series, set ``-DACPP_TARGETS=hip:gfx90a``.
156156
Multiple architectures can be enabled using a comma separated list. For example,
157-
``-DHIPSYCL_TARGETS=hip:gfx906,gfx90a``, and multiple APIs with a semicolon
158-
(``-DHIPSYCL_TARGETS=omp\;hip:gfx906,gfx90a``).
157+
``-DACPP_TARGETS=hip:gfx906,gfx90a``, and multiple APIs with a semicolon
158+
(``-DACPP_TARGETS=omp\;hip:gfx906,gfx90a``).
159159

160160
For common AMD GPU architectures, see the :ref:`build_for_ROCM_dpcpp` in the
161161
DPC++ build guide.

docs/building_the_project_with_dpcpp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ When building oneMath the SYCL implementation can be specified by setting the
356356
* ``dpc++`` (default) for the `Intel(R) oneAPI DPC++ Compiler
357357
<https://software.intel.com/en-us/oneapi/dpc-compiler>`_ and for the `oneAPI
358358
DPC++ Compiler <https://github.com/intel/llvm>`_ compilers.
359-
* ``hipsycl`` for the `AdaptiveCpp <https://github.com/illuhad/AdaptiveCpp>`_
359+
* ``AdaptiveCpp`` for the `AdaptiveCpp <https://github.com/AdaptiveCpp/AdaptiveCpp>`_
360360
SYCL implementation.
361361
Please see :ref:`building_the_project_with_adaptivecpp` if using this option.
362362

docs/selecting_a_compiler.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ application.
99
* If your application requires Intel GPU, use
1010
`Intel(R) oneAPI DPC++ Compiler <https://software.intel.com/en-us/oneapi/dpc-compiler>`_ ``icpx`` on Linux or ``icx`` on Windows.
1111
* If your Linux application requires NVIDIA GPU, build ``clang++`` from the latest source of
12-
`oneAPI DPC++ Compiler <https://github.com/intel/llvm>`_ with `support for NVIDIA CUDA <https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-nvidia-cuda>`_ or use ``hipSYCL`` from the `hipSYCL repository <https://github.com/illuhad/hipSYCL>`_ (except for LAPACK domain).
13-
* If your Linux application requires AMD GPU, build ``clang++`` from the latest source of `oneAPI DPC++ Compiler <https://github.com/intel/llvm>`_ with `support for HIP AMD <https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-hip-amd>`_ or use ``hipSYCL``.
12+
`oneAPI DPC++ Compiler <https://github.com/intel/llvm>`_ with `support for NVIDIA CUDA <https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-nvidia-cuda>`_ or use ``AdaptiveCpp`` from the `AdaptiveCpp repository <https://github.com/AdaptiveCpp/AdaptiveCpp>`_ (except for LAPACK or DFT domains).
13+
* If your Linux application requires AMD GPU, build ``clang++`` from the latest source of `oneAPI DPC++ Compiler <https://github.com/intel/llvm>`_ with `support for HIP AMD <https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain-with-support-for-hip-amd>`_ or use ``AdaptiveCpp``.
1414
* If no Intel GPU, NVIDIA GPU, or AMD GPU is required, on Linux you can use
1515
`Intel(R) oneAPI DPC++ Compiler <https://software.intel.com/en-us/oneapi/dpc-compiler>`_
16-
``icpx``, `oneAPI DPC++ Compiler <https://github.com/intel/llvm/releases>`_ ``clang++``, or ``hipSYCL``,
16+
``icpx``, `oneAPI DPC++ Compiler <https://github.com/intel/llvm/releases>`_ ``clang++``, or ``AdaptiveCpp``,
1717
and on Windows you can use either
1818
`Intel(R) oneAPI DPC++ Compiler <https://software.intel.com/en-us/oneapi/dpc-compiler>`_
1919
``icx`` or `oneAPI DPC++ Compiler <https://github.com/intel/llvm/releases>`_ ``clang-cl``.

examples/rng/device/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ endif()
6363

6464
target_link_libraries(${EXAMPLE_TARGET} PUBLIC ONEMATH::SYCL::SYCL)
6565

66-
if(NOT ${ONEMATH_SYCL_IMPLEMENTATION} STREQUAL "hipsycl")
66+
if(NOT ${ONEMATH_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp")
6767
# set strict warning flags for rng device API examples
6868
target_compile_options(${EXAMPLE_TARGET} PUBLIC -Wall -Werror -Wextra -Wpedantic -Wunreachable-code -Wfloat-conversion -Wextra-semi -Wshadow)
6969
target_link_options(${EXAMPLE_TARGET} PUBLIC -fsycl -fsycl-device-code-split=per_kernel)

examples/rng/device/include/rng_example_helper.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,12 @@ struct has_member_code_meta<T, std::void_t<decltype(std::declval<T>().get_multi_
2929

3030
template <typename T, typename std::enable_if<has_member_code_meta<T>::value>::type* = nullptr>
3131
auto get_multi_ptr(T acc) {
32-
// Workaround for AdaptiveCPP, as they do not yet support the get_multi_ptr function
33-
#ifndef __HIPSYCL__
3432
return acc.get_multi_ptr();
35-
#else
36-
return acc.get_pointer();
37-
#endif
3833
}
3934

4035
template <typename T, typename std::enable_if<!has_member_code_meta<T>::value>::type* = nullptr>
4136
auto get_multi_ptr(T acc) {
42-
// Workaround for AdaptiveCPP, as they do not yet support the get_multi_ptr function
43-
#ifndef __HIPSYCL__
4437
return acc.template get_multi_ptr<sycl::access::decorated::yes>();
45-
#else
46-
return acc.get_pointer();
47-
#endif
4838
}
4939

5040
#endif // _RNG_EXAMPLE_HELPER_HPP__

include/oneapi/math/detail/backend_selector_predicates.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ inline void backend_selector_precondition(sycl::queue&) {}
4040
template <>
4141
inline void backend_selector_precondition<backend::netlib>(sycl::queue& queue) {
4242
#ifndef ONEMATH_DISABLE_PREDICATES
43-
#ifdef __HIPSYCL__
43+
#ifdef __ADAPTIVECPP__
4444
if (!(queue.is_host() || queue.get_device().is_cpu())) {
4545
#else
4646
if (!queue.get_device().is_cpu()) {
@@ -55,7 +55,7 @@ inline void backend_selector_precondition<backend::netlib>(sycl::queue& queue) {
5555
template <>
5656
inline void backend_selector_precondition<backend::mklcpu>(sycl::queue& queue) {
5757
#ifndef ONEMATH_DISABLE_PREDICATES
58-
#ifdef __HIPSYCL__
58+
#ifdef __ADAPTIVECPP__
5959
if (!(queue.is_host() || queue.get_device().is_cpu())) {
6060
#else
6161
if (!queue.get_device().is_cpu()) {
@@ -70,7 +70,7 @@ inline void backend_selector_precondition<backend::mklcpu>(sycl::queue& queue) {
7070
template <>
7171
inline void backend_selector_precondition<backend::armpl>(sycl::queue& queue) {
7272
#ifndef ONEMKL_DISABLE_PREDICATES
73-
#ifdef __HIPSYCL__
73+
#ifdef __ADAPTIVECPP__
7474
if (!(queue.is_host() || queue.get_device().is_cpu())) {
7575
#else
7676
if (!queue.get_device().is_cpu()) {

include/oneapi/math/detail/get_device_id.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#define INTEL_ID 32902
3333
#define NVIDIA_ID 4318
34-
#ifndef __HIPSYCL__
34+
#ifndef __ADAPTIVECPP__
3535
#define AMD_ID 4098
3636
#else
3737
#define AMD_ID 1022
@@ -45,14 +45,14 @@ inline oneapi::math::device get_device_id(sycl::queue& queue) {
4545
#ifdef __x86_64__
4646
if (queue.get_device().is_cpu())
4747
device_id = device::x86cpu;
48-
#ifdef __HIPSYCL__
48+
#ifdef __ADAPTIVECPP__
4949
else if (queue.is_host())
5050
device_id = device::x86cpu;
5151
#endif
5252
#elif __aarch64__
5353
if (queue.get_device().is_cpu())
5454
device_id = device::aarch64cpu;
55-
#ifdef __HIPSYCL__
55+
#ifdef __ADAPTIVECPP__
5656
else if (queue.is_host())
5757
device_id = device::aarch64cpu;
5858
#endif

0 commit comments

Comments
 (0)