diff --git a/CMakeLists.txt b/CMakeLists.txt index 79af06f6a..22a264f44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,9 +273,9 @@ else() # Find necessary packages if(ONEMKL_SYCL_IMPLEMENTATION) string( TOLOWER "${ONEMKL_SYCL_IMPLEMENTATION}" ONEMKL_SYCL_IMPLEMENTATION) - if (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "hipsycl") - message(STATUS "Looking for hipSYCL") - find_package(hipSYCL CONFIG REQUIRED) + if (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp") + message(STATUS "Looking for AdaptiveCpp") + find_package(AdaptiveCpp CONFIG REQUIRED) set(USE_ADD_SYCL_TO_TARGET_INTEGRATION true) set (CMAKE_CXX_STANDARD 17) add_library(ONEMKL::SYCL::SYCL INTERFACE IMPORTED) diff --git a/cmake/FindcuRAND.cmake b/cmake/FindcuRAND.cmake index df353077c..02af5b7fc 100644 --- a/cmake/FindcuRAND.cmake +++ b/cmake/FindcuRAND.cmake @@ -59,7 +59,7 @@ find_package(CUDA 10.0 REQUIRED) get_filename_component(SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY) -if (NOT (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "hipsycl")) +if (NOT (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp")) # the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++ # the OpenCL include headers 1.2 onward is required. This is used to bypass NVIDIA OpenCL headers find_path(OPENCL_INCLUDE_DIR CL/cl.h OpenCL/cl.h @@ -76,7 +76,7 @@ find_package(Threads REQUIRED) include(FindPackageHandleStandardArgs) -if (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "hipsycl") +if (ONEMKL_SYCL_IMPLEMENTATION STREQUAL "adaptivecpp") find_package_handle_standard_args(cuRAND REQUIRED_VARS CUDA_TOOLKIT_INCLUDE diff --git a/docs/building_the_project_with_adaptivecpp.rst b/docs/building_the_project_with_adaptivecpp.rst index 98c763b90..c49a6f107 100644 --- a/docs/building_the_project_with_adaptivecpp.rst +++ b/docs/building_the_project_with_adaptivecpp.rst @@ -35,13 +35,13 @@ On Linux (other OSes are not supported with the AdaptiveCpp compiler): # Inside mkdir build && cd build - cmake .. -DONEMKL_SYCL_IMPLEMENTATION=hipsycl \ # Indicate that AdaptiveCpp is being used. - -DENABLE_MKLGPU_BACKEND=False \ # MKLGPU backend is not supported by AdaptiveCpp - -DENABLE__BACKEND=True \ # Enable backend(s) (optional) - -DENABLE__BACKEND=True \ # Multiple backends can be enabled at once. - -DHIPSYCL_TARGETS=omp/;hip:gfx90a,gfx906 \ # Set target architectures depending on supported devices. - -DBUILD_FUNCTIONAL_TESTS=False \ # See section *Building the tests* for more on building tests. True by default. - -DBUILD_EXAMPLES=False # Optional: True by default. + cmake .. -DONEMKL_SYCL_IMPLEMENTATION=adaptivecpp \ # Indicate that AdaptiveCpp is being used. + -DENABLE_MKLGPU_BACKEND=False \ # MKLGPU backend is not supported by AdaptiveCpp + -DENABLE__BACKEND=True \ # Enable backend(s) (optional) + -DENABLE__BACKEND=True \ # Multiple backends can be enabled at once. + -DACPP_TARGETS=omp\;hip:gfx90a,gfx906 \ # Set target architectures depending on supported devices. + -DBUILD_FUNCTIONAL_TESTS=False \ # See section *Building the tests* for more on building tests. True by default. + -DBUILD_EXAMPLES=False # Optional: True by default. cmake --build . cmake --install . --prefix # required to have full package structure diff --git a/docs/building_the_project_with_dpcpp.rst b/docs/building_the_project_with_dpcpp.rst index 365028237..e31a22bda 100644 --- a/docs/building_the_project_with_dpcpp.rst +++ b/docs/building_the_project_with_dpcpp.rst @@ -305,7 +305,7 @@ When building oneMKL the SYCL implementation can be specified by setting the * ``dpc++`` (default) for the `Intel(R) oneAPI DPC++ Compiler `_ and for the `oneAPI DPC++ Compiler `_ compilers. -* ``hipsycl`` for the `AdaptiveCpp `_ +* ``AdaptiveCpp`` for the `AdaptiveCpp `_ SYCL implementation. Please see :ref:`building_the_project_with_adaptivecpp` if using this option. diff --git a/docs/selecting_a_compiler.rst b/docs/selecting_a_compiler.rst index 8c09e60b4..485d0d151 100644 --- a/docs/selecting_a_compiler.rst +++ b/docs/selecting_a_compiler.rst @@ -9,11 +9,11 @@ application. * If your application requires Intel GPU, use `Intel(R) oneAPI DPC++ Compiler `_ ``icpx`` on Linux or ``icx`` on Windows. * If your Linux application requires NVIDIA GPU, build ``clang++`` from the latest source of - `oneAPI DPC++ Compiler `_ with `support for NVIDIA CUDA `_ or use ``hipSYCL`` from the `hipSYCL repository `_ (except for LAPACK domain). -* If your Linux application requires AMD GPU, build ``clang++`` from the latest source of `oneAPI DPC++ Compiler `_ with `support for HIP AMD `_ or use ``hipSYCL``. + `oneAPI DPC++ Compiler `_ with `support for NVIDIA CUDA `_ or use ``AdaptiveCpp`` from the `AdaptiveCpp repository `_ (except for LAPACK or DFT domains). +* If your Linux application requires AMD GPU, build ``clang++`` from the latest source of `oneAPI DPC++ Compiler `_ with `support for HIP AMD `_ or use ``AdaptiveCpp``. * If no Intel GPU, NVIDIA GPU, or AMD GPU is required, on Linux you can use `Intel(R) oneAPI DPC++ Compiler `_ - ``icpx``, `oneAPI DPC++ Compiler `_ ``clang++``, or ``hipSYCL``, + ``icpx``, `oneAPI DPC++ Compiler `_ ``clang++``, or ``AdaptiveCpp``, and on Windows you can use either `Intel(R) oneAPI DPC++ Compiler `_ ``icx`` or `oneAPI DPC++ Compiler `_ ``clang-cl``. diff --git a/examples/rng/device/CMakeLists.txt b/examples/rng/device/CMakeLists.txt index 1b6ecf2dd..deca06212 100644 --- a/examples/rng/device/CMakeLists.txt +++ b/examples/rng/device/CMakeLists.txt @@ -59,7 +59,7 @@ foreach(rng_device_source ${RNG_DEVICE_SOURCES}) ONEMKL::SYCL::SYCL ) - if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") + if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_link_options(example_${domain}_${rng_device_source} PUBLIC -fsycl -fsycl-device-code-split=per_kernel) endif() diff --git a/examples/rng/device/include/rng_example_helper.hpp b/examples/rng/device/include/rng_example_helper.hpp index 0bcf114b4..ad0fdea03 100644 --- a/examples/rng/device/include/rng_example_helper.hpp +++ b/examples/rng/device/include/rng_example_helper.hpp @@ -29,22 +29,12 @@ struct has_member_code_meta().get_multi_ template ::value>::type* = nullptr> auto get_multi_ptr(T acc) { -// Workaround for AdaptiveCPP, as they do not yet support the get_multi_ptr function -#ifndef __HIPSYCL__ return acc.get_multi_ptr(); -#else - return acc.get_pointer(); -#endif }; template ::value>::type* = nullptr> auto get_multi_ptr(T acc) { -// Workaround for AdaptiveCPP, as they do not yet support the get_multi_ptr function -#ifndef __HIPSYCL__ return acc.template get_multi_ptr(); -#else - return acc.get_pointer(); -#endif }; #endif // _RNG_EXAMPLE_HELPER_HPP__ diff --git a/include/oneapi/mkl/detail/backend_selector_predicates.hpp b/include/oneapi/mkl/detail/backend_selector_predicates.hpp index 4ee3f3bb1..f83fa695f 100644 --- a/include/oneapi/mkl/detail/backend_selector_predicates.hpp +++ b/include/oneapi/mkl/detail/backend_selector_predicates.hpp @@ -40,7 +40,7 @@ inline void backend_selector_precondition(sycl::queue&) {} template <> inline void backend_selector_precondition(sycl::queue& queue) { #ifndef ONEMKL_DISABLE_PREDICATES -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ if (!(queue.is_host() || queue.get_device().is_cpu())) { #else if (!queue.get_device().is_cpu()) { @@ -55,7 +55,7 @@ inline void backend_selector_precondition(sycl::queue& queue) { template <> inline void backend_selector_precondition(sycl::queue& queue) { #ifndef ONEMKL_DISABLE_PREDICATES -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ if (!(queue.is_host() || queue.get_device().is_cpu())) { #else if (!queue.get_device().is_cpu()) { diff --git a/include/oneapi/mkl/detail/get_device_id.hpp b/include/oneapi/mkl/detail/get_device_id.hpp index 88b235754..e9fbe484a 100644 --- a/include/oneapi/mkl/detail/get_device_id.hpp +++ b/include/oneapi/mkl/detail/get_device_id.hpp @@ -31,7 +31,7 @@ #define INTEL_ID 32902 #define NVIDIA_ID 4318 -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #define AMD_ID 4098 #else #define AMD_ID 1022 @@ -44,7 +44,7 @@ inline oneapi::mkl::device get_device_id(sycl::queue &queue) { oneapi::mkl::device device_id; if (queue.get_device().is_cpu()) device_id = device::x86cpu; -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ else if (queue.is_host()) device_id = device::x86cpu; #endif diff --git a/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp b/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp index 8f1294ac2..36414d8ea 100644 --- a/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp +++ b/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp @@ -53,9 +53,9 @@ constexpr sycl::vec select_vector_a_mcg31m1() { UINT64_C(650347998) }); } -// hipSYCL (AdaptiveCpp) doesn't support constexpr sycl::vec constructor -// that's why in case of hipSYCL backend sycl::vec is created as a local variable -#ifndef __HIPSYCL__ +// AdaptiveCpp (hipSYCL) doesn't support constexpr sycl::vec constructor +// that's why in case of AdaptiveCpp backend sycl::vec is created as a local variable +#ifndef __ADAPTIVECPP__ template struct mcg31m1_vector_a { static constexpr sycl::vec vector_a = @@ -154,12 +154,7 @@ static inline sycl::vec generate( engine_state>& state) { sycl::vec x(state.s); sycl::vec res; -#ifndef __HIPSYCL__ res = custom_mod(mcg31m1_vector_a::vector_a * x); -#else - // a workaround for hipSYCL (AdaptiveCpp) - res = custom_mod(select_vector_a_mcg31m1() * x); -#endif state.s = custom_mod(mcg31m1_param::a * static_cast(res[VecSize - 1])); return res; diff --git a/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp b/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp index bc21eb607..36c289f35 100644 --- a/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp +++ b/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp @@ -54,9 +54,9 @@ constexpr sycl::vec select_vector_a_mcg59() { UINT64_C(0x58145D06A37D795) }); } -// hipSYCL (AdaptiveCpp) doesn't support constexpr sycl::vec constructor -// that's why in case of hipSYCL backend sycl::vec is created as a local variable -#ifndef __HIPSYCL__ +// AdaptiveCpp (hipSYCL) doesn't support constexpr sycl::vec constructor +// that's why in case of AdaptiveCpp backend sycl::vec is created as a local variable +#ifndef __ADAPTIVECPP__ template struct mcg59_vector_a { static constexpr sycl::vec vector_a = @@ -123,12 +123,7 @@ template static inline sycl::vec generate( engine_state>& state) { sycl::vec res(state.s); -#ifndef __HIPSYCL__ res = custom_mod(mcg59_vector_a::vector_a * res); -#else - // a workaround for hipSYCL (AdaptiveCpp) - res = custom_mod(select_vector_a_mcg59() * res); -#endif state.s = custom_mod(mcg59_param::a * res[VecSize - 1]); return res; } diff --git a/include/oneapi/mkl/types.hpp b/include/oneapi/mkl/types.hpp index 32d336e11..aa73d823e 100644 --- a/include/oneapi/mkl/types.hpp +++ b/include/oneapi/mkl/types.hpp @@ -20,7 +20,7 @@ #ifndef _ONEMKL_TYPES_HPP_ #define _ONEMKL_TYPES_HPP_ -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ #include "oneapi/mkl/bfloat16.hpp" #endif @@ -33,7 +33,7 @@ namespace oneapi { namespace mkl { -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ using bfloat16 = sycl::ext::oneapi::bfloat16; #endif diff --git a/src/blas/backends/cublas/CMakeLists.txt b/src/blas/backends/cublas/CMakeLists.txt index b64e7c37d..18fd69b91 100644 --- a/src/blas/backends/cublas/CMakeLists.txt +++ b/src/blas/backends/cublas/CMakeLists.txt @@ -26,7 +26,7 @@ set(SOURCES cublas_level1.cpp cublas_batch.cpp cublas_extensions.cpp $<$:cublas_scope_handle.cpp > - $<$:cublas_scope_handle_hipsycl.cpp > + $<$:cublas_scope_handle_adaptivecpp.cpp > $<$: cublas_wrappers.cpp>) add_library(${LIB_NAME}) add_library(${LIB_OBJ} OBJECT ${SOURCES}) @@ -40,7 +40,7 @@ target_include_directories(${LIB_OBJ} ) target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT}) -if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") +if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_compile_options(ONEMKL::SYCL::SYCL INTERFACE -fsycl-targets=nvptx64-nvidia-cuda -fsycl-unnamed-lambda) target_link_options(ONEMKL::SYCL::SYCL INTERFACE diff --git a/src/blas/backends/cublas/cublas_scope_handle_hipsycl.cpp b/src/blas/backends/cublas/cublas_scope_handle_adaptivecpp.cpp similarity index 97% rename from src/blas/backends/cublas/cublas_scope_handle_hipsycl.cpp rename to src/blas/backends/cublas/cublas_scope_handle_adaptivecpp.cpp index 20675c212..0cb237b1d 100644 --- a/src/blas/backends/cublas/cublas_scope_handle_hipsycl.cpp +++ b/src/blas/backends/cublas/cublas_scope_handle_adaptivecpp.cpp @@ -16,7 +16,7 @@ * limitations under the License. * **************************************************************************/ -#include "cublas_scope_handle_hipsycl.hpp" +#include "cublas_scope_handle_adaptivecpp.hpp" #include "cublas_handle.hpp" namespace oneapi { @@ -71,4 +71,4 @@ CUstream CublasScopedContextHandler::get_stream(const sycl::queue &queue) { } // namespace cublas } // namespace blas } // namespace mkl -} // namespace oneapi \ No newline at end of file +} // namespace oneapi diff --git a/src/blas/backends/cublas/cublas_scope_handle_hipsycl.hpp b/src/blas/backends/cublas/cublas_scope_handle_adaptivecpp.hpp similarity index 100% rename from src/blas/backends/cublas/cublas_scope_handle_hipsycl.hpp rename to src/blas/backends/cublas/cublas_scope_handle_adaptivecpp.hpp diff --git a/src/blas/backends/cublas/cublas_task.hpp b/src/blas/backends/cublas/cublas_task.hpp index e5cf0d7c2..068cac8a4 100644 --- a/src/blas/backends/cublas/cublas_task.hpp +++ b/src/blas/backends/cublas/cublas_task.hpp @@ -30,7 +30,7 @@ #include #endif #include "oneapi/mkl/types.hpp" -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #include "cublas_scope_handle.hpp" #if __has_include() #include @@ -38,7 +38,7 @@ #include #endif #else -#include "cublas_scope_handle_hipsycl.hpp" +#include "cublas_scope_handle_adaptivecpp.hpp" namespace sycl { using interop_handler = sycl::interop_handle; } @@ -48,10 +48,10 @@ namespace mkl { namespace blas { namespace cublas { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ template static inline void host_task_internal(H &cgh, sycl::queue queue, F f) { - cgh.hipSYCL_enqueue_custom_operation([f, queue](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([f, queue](sycl::interop_handle ih) { auto sc = CublasScopedContextHandler(queue, ih); f(sc); }); diff --git a/src/blas/backends/rocblas/CMakeLists.txt b/src/blas/backends/rocblas/CMakeLists.txt index 76dc126ad..f51a8e790 100644 --- a/src/blas/backends/rocblas/CMakeLists.txt +++ b/src/blas/backends/rocblas/CMakeLists.txt @@ -31,7 +31,7 @@ set(SOURCES rocblas_level1.cpp rocblas_batch.cpp rocblas_extensions.cpp $<$:rocblas_scope_handle.cpp > - $<$:rocblas_scope_handle_hipsycl.cpp > + $<$:rocblas_scope_handle_adaptivecpp.cpp > $<$: rocblas_wrappers.cpp>) add_library(${LIB_NAME}) add_library(${LIB_OBJ} OBJECT ${SOURCES}) @@ -45,7 +45,7 @@ target_include_directories(${LIB_OBJ} ${ONEMKL_GENERATED_INCLUDE_PATH} ) -if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") +if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT}) target_compile_options(ONEMKL::SYCL::SYCL INTERFACE -fsycl-targets=amdgcn-amd-amdhsa -fsycl-unnamed-lambda diff --git a/src/blas/backends/rocblas/rocblas_scope_handle_hipsycl.cpp b/src/blas/backends/rocblas/rocblas_scope_handle_adaptivecpp.cpp similarity index 98% rename from src/blas/backends/rocblas/rocblas_scope_handle_hipsycl.cpp rename to src/blas/backends/rocblas/rocblas_scope_handle_adaptivecpp.cpp index da9791411..1f0b996bc 100644 --- a/src/blas/backends/rocblas/rocblas_scope_handle_hipsycl.cpp +++ b/src/blas/backends/rocblas/rocblas_scope_handle_adaptivecpp.cpp @@ -19,7 +19,7 @@ * **************************************************************************/ -#include "rocblas_scope_handle_hipsycl.hpp" +#include "rocblas_scope_handle_adaptivecpp.hpp" namespace oneapi { namespace mkl { @@ -91,4 +91,4 @@ hipStream_t RocblasScopedContextHandler::get_stream(const sycl::queue &queue) { } // namespace rocblas } // namespace blas } // namespace mkl -} // namespace oneapi \ No newline at end of file +} // namespace oneapi diff --git a/src/blas/backends/rocblas/rocblas_task.hpp b/src/blas/backends/rocblas/rocblas_task.hpp index 94e2b2b4a..ca2e48fe5 100644 --- a/src/blas/backends/rocblas/rocblas_task.hpp +++ b/src/blas/backends/rocblas/rocblas_task.hpp @@ -28,7 +28,7 @@ #include #endif #include "oneapi/mkl/types.hpp" -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #include "rocblas_scope_handle.hpp" #if __has_include() #include @@ -36,7 +36,7 @@ #include #endif #else -#include "rocblas_scope_handle_hipsycl.hpp" +#include "rocblas_scope_handle_adaptivecpp.hpp" #endif namespace oneapi { @@ -44,10 +44,10 @@ namespace mkl { namespace blas { namespace rocblas { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ template static inline void host_task_internal(H &cgh, sycl::queue queue, F f) { - cgh.hipSYCL_enqueue_custom_operation([f, queue](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([f, queue](sycl::interop_handle ih) { auto sc = RocblasScopedContextHandler(queue, ih); f(sc); }); diff --git a/src/rng/backends/curand/curand_task.hpp b/src/rng/backends/curand/curand_task.hpp index adc08b840..85541c91d 100644 --- a/src/rng/backends/curand/curand_task.hpp +++ b/src/rng/backends/curand/curand_task.hpp @@ -13,10 +13,10 @@ namespace oneapi { namespace mkl { namespace rng { namespace curand { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ template static inline void host_task_internal(H &cgh, A acc, E e, F f) { - cgh.hipSYCL_enqueue_custom_operation([=](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([=](sycl::interop_handle ih) { curandStatus_t status; CURAND_CALL(curandSetStream, status, e, ih.get_native_queue()); auto r_ptr = @@ -27,7 +27,7 @@ static inline void host_task_internal(H &cgh, A acc, E e, F f) { template static inline void host_task_internal(H &cgh, E e, F f) { - cgh.hipSYCL_enqueue_custom_operation([=](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([=](sycl::interop_handle ih) { curandStatus_t status; CURAND_CALL(curandSetStream, status, e, ih.get_native_queue()); f(ih); diff --git a/src/rng/backends/curand/mrg32k3a.cpp b/src/rng/backends/curand/mrg32k3a.cpp index dd44f4def..1e9717e6c 100644 --- a/src/rng/backends/curand/mrg32k3a.cpp +++ b/src/rng/backends/curand/mrg32k3a.cpp @@ -61,7 +61,7 @@ #else #include #endif -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #if __has_include() #if __SYCL_COMPILER_VERSION <= 20220930 #include diff --git a/src/rng/backends/curand/philox4x32x10.cpp b/src/rng/backends/curand/philox4x32x10.cpp index c3d4393d2..11d19aa25 100644 --- a/src/rng/backends/curand/philox4x32x10.cpp +++ b/src/rng/backends/curand/philox4x32x10.cpp @@ -61,7 +61,7 @@ #else #include #endif -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #if __has_include() #if __SYCL_COMPILER_VERSION <= 20220930 #include diff --git a/src/rng/backends/mklcpu/cpu_common.hpp b/src/rng/backends/mklcpu/cpu_common.hpp index cbd6cae59..6368fcdef 100644 --- a/src/rng/backends/mklcpu/cpu_common.hpp +++ b/src/rng/backends/mklcpu/cpu_common.hpp @@ -58,12 +58,7 @@ class kernel_name_usm {}; template typename Acc::value_type *get_raw_ptr(Acc acc) { -// Workaround for AdaptiveCPP, as they do not yet support the get_multi_ptr function -#ifndef __HIPSYCL__ return acc.template get_multi_ptr().get_raw(); -#else - return acc.get_pointer(); -#endif } } // namespace mklcpu diff --git a/src/rng/backends/rocrand/mrg32k3a.cpp b/src/rng/backends/rocrand/mrg32k3a.cpp index 424f14caf..ea813fc8b 100644 --- a/src/rng/backends/rocrand/mrg32k3a.cpp +++ b/src/rng/backends/rocrand/mrg32k3a.cpp @@ -63,7 +63,7 @@ #else #include #endif -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #if __has_include() #include #else diff --git a/src/rng/backends/rocrand/philox4x32x10.cpp b/src/rng/backends/rocrand/philox4x32x10.cpp index 5bc241360..a4dea5c76 100644 --- a/src/rng/backends/rocrand/philox4x32x10.cpp +++ b/src/rng/backends/rocrand/philox4x32x10.cpp @@ -63,7 +63,7 @@ #else #include #endif -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #if __has_include() #include #else diff --git a/src/rng/backends/rocrand/rocrand_task.hpp b/src/rng/backends/rocrand/rocrand_task.hpp index 2588dc901..6f8b2c7a7 100644 --- a/src/rng/backends/rocrand/rocrand_task.hpp +++ b/src/rng/backends/rocrand/rocrand_task.hpp @@ -13,10 +13,10 @@ namespace oneapi { namespace mkl { namespace rng { namespace rocrand { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ template static inline void host_task_internal(H &cgh, A acc, E e, F f) { - cgh.hipSYCL_enqueue_custom_operation([=](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([=](sycl::interop_handle ih) { rocrand_status status; ROCRAND_CALL(rocrand_set_stream, status, e, ih.get_native_queue()); auto r_ptr = @@ -27,7 +27,7 @@ static inline void host_task_internal(H &cgh, A acc, E e, F f) { template static inline void host_task_internal(H &cgh, E e, F f) { - cgh.hipSYCL_enqueue_custom_operation([=](sycl::interop_handle ih) { + cgh.AdaptiveCpp_enqueue_custom_operation([=](sycl::interop_handle ih) { rocrand_status status; ROCRAND_CALL(rocrand_set_stream, status, e, ih.get_native_queue()); f(ih); diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt index e7fe8e110..081e5d868 100644 --- a/tests/unit_tests/CMakeLists.txt +++ b/tests/unit_tests/CMakeLists.txt @@ -96,7 +96,7 @@ foreach(domain ${TARGET_DOMAINS}) if(BUILD_SHARED_LIBS) add_executable(test_main_${domain}_rt main_test.cpp) target_include_directories(test_main_${domain}_rt PUBLIC ${GTEST_INCLUDE_DIR}) - if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") + if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_compile_options(test_main_${domain}_rt PRIVATE -fsycl) endif() target_link_libraries(test_main_${domain}_rt PUBLIC @@ -189,7 +189,7 @@ foreach(domain ${TARGET_DOMAINS}) ${${domain}_DEVICE_TEST_LIST_CT} ) - if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") + if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_link_options(test_main_${domain}_ct PUBLIC -fsycl-device-code-split=per_kernel) endif() diff --git a/tests/unit_tests/include/test_helper.hpp b/tests/unit_tests/include/test_helper.hpp index 7e0024195..13ecb36a7 100644 --- a/tests/unit_tests/include/test_helper.hpp +++ b/tests/unit_tests/include/test_helper.hpp @@ -176,7 +176,7 @@ #define TEST_RUN_PORTFFT_SELECT(q, func, ...) #endif -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ #define CHECK_HOST_OR_CPU(q) q.get_device().is_cpu() #else #define CHECK_HOST_OR_CPU(q) q.is_host() || q.get_device().is_cpu() diff --git a/tests/unit_tests/main_test.cpp b/tests/unit_tests/main_test.cpp index bac3f8c83..6e28ad970 100644 --- a/tests/unit_tests/main_test.cpp +++ b/tests/unit_tests/main_test.cpp @@ -82,7 +82,7 @@ class TersePrinter : public EmptyTestEventListener { } // anonymous namespace void print_error_code(sycl::exception const& e) { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ std::cout << "Backend status: " << e.code() << std::endl; #else std::cout << "OpenCL status: " << e.code() << std::endl; @@ -95,7 +95,7 @@ int main(int argc, char** argv) { auto platforms = sycl::platform::get_platforms(); for (auto plat : platforms) { -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ if (!plat.is_host()) { #endif auto plat_devs = plat.get_devices(); @@ -133,7 +133,7 @@ int main(int argc, char** argv) { continue; #endif // clang-format off -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ if (dev.is_accelerator()) #else if (!dev.is_accelerator()) @@ -146,14 +146,14 @@ int main(int argc, char** argv) { std::cout << "Exception while accessing device: " << e.what() << "\n"; } } -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ } #endif } #if defined(ENABLE_MKLCPU_BACKEND) || defined(ENABLE_NETLIB_BACKEND) || \ defined(ENABLE_PORTBLAS_BACKEND_INTEL_CPU) -#ifdef __HIPSYCL__ +#ifdef __ADAPTIVECPP__ local_devices.push_back(sycl::device(sycl::cpu_selector())); #else local_devices.push_back(sycl::device(sycl::cpu_selector_v)); diff --git a/tests/unit_tests/rng/device/include/rng_device_test_common.hpp b/tests/unit_tests/rng/device/include/rng_device_test_common.hpp index 6b014f0ec..c975c9d8d 100644 --- a/tests/unit_tests/rng/device/include/rng_device_test_common.hpp +++ b/tests/unit_tests/rng/device/include/rng_device_test_common.hpp @@ -112,7 +112,7 @@ struct has_member_code_meta().get_multi_ template ::value>::type* = nullptr> auto get_multi_ptr(T acc) { -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ return acc.get_multi_ptr(); #else return acc.get_pointer(); @@ -121,7 +121,7 @@ auto get_multi_ptr(T acc) { template ::value>::type* = nullptr> auto get_multi_ptr(T acc) { -#ifndef __HIPSYCL__ +#ifndef __ADAPTIVECPP__ return acc.template get_multi_ptr(); #else return acc.get_pointer(); diff --git a/tests/unit_tests/rng/device/moments/CMakeLists.txt b/tests/unit_tests/rng/device/moments/CMakeLists.txt index 2da8033bf..ea521dd17 100644 --- a/tests/unit_tests/rng/device/moments/CMakeLists.txt +++ b/tests/unit_tests/rng/device/moments/CMakeLists.txt @@ -35,6 +35,6 @@ else() target_link_libraries(rng_device_moments_ct PUBLIC ONEMKL::SYCL::SYCL) endif() -if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") +if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_link_options(rng_device_moments_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel) endif() diff --git a/tests/unit_tests/rng/device/service/CMakeLists.txt b/tests/unit_tests/rng/device/service/CMakeLists.txt index 03d960e1a..21e3341cb 100644 --- a/tests/unit_tests/rng/device/service/CMakeLists.txt +++ b/tests/unit_tests/rng/device/service/CMakeLists.txt @@ -35,6 +35,6 @@ else() target_link_libraries(rng_device_service_ct PUBLIC ONEMKL::SYCL::SYCL) endif() -if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "hipsycl") +if(NOT ${ONEMKL_SYCL_IMPLEMENTATION} STREQUAL "adaptivecpp") target_link_options(rng_device_service_ct PUBLIC -fsycl -fsycl-device-code-split=per_kernel) endif()