diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index db18b510e21..7b034c2a340 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -36,7 +36,7 @@ jobs: spack find --loaded mkdir build cd build - cmake .. -DCMAKE_INSTALL_PREFIX=install_ginkgo -DGINKGO_COMPILER_FLAGS="-ffp-model=precise" -DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} -DGINKGO_DPCPP_SINGLE_MODE=ON + cmake .. -DCMAKE_INSTALL_PREFIX=install_ginkgo -DGINKGO_COMPILER_FLAGS="-ffp-model=precise" -DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} -DGINKGO_SYCL_SINGLE_MODE=ON make -j8 ONEAPI_DEVICE_SELECTOR=level_zero:gpu ctest -j10 --output-on-failure diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ccd3e1b800..37908bddbb0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -613,7 +613,7 @@ build/dpcpp/igpu/release/shared: GKO_COMPILER_FLAGS: "-ffp-model=precise" BUILD_TYPE: "Release" BUILD_SHARED_LIBS: "ON" - DPCPP_SINGLE_MODE: "ON" + SYCL_SINGLE_MODE: "ON" ONEAPI_DEVICE_SELECTOR: "*:gpu" # TODO: Enable when debug shared library size issues are fixed @@ -630,7 +630,7 @@ build/dpcpp/igpu/release/shared: # GKO_COMPILER_FLAGS: "-ffp-model=precise" # BUILD_TYPE: "Debug" # BUILD_SHARED_LIBS: "ON" -# DPCPP_SINGLE_MODE: "ON" +# SYCL_SINGLE_MODE: "ON" # ONEAPI_DEVICE_SELECTOR: "level_zero:gpu" # It gives two available backends of GPU on tests @@ -647,7 +647,7 @@ build/dpcpp/dgpu/release/static: GKO_COMPILER_FLAGS: "-ffp-model=precise" BUILD_TYPE: "Release" BUILD_SHARED_LIBS: "OF" - DPCPP_SINGLE_MODE: "ON" + SYCL_SINGLE_MODE: "ON" ONEAPI_DEVICE_SELECTOR: "*:gpu" build/dpcpp/level_zero_dgpu/release/shared: @@ -662,7 +662,7 @@ build/dpcpp/level_zero_dgpu/release/shared: BUILD_SYCL: "ON" GKO_COMPILER_FLAGS: "-ffp-model=precise" BUILD_TYPE: "Release" - DPCPP_SINGLE_MODE: "ON" + SYCL_SINGLE_MODE: "ON" ONEAPI_DEVICE_SELECTOR: "level_zero:gpu" build/icpx/level_zero_dgpu/release/shared: @@ -677,7 +677,7 @@ build/icpx/level_zero_dgpu/release/shared: BUILD_SYCL: "ON" GKO_COMPILER_FLAGS: "-ffp-model=precise" BUILD_TYPE: "Release" - DPCPP_SINGLE_MODE: "ON" + SYCL_SINGLE_MODE: "ON" ONEAPI_DEVICE_SELECTOR: "level_zero:gpu" # Job with important warnings as error diff --git a/.gitlab/scripts.yml b/.gitlab/scripts.yml index 34fecca1d22..dd3f918c6f5 100644 --- a/.gitlab/scripts.yml +++ b/.gitlab/scripts.yml @@ -50,7 +50,7 @@ -DGINKGO_MIXED_PRECISION=${MIXED_PRECISION} -DGINKGO_RUN_EXAMPLES=${RUN_EXAMPLES} -DGINKGO_CONFIG_LOG_DETAILED=${CONFIG_LOG} - -DGINKGO_DPCPP_SINGLE_MODE=${DPCPP_SINGLE_MODE} + -DGINKGO_SYCL_SINGLE_MODE=${SYCL_SINGLE_MODE} -DGINKGO_EXPORT_BUILD_DIR=${EXPORT_BUILD_DIR} - ninja -j${NUM_CORES} -l${CI_LOAD_LIMIT} install - awk '!/^#/ { print ($2 - $1)/1000 " " $4 }' .ninja_log | sort -nr @@ -93,7 +93,7 @@ -DGINKGO_FAST_TESTS=${FAST_TESTS} -DGINKGO_MIXED_PRECISION=${MIXED_PRECISION} -DGINKGO_CONFIG_LOG_DETAILED=${CONFIG_LOG} - -DGINKGO_DPCPP_SINGLE_MODE=${DPCPP_SINGLE_MODE} + -DGINKGO_SYCL_SINGLE_MODE=${SYCL_SINGLE_MODE} -DGINKGO_RUN_EXAMPLES=${RUN_EXAMPLES} -DGINKGO_EXPORT_BUILD_DIR=${EXPORT_BUILD_DIR} - ninja -j${NUM_CORES} -l${CI_LOAD_LIMIT} install diff --git a/.gitlab/variables.yml b/.gitlab/variables.yml index 6c75d60d069..d6493e07a90 100644 --- a/.gitlab/variables.yml +++ b/.gitlab/variables.yml @@ -19,7 +19,7 @@ MPI_AS_ROOT: "OFF" FAST_TESTS: "OFF" NONDEFAULT_STREAM: "OFF" - DPCPP_SINGLE_MODE: "OFF" + SYCL_SINGLE_MODE: "OFF" MIXED_PRECISION: "ON" RUN_EXAMPLES: "OFF" CONFIG_LOG: "ON" diff --git a/CMakeLists.txt b/CMakeLists.txt index 12edc0cb39e..dde6645da52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,8 @@ else() option(GINKGO_BUILD_HWLOC "Build Ginkgo with HWLOC. Enabled if a system installation is found." ${HWLOC_FOUND}) endif() option(GINKGO_BUILD_PAPI_SDE "Build Ginkgo with PAPI SDE. Enabled if a system installation is found." ${PAPI_SDE_FOUND}) -option(GINKGO_DPCPP_SINGLE_MODE "Do not compile double kernels for the DPC++ backend." OFF) +gko_rename_cache(GINKGO_DPCPP_SINGLE_MODE GINKGO_SYCL_SINGLE_MODE BOOL) +option(GINKGO_SYCL_SINGLE_MODE "Do not compile double kernels for the DPC++ backend." OFF) option(GINKGO_INSTALL_RPATH "Set the RPATH when installing its libraries." ON) option(GINKGO_INSTALL_RPATH_ORIGIN "Add $ORIGIN (Linux) or @loader_path (MacOS) to the installation RPATH." ON) option(GINKGO_INSTALL_RPATH_DEPENDENCIES "Add dependencies to the installation RPATH." OFF) @@ -301,10 +302,11 @@ if(MSVC) endif() if(GINKGO_BUILD_SYCL) - ginkgo_extract_dpcpp_version(${CMAKE_CXX_COMPILER} GINKGO_DPCPP_MAJOR_VERSION __LIBSYCL_MAJOR_VERSION) - ginkgo_extract_dpcpp_version(${CMAKE_CXX_COMPILER} GINKGO_DPCPP_VERSION __SYCL_COMPILER_VERSION) + # It may only make sense for intel sycl + ginkgo_extract_dpcpp_version(${CMAKE_CXX_COMPILER} GINKGO_SYCL_MAJOR_VERSION __LIBSYCL_MAJOR_VERSION) + ginkgo_extract_dpcpp_version(${CMAKE_CXX_COMPILER} GINKGO_SYCL_VERSION __SYCL_COMPILER_VERSION) else() - set(GINKGO_DPCPP_MAJOR_VERSION "0") + set(GINKGO_SYCL_MAJOR_VERSION "0") endif() configure_file(${Ginkgo_SOURCE_DIR}/include/ginkgo/config.hpp.in ${Ginkgo_BINARY_DIR}/include/ginkgo/config.hpp @ONLY) diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index df329e445b4..f17b0547752 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -68,7 +68,7 @@ function(ginkgo_add_single_benchmark_executable name use_lib_linops macro_def ty target_link_libraries("${name}" hip_timer) endif() if (GINKGO_BUILD_SYCL) - target_compile_definitions("${name}" PRIVATE HAS_DPCPP_TIMER=1) + target_compile_definitions("${name}" PRIVATE HAS_SYCL_TIMER=1) target_link_libraries("${name}" dpcpp_timer) endif() if (GINKGO_BUILD_MPI) @@ -88,7 +88,7 @@ function(ginkgo_add_single_benchmark_executable name use_lib_linops macro_def ty target_link_libraries("${name}" hipsparse_linops_${type}) endif() if (GINKGO_BUILD_SYCL) - target_compile_definitions("${name}" PRIVATE HAS_DPCPP=1) + target_compile_definitions("${name}" PRIVATE HAS_SYCL=1) target_link_libraries("${name}" onemkl_linops_${type}) endif() endif() @@ -140,7 +140,7 @@ if (GINKGO_BUILD_SYCL) ginkgo_benchmark_onemkl_linops(z GKO_BENCHMARK_USE_DOUBLE_COMPLEX_PRECISION) ginkgo_benchmark_onemkl_linops(c GKO_BENCHMARK_USE_SINGLE_COMPLEX_PRECISION) add_library(dpcpp_timer utils/dpcpp_timer.dp.cpp) - target_compile_options(dpcpp_timer PRIVATE ${GINKGO_DPCPP_FLAGS}) + target_compile_options(dpcpp_timer PRIVATE ${GINKGO_SYCL_FLAGS}) gko_add_sycl_to_target(TARGET dpcpp_timer SOURCES utils/dpcpp_timer.dp.cpp) target_link_libraries(dpcpp_timer ginkgo) endif() diff --git a/benchmark/utils/formats.hpp b/benchmark/utils/formats.hpp index a1cb07a6a0c..ea15a5e9711 100644 --- a/benchmark/utils/formats.hpp +++ b/benchmark/utils/formats.hpp @@ -66,9 +66,9 @@ std::string available_format = ", hipsparse_csr, hipsparse_csrmm, hipsparse_coo, hipsparse_ell, " "hipsparse_hybrid" #endif // HAS_HIP -#ifdef HAS_DPCPP +#ifdef HAS_SYCL ", onemkl_csr, onemkl_optimized_csr" -#endif // HAS_DPCPP +#endif // HAS_SYCL ".\n"; std::string format_description = @@ -129,11 +129,11 @@ std::string format_description = "hipsparse_ell: hipSPARSE CSR SpMV using hipsparseXhybmv\n" " with HIPSPARSE_HYB_PARTITION_MAX\n" #endif // HAS_HIP -#ifdef HAS_DPCPP +#ifdef HAS_SYCL "onemkl_csr: oneMKL Csr SpMV\n" "onemkl_optimized_csr: oneMKL optimized Csr SpMV using optimize_gemv after " "reading the matrix" -#endif // HAS_DPCPP +#endif // HAS_SYCL ; std::string format_command = @@ -262,10 +262,10 @@ const std::map( {"hipsparse_coo", create_sparselib_linop}, {"hipsparse_ell", create_sparselib_linop}, #endif // HAS_HIP -#ifdef HAS_DPCPP +#ifdef HAS_SYCL {"onemkl_csr", create_sparselib_linop}, {"onemkl_optimized_csr", create_sparselib_linop}, -#endif // HAS_DPCPP +#endif // HAS_SYCL {"hybrid", create_matrix_type()}, {"hybrid0",create_matrix_type( std::make_shared(0))}, {"hybrid25",create_matrix_type( std::make_shared(0.25))}, diff --git a/benchmark/utils/timer_impl.hpp b/benchmark/utils/timer_impl.hpp index ffeb6fd437e..26cac7b7d4f 100644 --- a/benchmark/utils/timer_impl.hpp +++ b/benchmark/utils/timer_impl.hpp @@ -236,10 +236,10 @@ std::shared_ptr get_hip_timer( #endif // HAS_HIP_TIMER -#ifdef HAS_DPCPP_TIMER +#ifdef HAS_SYCL_TIMER std::shared_ptr get_sycl_timer( std::shared_ptr exec); -#endif // HAS_DPCPP_TIMER +#endif // HAS_SYCL_TIMER #if HAS_MPI_TIMER @@ -277,12 +277,12 @@ inline std::shared_ptr get_timer( } #endif // HAS_HIP_TIMER -#ifdef HAS_DPCPP_TIMER +#ifdef HAS_SYCL_TIMER if (auto sycl = std::dynamic_pointer_cast(exec)) { return get_sycl_timer(sycl); } -#endif // HAS_DPCPP_TIMER +#endif // HAS_SYCL_TIMER } // No cuda/hip/sycl executor available or no gpu_timer used return std::make_shared(exec); diff --git a/cmake/GinkgoConfig.cmake.in b/cmake/GinkgoConfig.cmake.in index 41f3b8f2879..e87c94bc33a 100644 --- a/cmake/GinkgoConfig.cmake.in +++ b/cmake/GinkgoConfig.cmake.in @@ -75,9 +75,10 @@ set(GINKGO_HIP_AMDGPU "@GINKGO_HIP_AMDGPU@") set(GINKGO_HIP_VERSION @GINKGO_HIP_VERSION@) set(GINKGO_AMD_ARCH_FLAGS "@GINKGO_AMD_ARCH_FLAGS@") -set(GINKGO_DPCPP_VERSION @GINKGO_DPCPP_VERSION@) -set(GINKGO_DPCPP_MAJOR_VERSION @GINKGO_DPCPP_MAJOR_VERSION@) -set(GINKGO_DPCPP_FLAGS "@GINKGO_DPCPP_FLAGS@") +// TODO: are these considered as public interface? +set(GINKGO_SYCL_VERSION @GINKGO_SYCL_VERSION@) +set(GINKGO_SYCL_MAJOR_VERSION @GINKGO_SYCL_MAJOR_VERSION@) +set(GINKGO_SYCL_FLAGS "@GINKGO_SYCL_FLAGS@") set(GINKGO_MKL_ROOT "@GINKGO_MKL_ROOT@") set(GINKGO_DPL_ROOT "@GINKGO_DPL_ROOT@") diff --git a/cmake/create_test.cmake b/cmake/create_test.cmake index 75e5bcc2aa4..f37db3eb6eb 100644 --- a/cmake/create_test.cmake +++ b/cmake/create_test.cmake @@ -28,8 +28,8 @@ function(ginkgo_set_test_target_properties test_target_name) if (GINKGO_TEST_NONDEFAULT_STREAM) target_compile_definitions(${test_target_name} PRIVATE GKO_TEST_NONDEFAULT_STREAM) endif() - if (GINKGO_COMPILING_DPCPP_TEST AND GINKGO_DPCPP_SINGLE_MODE) - target_compile_definitions(${test_target_name} PRIVATE GINKGO_DPCPP_SINGLE_MODE=1) + if (GINKGO_COMPILING_SYCL_TEST AND GINKGO_SYCL_SINGLE_MODE) + target_compile_definitions(${test_target_name} PRIVATE GINKGO_SYCL_SINGLE_MODE=1) endif() if (GINKGO_CHECK_CIRCULAR_DEPS) target_link_libraries(${test_target_name} PRIVATE "${GINKGO_CIRCULAR_DEPS_FLAGS}") @@ -92,12 +92,12 @@ function(ginkgo_create_test test_name) ginkgo_add_test(${test_name} ${test_target_name} ${ARGN}) endfunction(ginkgo_create_test) -## Test compiled with dpcpp -function(ginkgo_create_dpcpp_test test_name) +## Test compiled with sycl +function(ginkgo_create_sycl_test test_name) ginkgo_build_test_name(${test_name} test_target_name) add_executable(${test_target_name} ${test_name}.dp.cpp) target_compile_features(${test_target_name} PUBLIC cxx_std_17) - target_compile_options(${test_target_name} PRIVATE ${GINKGO_DPCPP_FLAGS}) + target_compile_options(${test_target_name} PRIVATE ${GINKGO_SYCL_FLAGS}) gko_add_sycl_to_target(TARGET ${test_target_name} SOURCES ${test_name}.dp.cpp) target_link_options(${test_target_name} PRIVATE -fsycl-device-code-split=per_kernel) ginkgo_set_test_target_properties(${test_target_name} ${ARGN}) @@ -106,7 +106,7 @@ function(ginkgo_create_dpcpp_test test_name) if (MKL_ENV) set_tests_properties(${test_target_name} PROPERTIES ENVIRONMENT "${MKL_ENV}") endif() -endfunction(ginkgo_create_dpcpp_test) +endfunction(ginkgo_create_sycl_test) ## Test compiled with CUDA function(ginkgo_create_cuda_test test_name) @@ -206,7 +206,7 @@ function(ginkgo_create_common_test test_name) ginkgo_create_common_test_internal(${test_name} CudaExecutor cuda ${ARGN}) endif() if(GINKGO_BUILD_SYCL) - ginkgo_create_common_test_internal(${test_name} SyclExecutor dpcpp ${ARGN}) + ginkgo_create_common_test_internal(${test_name} SyclExecutor sycl ${ARGN}) endif() endfunction(ginkgo_create_common_test) @@ -220,16 +220,12 @@ function(ginkgo_create_common_test_internal test_name exec_type exec) # set up actual test set(test_target_name ${test_target_name}_${exec}) add_executable(${test_target_name} ${test_name}.cpp) - if(exec STREQUAL "dpcpp") - target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=sycl GKO_COMPILING_${exec_upper}) - else() - target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec} GKO_COMPILING_${exec_upper}) - endif() + target_compile_definitions(${test_target_name} PRIVATE EXEC_TYPE=${exec_type} EXEC_NAMESPACE=${exec} GKO_COMPILING_${exec_upper}) target_link_libraries(${test_target_name} PRIVATE ${common_test_ADDITIONAL_LIBRARIES}) - # use float for DPC++ if necessary - if((exec STREQUAL "dpcpp") AND GINKGO_DPCPP_SINGLE_MODE) + # use float for SYCL if necessary + if((exec STREQUAL "sycl") AND GINKGO_SYCL_SINGLE_MODE) target_compile_definitions(${test_target_name} PRIVATE GINKGO_COMMON_SINGLE_MODE=1) - target_compile_definitions(${test_target_name} PRIVATE GINKGO_DPCPP_SINGLE_MODE=1) + target_compile_definitions(${test_target_name} PRIVATE GINKGO_SYCL_SINGLE_MODE=1) endif() ginkgo_set_test_target_properties(${test_target_name} ${ARGN}) ginkgo_add_test(${test_name}_${exec} ${test_target_name} ${ARGN}) @@ -240,13 +236,13 @@ function(ginkgo_create_common_device_test test_name) cmake_parse_arguments(PARSE_ARGV 1 common_device_test "" "${gko_test_single_args}" "${gko_test_multi_args}") ginkgo_build_test_name(${test_name} test_target_name) if(GINKGO_BUILD_SYCL) - ginkgo_create_common_test_internal(${test_name} SyclExecutor dpcpp ${ARGN}) - target_compile_features(${test_target_name}_dpcpp PRIVATE cxx_std_17) - target_compile_options(${test_target_name}_dpcpp PRIVATE ${GINKGO_DPCPP_FLAGS}) + ginkgo_create_common_test_internal(${test_name} SyclExecutor sycl ${ARGN}) + target_compile_features(${test_target_name}_sycl PRIVATE cxx_std_17) + target_compile_options(${test_target_name}_sycl PRIVATE ${GINKGO_SYCL_FLAGS}) # We need to use a new file to avoid sycl setting in other backends because add_sycl_to_target will change the source property. configure_file(${test_name}.cpp ${test_name}.dp.cpp COPYONLY) - gko_add_sycl_to_target(TARGET ${test_target_name}_dpcpp SOURCES ${test_name}.dp.cpp) - target_link_options(${test_target_name}_dpcpp PRIVATE -fsycl-device-lib=all -fsycl-device-code-split=per_kernel) + gko_add_sycl_to_target(TARGET ${test_target_name}_sycl SOURCES ${test_name}.dp.cpp) + target_link_options(${test_target_name}_sycl PRIVATE -fsycl-device-lib=all -fsycl-device-code-split=per_kernel) endif() if(GINKGO_BUILD_OMP) ginkgo_create_common_test_internal(${test_name} OmpExecutor omp ${ARGN}) diff --git a/common/unified/base/kernel_launch.hpp b/common/unified/base/kernel_launch.hpp index 736b1999319..ac3a69ddf8e 100644 --- a/common/unified/base/kernel_launch.hpp +++ b/common/unified/base/kernel_launch.hpp @@ -97,7 +97,7 @@ GKO_INLINE GKO_ATTRIBUTES constexpr unpack_member_type unpack_member(T value) } // namespace gko -#elif defined(GKO_COMPILING_DPCPP) +#elif defined(GKO_COMPILING_SYCL) #define GKO_DEVICE_NAMESPACE sycl #define GKO_KERNEL @@ -302,7 +302,7 @@ typename to_device_type_impl::type map_to_device(T&& param) #include "cuda/base/kernel_launch.cuh" #elif defined(GKO_COMPILING_HIP) #include "hip/base/kernel_launch.hip.hpp" -#elif defined(GKO_COMPILING_DPCPP) +#elif defined(GKO_COMPILING_SYCL) #include "dpcpp/base/kernel_launch.dp.hpp" #elif defined(GKO_COMPILING_OMP) #include "omp/base/kernel_launch.hpp" diff --git a/common/unified/base/kernel_launch_reduction.hpp b/common/unified/base/kernel_launch_reduction.hpp index 1968a7ed03d..435c6d255ab 100644 --- a/common/unified/base/kernel_launch_reduction.hpp +++ b/common/unified/base/kernel_launch_reduction.hpp @@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "cuda/base/kernel_launch_reduction.cuh" #elif defined(GKO_COMPILING_HIP) #include "hip/base/kernel_launch_reduction.hip.hpp" -#elif defined(GKO_COMPILING_DPCPP) +#elif defined(GKO_COMPILING_SYCL) #include "dpcpp/base/kernel_launch_reduction.dp.hpp" #elif defined(GKO_COMPILING_OMP) #include "omp/base/kernel_launch_reduction.hpp" diff --git a/common/unified/base/kernel_launch_solver.hpp b/common/unified/base/kernel_launch_solver.hpp index eaf37e46891..2e0966c0306 100644 --- a/common/unified/base/kernel_launch_solver.hpp +++ b/common/unified/base/kernel_launch_solver.hpp @@ -139,7 +139,7 @@ const device_type* row_vector(const matrix::Dense* mtx) #include "cuda/base/kernel_launch_solver.cuh" #elif defined(GKO_COMPILING_HIP) #include "hip/base/kernel_launch_solver.hip.hpp" -#elif defined(GKO_COMPILING_DPCPP) +#elif defined(GKO_COMPILING_SYCL) #include "dpcpp/base/kernel_launch_solver.dp.hpp" #elif defined(GKO_COMPILING_OMP) #include "omp/base/kernel_launch_solver.hpp" diff --git a/core/test/utils.hpp b/core/test/utils.hpp index a16db1eb93a..9e987f37ca6 100644 --- a/core/test/utils.hpp +++ b/core/test/utils.hpp @@ -63,21 +63,21 @@ namespace test { using ValueTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types>; #else ::testing::Types, std::complex>; #endif using ComplexValueTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types>; #else ::testing::Types, std::complex>; #endif using RealValueTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types; #else ::testing::Types; @@ -93,7 +93,7 @@ using LocalGlobalIndexTypes = using PODTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types; #else ::testing::Types; @@ -101,7 +101,7 @@ using PODTypes = using ValueAndIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types, gko::int32, gko::int64, gko::size_type>; #else @@ -111,7 +111,7 @@ using ValueAndIndexTypes = using RealValueAndIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types; #else ::testing::Types; @@ -119,7 +119,7 @@ using RealValueAndIndexTypes = using ValueIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types, std::tuple, gko::int32>, std::tuple, @@ -136,7 +136,7 @@ using ValueIndexTypes = using RealValueIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types, std::tuple>; #else @@ -147,7 +147,7 @@ using RealValueIndexTypes = using ComplexValueIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types, gko::int32>, std::tuple, gko::int64>>; #else @@ -159,7 +159,7 @@ using ComplexValueIndexTypes = using TwoValueIndexType = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types< std::tuple, std::tuple, std::complex, gko::int32>, @@ -187,7 +187,7 @@ using TwoValueIndexType = using ValueLocalGlobalIndexTypes = -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE ::testing::Types, std::tuple, std::tuple, diff --git a/dpcpp/CMakeLists.txt b/dpcpp/CMakeLists.txt index 3f9fe128da2..bc19752c8a9 100644 --- a/dpcpp/CMakeLists.txt +++ b/dpcpp/CMakeLists.txt @@ -63,9 +63,9 @@ target_sources(ginkgo_dpcpp ) # TODO: adjust it when dpcpp jacobi supports more block size -set(GKO_DPCPP_JACOBI_BLOCK_SIZES 32) -set(GKO_DPCPP_JACOBI_SOURCES) -foreach(GKO_JACOBI_BLOCK_SIZE IN LISTS GKO_DPCPP_JACOBI_BLOCK_SIZES) +set(GKO_SYCL_JACOBI_BLOCK_SIZES 32) +set(GKO_SYCL_JACOBI_SOURCES) +foreach(GKO_JACOBI_BLOCK_SIZE IN LISTS GKO_SYCL_JACOBI_BLOCK_SIZES) configure_file( preconditioner/jacobi_generate_instantiate.inc.dp.cpp preconditioner/jacobi_generate_instantiate.${GKO_JACOBI_BLOCK_SIZE}.dp.cpp) @@ -75,20 +75,20 @@ foreach(GKO_JACOBI_BLOCK_SIZE IN LISTS GKO_DPCPP_JACOBI_BLOCK_SIZES) configure_file( preconditioner/jacobi_advanced_apply_instantiate.inc.dp.cpp preconditioner/jacobi_advanced_apply_instantiate.${GKO_JACOBI_BLOCK_SIZE}.dp.cpp) - list(APPEND GKO_DPCPP_JACOBI_SOURCES + list(APPEND GKO_SYCL_JACOBI_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/preconditioner/jacobi_generate_instantiate.${GKO_JACOBI_BLOCK_SIZE}.dp.cpp ${CMAKE_CURRENT_BINARY_DIR}/preconditioner/jacobi_simple_apply_instantiate.${GKO_JACOBI_BLOCK_SIZE}.dp.cpp ${CMAKE_CURRENT_BINARY_DIR}/preconditioner/jacobi_advanced_apply_instantiate.${GKO_JACOBI_BLOCK_SIZE}.dp.cpp) endforeach() -target_sources(ginkgo_dpcpp PRIVATE ${GKO_DPCPP_JACOBI_SOURCES}) -string(REPLACE ";" "," GKO_DPCPP_JACOBI_BLOCK_SIZES_CODE "${GKO_DPCPP_JACOBI_BLOCK_SIZES}") +target_sources(ginkgo_dpcpp PRIVATE ${GKO_SYCL_JACOBI_SOURCES}) +string(REPLACE ";" "," GKO_SYCL_JACOBI_BLOCK_SIZES_CODE "${GKO_SYCL_JACOBI_BLOCK_SIZES}") configure_file(preconditioner/jacobi_common.hpp.in preconditioner/jacobi_common.hpp) ginkgo_compile_features(ginkgo_dpcpp) -target_compile_definitions(ginkgo_dpcpp PRIVATE GKO_COMPILING_DPCPP _ONEDPL_COMPILE_KERNEL=0) +target_compile_definitions(ginkgo_dpcpp PRIVATE GKO_COMPILING_SYCL _ONEDPL_COMPILE_KERNEL=0) -set(GINKGO_DPCPP_FLAGS ${GINKGO_DPCPP_FLAGS} PARENT_SCOPE) -target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_DPCPP_FLAGS}") +set(GINKGO_SYCL_FLAGS ${GINKGO_SYCL_FLAGS} PARENT_SCOPE) +target_compile_options(ginkgo_dpcpp PRIVATE "${GINKGO_SYCL_FLAGS}") # all file in target ginkgo_dpcpp are necessarily compiled with sycl, so we can ignore the warning. # If we would like to use SOURCES, please use the new files copied from GKO_UNIFIED_COMMON_SOURCES. # Otherwise, the source's properties will be changed by add_sycl_to_target @@ -111,15 +111,15 @@ target_include_directories(ginkgo_dpcpp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) target_link_libraries(ginkgo_dpcpp PUBLIC ginkgo_device) target_link_libraries(ginkgo_dpcpp PRIVATE MKL::MKL_DPCPP oneDPL) -if (GINKGO_DPCPP_SINGLE_MODE) - target_compile_definitions(ginkgo_dpcpp PRIVATE GINKGO_DPCPP_SINGLE_MODE=1) +if (GINKGO_SYCL_SINGLE_MODE) + target_compile_definitions(ginkgo_dpcpp PRIVATE GINKGO_SYCL_SINGLE_MODE=1) endif() ginkgo_default_includes(ginkgo_dpcpp) ginkgo_install_library(ginkgo_dpcpp) if (GINKGO_CHECK_CIRCULAR_DEPS) - ginkgo_check_headers(ginkgo_dpcpp GKO_COMPILING_DPCPP) + ginkgo_check_headers(ginkgo_dpcpp GKO_COMPILING_SYCL) endif() if(GINKGO_BUILD_TESTS) diff --git a/dpcpp/base/executor.dp.cpp b/dpcpp/base/executor.dp.cpp index 6bf3e735ba0..2ce86b8e8a5 100644 --- a/dpcpp/base/executor.dp.cpp +++ b/dpcpp/base/executor.dp.cpp @@ -276,7 +276,7 @@ void SyclExecutor::set_device_property(sycl_queue_property property) device.get_info<::sycl::info::device::max_work_group_size>()); // They change the max_work_item_size with template parameter Dimension after // major version 6 and adding the default = 3 is not in the same release. -#if GINKGO_DPCPP_MAJOR_VERSION >= 6 +#if GINKGO_SYCL_MAJOR_VERSION >= 6 auto max_workitem_sizes = device.get_info<::sycl::info::device::max_work_item_sizes<3>>(); #else @@ -293,7 +293,7 @@ void SyclExecutor::set_device_property(sycl_queue_property property) // Get the hardware threads per eu if (device.has(sycl::aspect::ext_intel_gpu_hw_threads_per_eu)) { -#if GINKGO_DPCPP_MAJOR_VERSION >= 6 +#if GINKGO_SYCL_MAJOR_VERSION >= 6 this->get_exec_info().num_pu_per_cu = device.get_info< ::sycl::ext::intel::info::device::gpu_hw_threads_per_eu>(); #else diff --git a/dpcpp/components/cooperative_groups.dp.hpp b/dpcpp/components/cooperative_groups.dp.hpp index 0ab4ee5e55d..12638c37da6 100644 --- a/dpcpp/components/cooperative_groups.dp.hpp +++ b/dpcpp/components/cooperative_groups.dp.hpp @@ -480,7 +480,7 @@ __dpct_inline__ grid_group this_grid(::sycl::nd_item<3>& group) // Enable group can directly use group function -#if GINKGO_DPCPP_MAJOR_VERSION < 6 +#if GINKGO_SYCL_MAJOR_VERSION < 6 inline namespace cl { #endif namespace sycl { @@ -509,7 +509,7 @@ struct group_scope< } // namespace spirv } // namespace detail } // namespace sycl -#if GINKGO_DPCPP_MAJOR_VERSION < 6 +#if GINKGO_SYCL_MAJOR_VERSION < 6 } // namespace cl #endif diff --git a/dpcpp/get_info.cmake b/dpcpp/get_info.cmake index ee9c0398f3e..734ed238690 100644 --- a/dpcpp/get_info.cmake +++ b/dpcpp/get_info.cmake @@ -1,7 +1,7 @@ -ginkgo_print_module_header(${detailed_log} "DPCPP") -ginkgo_print_module_footer(${detailed_log} "DPCPP variables:") -ginkgo_print_variable(${detailed_log} "GINKGO_DPCPP_FLAGS") -ginkgo_print_variable(${detailed_log} "GINKGO_DPCPP_SINGLE_MODE") -ginkgo_print_module_footer(${detailed_log} "DPCPP environment variables:") +ginkgo_print_module_header(${detailed_log} "SYCL") +ginkgo_print_module_footer(${detailed_log} "SYCL variables:") +ginkgo_print_variable(${detailed_log} "GINKGO_SYCL_FLAGS") +ginkgo_print_variable(${detailed_log} "GINKGO_SYCL_SINGLE_MODE") +ginkgo_print_module_footer(${detailed_log} "SYCL environment variables:") ginkgo_print_env_variable(${detailed_log} "SYCL_DEVICE_FILTER") ginkgo_print_module_footer(${detailed_log} "") diff --git a/dpcpp/matrix/csr_kernels.dp.cpp b/dpcpp/matrix/csr_kernels.dp.cpp index 43f9a9a5aee..eaeafbe53c4 100644 --- a/dpcpp/matrix/csr_kernels.dp.cpp +++ b/dpcpp/matrix/csr_kernels.dp.cpp @@ -2443,7 +2443,7 @@ void csr_lookup_build_hash(IndexType row_len, IndexType available_storage, { // we need at least one unfilled entry to avoid infinite loops on search GKO_ASSERT(row_len < available_storage); -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE constexpr float inv_golden_ratio = 0.61803398875f; #else constexpr double inv_golden_ratio = 0.61803398875; diff --git a/dpcpp/preconditioner/jacobi_common.hpp.in b/dpcpp/preconditioner/jacobi_common.hpp.in index 63009bde0df..bedbe31d76a 100644 --- a/dpcpp/preconditioner/jacobi_common.hpp.in +++ b/dpcpp/preconditioner/jacobi_common.hpp.in @@ -47,16 +47,16 @@ namespace jacobi { * kernels should be compiled. */ // clang-format off -#cmakedefine GKO_DPCPP_JACOBI_BLOCK_SIZES_CODE @GKO_DPCPP_JACOBI_BLOCK_SIZES_CODE@ +#cmakedefine GKO_SYCL_JACOBI_BLOCK_SIZES_CODE @GKO_SYCL_JACOBI_BLOCK_SIZES_CODE@ // clang-format on // make things easier for IDEs -#ifndef GKO_DPCPP_JACOBI_BLOCK_SIZES_CODE -#define GKO_DPCPP_JACOBI_BLOCK_SIZES_CODE 1 +#ifndef GKO_SYCL_JACOBI_BLOCK_SIZES_CODE +#define GKO_SYCL_JACOBI_BLOCK_SIZES_CODE 1 #endif using compiled_kernels = - syn::value_list; + syn::value_list; constexpr int get_larger_power(int value, int guess = 1) diff --git a/dpcpp/test/CMakeLists.txt b/dpcpp/test/CMakeLists.txt index b882f57715e..aff07cdfc83 100644 --- a/dpcpp/test/CMakeLists.txt +++ b/dpcpp/test/CMakeLists.txt @@ -1,5 +1,5 @@ include(${PROJECT_SOURCE_DIR}/cmake/create_test.cmake) -set(GINKGO_COMPILING_DPCPP_TEST ON) +set(GINKGO_COMPILING_SYCL_TEST ON) add_subdirectory(base) add_subdirectory(components) diff --git a/dpcpp/test/base/CMakeLists.txt b/dpcpp/test/base/CMakeLists.txt index bb9c8a75050..bc284c60d0d 100644 --- a/dpcpp/test/base/CMakeLists.txt +++ b/dpcpp/test/base/CMakeLists.txt @@ -1,5 +1,5 @@ -ginkgo_create_dpcpp_test(executor) -ginkgo_create_dpcpp_test(dim3) -ginkgo_create_dpcpp_test(kernel_launch) +ginkgo_create_sycl_test(executor) +ginkgo_create_sycl_test(dim3) +ginkgo_create_sycl_test(kernel_launch) # set correct flags for kernel_launch.hpp -target_compile_definitions(dpcpp_test_base_kernel_launch PRIVATE GKO_COMPILING_DPCPP) +target_compile_definitions(dpcpp_test_base_kernel_launch PRIVATE GKO_COMPILING_SYCL) diff --git a/dpcpp/test/base/kernel_launch.dp.cpp b/dpcpp/test/base/kernel_launch.dp.cpp index 263eea7c4b3..d54b48e39e1 100644 --- a/dpcpp/test/base/kernel_launch.dp.cpp +++ b/dpcpp/test/base/kernel_launch.dp.cpp @@ -89,7 +89,7 @@ struct to_device_type_impl { class KernelLaunch : public ::testing::Test { protected: -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE using value_type = float; #else using value_type = double; diff --git a/dpcpp/test/components/CMakeLists.txt b/dpcpp/test/components/CMakeLists.txt index 9b44f670fcc..e55ea1546bb 100644 --- a/dpcpp/test/components/CMakeLists.txt +++ b/dpcpp/test/components/CMakeLists.txt @@ -1 +1 @@ -ginkgo_create_dpcpp_test(cooperative_groups) +ginkgo_create_sycl_test(cooperative_groups) diff --git a/dpcpp/test/matrix/fbcsr_kernels.cpp b/dpcpp/test/matrix/fbcsr_kernels.cpp index 1182bc92586..3fbc5e7e7a4 100644 --- a/dpcpp/test/matrix/fbcsr_kernels.cpp +++ b/dpcpp/test/matrix/fbcsr_kernels.cpp @@ -45,11 +45,11 @@ namespace { class Fbcsr : public ::testing::Test { protected: -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE using vtype = float; #else using vtype = double; -#endif // GINKGO_DPCPP_SINGLE_MODE +#endif // GINKGO_SYCL_SINGLE_MODE using Mtx = gko::matrix::Fbcsr; void SetUp() diff --git a/dpcpp/test/preconditioner/jacobi_kernels.cpp b/dpcpp/test/preconditioner/jacobi_kernels.cpp index 73013a6c0f7..9a4bfd3aeb6 100644 --- a/dpcpp/test/preconditioner/jacobi_kernels.cpp +++ b/dpcpp/test/preconditioner/jacobi_kernels.cpp @@ -59,7 +59,7 @@ namespace { class Jacobi : public ::testing::Test { protected: using index_type = int32_t; -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE using value_type = float; #else using value_type = double; @@ -618,12 +618,12 @@ TEST_F(Jacobi, AvoidsPrecisionsThatOverflow) auto prec = h_bj->get_parameters().storage_optimization.block_wise.get_const_data(); ASSERT_EQ(prec[0], gko::precision_reduction(0, 2)); -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE // In single value, precision_reduction(1, 1) == precision_reduction(2, 0) ASSERT_EQ(prec[1], gko::precision_reduction(2, 0)); #else ASSERT_EQ(prec[1], gko::precision_reduction(1, 1)); -#endif // GINKGO_DPCPP_SINGLE_MODE +#endif // GINKGO_SYCL_SINGLE_MODE } diff --git a/dpcpp/test/utils.hpp b/dpcpp/test/utils.hpp index 1fadfb1904a..31a309f14ef 100644 --- a/dpcpp/test/utils.hpp +++ b/dpcpp/test/utils.hpp @@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace { -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define SKIP_IF_SINGLE_MODE GTEST_SKIP() << "Skip due to single mode" #else #define SKIP_IF_SINGLE_MODE \ diff --git a/include/ginkgo/config.hpp.in b/include/ginkgo/config.hpp.in index 720b8c8a45d..8cb671d93f4 100644 --- a/include/ginkgo/config.hpp.in +++ b/include/ginkgo/config.hpp.in @@ -78,7 +78,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* What is the major version of dpcpp compiler */ // clang-format off -#define GINKGO_DPCPP_MAJOR_VERSION @GINKGO_DPCPP_MAJOR_VERSION@ +#define GINKGO_SYCL_MAJOR_VERSION @GINKGO_SYCL_MAJOR_VERSION@ +// GINKGO_DPCPP_MAJOR_VERSION is deprecated +#define GINKGO_DPCPP_MAJOR_VERSION @GINKGO_SYCL_MAJOR_VERSION@ // clang-format on diff --git a/include/ginkgo/core/base/fwd_defs.hpp b/include/ginkgo/core/base/fwd_defs.hpp index 5f0cbd9d960..2db3881640a 100644 --- a/include/ginkgo/core/base/fwd_defs.hpp +++ b/include/ginkgo/core/base/fwd_defs.hpp @@ -62,7 +62,7 @@ struct ihipEvent_t; // after intel/llvm September'22 release, which uses major version 6, they // introduce another inline namespace _V1. -#if GINKGO_DPCPP_MAJOR_VERSION >= 6 +#if GINKGO_SYCL_MAJOR_VERSION >= 6 namespace sycl { inline namespace _V1 { @@ -73,7 +73,7 @@ class event; } // namespace _V1 } // namespace sycl -#else // GINKGO_DPCPP_MAJOR_VERSION < 6 +#else // GINKGO_SYCL_MAJOR_VERSION < 6 inline namespace cl { namespace sycl { diff --git a/include/ginkgo/core/base/types.hpp b/include/ginkgo/core/base/types.hpp index 6182a6a8142..007577ab66b 100644 --- a/include/ginkgo/core/base/types.hpp +++ b/include/ginkgo/core/base/types.hpp @@ -427,7 +427,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take one argument, which is replaced by the * value type. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_TYPE(_macro) \ template _macro(float); \ template <> \ @@ -447,7 +447,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take one argument, which is replaced by the * value type. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_VALUE_TYPE(_macro) \ GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_TYPE(_macro); \ template _macro(std::complex); \ @@ -471,7 +471,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take two arguments, which are replaced by the * value and scalar type, respectively. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_VALUE_AND_SCALAR_TYPE(_macro) \ template _macro(float, float); \ template <> \ @@ -515,7 +515,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take two arguments, which are replaced by the * value and index types. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_AND_INDEX_TYPE(_macro) \ template _macro(float, int32); \ template <> \ @@ -540,7 +540,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take two arguments, which are replaced by the * value and index types. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_VALUE_AND_INDEX_TYPE(_macro) \ GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_AND_INDEX_TYPE(_macro); \ template _macro(std::complex, int32); \ @@ -568,7 +568,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take three arguments, which are replaced by the * value, the local and the global index types. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_AND_LOCAL_GLOBAL_INDEX_TYPE( \ _macro) \ template _macro(float, int32, int32); \ @@ -600,7 +600,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, * Should take two arguments, which are replaced by the * value and index types. */ -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_VALUE_AND_LOCAL_GLOBAL_INDEX_TYPE(_macro) \ GKO_INSTANTIATE_FOR_EACH_NON_COMPLEX_VALUE_AND_LOCAL_GLOBAL_INDEX_TYPE( \ _macro); \ @@ -626,7 +626,7 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x, #endif -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE #define GKO_INSTANTIATE_FOR_EACH_VALUE_CONVERSION(_macro) \ template <> \ _macro(float, double) GKO_NOT_IMPLEMENTED; \ diff --git a/test/base/device_matrix_data_kernels.cpp b/test/base/device_matrix_data_kernels.cpp index edb94ef0beb..f7c2fc76c35 100644 --- a/test/base/device_matrix_data_kernels.cpp +++ b/test/base/device_matrix_data_kernels.cpp @@ -325,7 +325,7 @@ TYPED_TEST(DeviceMatrixData, DoesntRemoveZerosIfThereAreNone) } -#ifndef GKO_COMPILING_DPCPP +#ifndef GKO_COMPILING_SYCL TYPED_TEST(DeviceMatrixData, SumsDuplicates) diff --git a/test/base/timer.cpp b/test/base/timer.cpp index 95295ce34ff..c62c303efda 100644 --- a/test/base/timer.cpp +++ b/test/base/timer.cpp @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. class Timer : public CommonTestFixture { -#ifdef GKO_COMPILING_DPCPP +#ifdef GKO_COMPILING_SYCL public: Timer() { diff --git a/test/components/prefix_sum_kernels.cpp b/test/components/prefix_sum_kernels.cpp index b2116236821..bbd2cb53d1f 100644 --- a/test/components/prefix_sum_kernels.cpp +++ b/test/components/prefix_sum_kernels.cpp @@ -121,7 +121,7 @@ TYPED_TEST(PrefixSum, DoesntOverflowFromLastElement) } -#ifndef GKO_COMPILING_DPCPP +#ifndef GKO_COMPILING_SYCL // TODO implement overflow check for DPC++ TYPED_TEST(PrefixSum, ThrowsOnOverflow) diff --git a/test/distributed/CMakeLists.txt b/test/distributed/CMakeLists.txt index 32b3810ea31..bcd56c43196 100644 --- a/test/distributed/CMakeLists.txt +++ b/test/distributed/CMakeLists.txt @@ -1,4 +1,4 @@ -ginkgo_create_common_test(matrix_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(partition_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(vector_kernels DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(matrix_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(partition_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(vector_kernels DISABLE_EXECUTORS sycl) ginkgo_create_common_and_reference_test(partition_helper_kernels) diff --git a/test/factorization/CMakeLists.txt b/test/factorization/CMakeLists.txt index e768a48ef05..dc708cfc319 100644 --- a/test/factorization/CMakeLists.txt +++ b/test/factorization/CMakeLists.txt @@ -1,8 +1,8 @@ -ginkgo_create_common_test(cholesky_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(lu_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(ic_kernels DISABLE_EXECUTORS dpcpp omp) -ginkgo_create_common_test(ilu_kernels DISABLE_EXECUTORS dpcpp omp) +ginkgo_create_common_test(cholesky_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(lu_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(ic_kernels DISABLE_EXECUTORS sycl omp) +ginkgo_create_common_test(ilu_kernels DISABLE_EXECUTORS sycl omp) ginkgo_create_common_test(par_ic_kernels) ginkgo_create_common_test(par_ict_kernels) ginkgo_create_common_test(par_ilu_kernels) -ginkgo_create_common_test(par_ilut_kernels DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(par_ilut_kernels DISABLE_EXECUTORS sycl) diff --git a/test/log/profiler_hook.cpp b/test/log/profiler_hook.cpp index f0dce3e4955..42c43764d01 100644 --- a/test/log/profiler_hook.cpp +++ b/test/log/profiler_hook.cpp @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. class ProfilerHook : public CommonTestFixture { -#ifdef GKO_COMPILING_DPCPP +#ifdef GKO_COMPILING_SYCL public: ProfilerHook() { diff --git a/test/matrix/CMakeLists.txt b/test/matrix/CMakeLists.txt index a9cf267a3c8..9d122e958dc 100644 --- a/test/matrix/CMakeLists.txt +++ b/test/matrix/CMakeLists.txt @@ -4,11 +4,11 @@ ginkgo_create_common_test(coo_kernels) ginkgo_create_common_test(dense_kernels) ginkgo_create_common_test(diagonal_kernels) ginkgo_create_common_test(ell_kernels) -ginkgo_create_common_test(fbcsr_kernels DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(fbcsr_kernels DISABLE_EXECUTORS sycl) if (hipfft_FOUND) - ginkgo_create_common_test(fft_kernels DISABLE_EXECUTORS dpcpp) + ginkgo_create_common_test(fft_kernels DISABLE_EXECUTORS sycl) else() - ginkgo_create_common_test(fft_kernels DISABLE_EXECUTORS dpcpp hip) + ginkgo_create_common_test(fft_kernels DISABLE_EXECUTORS sycl hip) endif() ginkgo_create_common_test(hybrid_kernels) ginkgo_create_common_test(matrix) diff --git a/test/matrix/csr_kernels2.cpp b/test/matrix/csr_kernels2.cpp index 4d3ffa61323..656daed11b2 100644 --- a/test/matrix/csr_kernels2.cpp +++ b/test/matrix/csr_kernels2.cpp @@ -1311,7 +1311,7 @@ TEST_F(Csr, CreateSubMatrixIsEquivalentToRef) } -#ifndef GKO_COMPILING_DPCPP +#ifndef GKO_COMPILING_SYCL TEST_F(Csr, CanDetectMissingDiagonalEntry) @@ -1361,4 +1361,4 @@ TEST_F(Csr, AddScaledIdentityToNonSquare) } -#endif // GKO_COMPILING_DPCPP +#endif // GKO_COMPILING_SYCL diff --git a/test/matrix/matrix.cpp b/test/matrix/matrix.cpp index 9192b2eeebe..6fb6b47d71a 100644 --- a/test/matrix/matrix.cpp +++ b/test/matrix/matrix.cpp @@ -161,7 +161,7 @@ struct CsrWithDefaultStrategy : CsrBase { #if defined(GKO_COMPILING_CUDA) || defined(GKO_COMPILING_HIP) || \ - defined(GKO_COMPILING_DPCPP) + defined(GKO_COMPILING_SYCL) struct CsrWithClassicalStrategy : CsrBase { @@ -864,7 +864,7 @@ class Matrix : public CommonTestFixture { using MatrixTypes = ::testing::Types< DenseWithDefaultStride, DenseWithCustomStride, Coo, CsrWithDefaultStrategy, #if defined(GKO_COMPILING_CUDA) || defined(GKO_COMPILING_HIP) || \ - defined(GKO_COMPILING_DPCPP) + defined(GKO_COMPILING_SYCL) CsrWithClassicalStrategy, CsrWithMergePathStrategy, CsrWithSparselibStrategy, CsrWithLoadBalanceStrategy, CsrWithAutomaticalStrategy, diff --git a/test/mpi/matrix.cpp b/test/mpi/matrix.cpp index 7b72f4aeaab..372cc03e7cf 100644 --- a/test/mpi/matrix.cpp +++ b/test/mpi/matrix.cpp @@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "test/utils/mpi/executor.hpp" -#ifndef GKO_COMPILING_DPCPP +#ifndef GKO_COMPILING_SYCL template diff --git a/test/mpi/preconditioner/CMakeLists.txt b/test/mpi/preconditioner/CMakeLists.txt index 4f734d21df8..1ef2c240e69 100644 --- a/test/mpi/preconditioner/CMakeLists.txt +++ b/test/mpi/preconditioner/CMakeLists.txt @@ -1 +1 @@ -ginkgo_create_common_and_reference_test(schwarz MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_and_reference_test(schwarz MPI_SIZE 3 DISABLE_EXECUTORS sycl) diff --git a/test/mpi/preconditioner/schwarz.cpp b/test/mpi/preconditioner/schwarz.cpp index 8586711a114..571af450068 100644 --- a/test/mpi/preconditioner/schwarz.cpp +++ b/test/mpi/preconditioner/schwarz.cpp @@ -64,11 +64,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "test/utils/mpi/executor.hpp" -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE using solver_value_type = float; #else using solver_value_type = double; -#endif // GINKGO_DPCPP_SINGLE_MODE +#endif // GINKGO_SYCL_SINGLE_MODE template diff --git a/test/mpi/solver/CMakeLists.txt b/test/mpi/solver/CMakeLists.txt index bffd7b5ab10..8be833f12f5 100644 --- a/test/mpi/solver/CMakeLists.txt +++ b/test/mpi/solver/CMakeLists.txt @@ -1 +1 @@ -ginkgo_create_common_and_reference_test(solver MPI_SIZE 3 DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_and_reference_test(solver MPI_SIZE 3 DISABLE_EXECUTORS sycl) diff --git a/test/mpi/solver/solver.cpp b/test/mpi/solver/solver.cpp index 59462a9be59..6933a072cf2 100644 --- a/test/mpi/solver/solver.cpp +++ b/test/mpi/solver/solver.cpp @@ -63,11 +63,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "test/utils/mpi/executor.hpp" -#if GINKGO_DPCPP_SINGLE_MODE +#if GINKGO_SYCL_SINGLE_MODE using solver_value_type = float; #else using solver_value_type = double; -#endif // GINKGO_DPCPP_SINGLE_MODE +#endif // GINKGO_SYCL_SINGLE_MODE template @@ -554,7 +554,7 @@ TYPED_TEST(Solver, AdvancedApplyIsEquivalentToRef) }); } -#if !(GINKGO_DPCPP_SINGLE_MODE) +#if !(GINKGO_SYCL_SINGLE_MODE) TYPED_TEST(Solver, MixedApplyIsEquivalentToRef) { using MixedVec = typename TestFixture::MixedVec; diff --git a/test/mpi/vector.cpp b/test/mpi/vector.cpp index a7ad735458c..bfd71c42352 100644 --- a/test/mpi/vector.cpp +++ b/test/mpi/vector.cpp @@ -131,7 +131,7 @@ TYPED_TEST_SUITE(VectorCreation, gko::test::ValueLocalGlobalIndexTypes, TupleTypenameNameGenerator); -#ifndef GKO_COMPILING_DPCPP +#ifndef GKO_COMPILING_SYCL TYPED_TEST(VectorCreation, CanReadGlobalMatrixData) diff --git a/test/preconditioner/CMakeLists.txt b/test/preconditioner/CMakeLists.txt index 5cbac8d2e84..2838b2cf194 100644 --- a/test/preconditioner/CMakeLists.txt +++ b/test/preconditioner/CMakeLists.txt @@ -1,2 +1,2 @@ -ginkgo_create_common_test(jacobi_kernels DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(jacobi_kernels DISABLE_EXECUTORS sycl) ginkgo_create_common_test(isai_kernels) diff --git a/test/reorder/CMakeLists.txt b/test/reorder/CMakeLists.txt index d87d5f8313c..8cd9dae7161 100644 --- a/test/reorder/CMakeLists.txt +++ b/test/reorder/CMakeLists.txt @@ -1,4 +1,4 @@ -ginkgo_create_common_test(amd DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(amd DISABLE_EXECUTORS sycl) if (GINKGO_HAVE_METIS) ginkgo_create_common_test(nested_dissection) endif() diff --git a/test/solver/CMakeLists.txt b/test/solver/CMakeLists.txt index 3cfe2db8ac3..6a1a31d1a40 100644 --- a/test/solver/CMakeLists.txt +++ b/test/solver/CMakeLists.txt @@ -3,16 +3,16 @@ ginkgo_create_common_test(bicgstab_kernels) ginkgo_create_common_test(cb_gmres_kernels) ginkgo_create_common_test(cg_kernels) ginkgo_create_common_test(cgs_kernels) -ginkgo_create_common_test(direct DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(direct DISABLE_EXECUTORS sycl) ginkgo_create_common_test(fcg_kernels) ginkgo_create_common_test(gcr_kernels) ginkgo_create_common_test(gmres_kernels) ginkgo_create_common_test(idr_kernels) ginkgo_create_common_test(ir_kernels) -ginkgo_create_common_test(lower_trs_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(multigrid_kernels DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(solver DISABLE_EXECUTORS dpcpp) -ginkgo_create_common_test(upper_trs_kernels DISABLE_EXECUTORS dpcpp) +ginkgo_create_common_test(lower_trs_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(multigrid_kernels DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(solver DISABLE_EXECUTORS sycl) +ginkgo_create_common_test(upper_trs_kernels DISABLE_EXECUTORS sycl) if(GINKGO_BUILD_SYCL) - gko_add_sycl_to_target(TARGET test_solver_idr_kernels_dpcpp SOURCES idr_kernels.cpp) + gko_add_sycl_to_target(TARGET test_solver_idr_kernels_sycl) endif() diff --git a/test/solver/idr_kernels.cpp b/test/solver/idr_kernels.cpp index 959c857cb71..db84ca91c9d 100644 --- a/test/solver/idr_kernels.cpp +++ b/test/solver/idr_kernels.cpp @@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#ifdef GKO_COMPILING_DPCPP +#ifdef GKO_COMPILING_SYCL #include #endif @@ -270,7 +270,7 @@ TEST_F(Idr, IdrComputeOmegaIsEquivalentToRef) TEST_F(Idr, IdrIterationOneRHSIsEquivalentToRef) { -#ifdef GKO_COMPILING_DPCPP +#ifdef GKO_COMPILING_SYCL if (exec->get_queue()->get_device().is_gpu()) { GTEST_SKIP() << "skip the test because oneMKL GEMM on gpu may give NaN " "(under investigation)";