From 90e9805fbcea1c2f1444c579449e70da7dde4f15 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Fri, 18 Mar 2022 21:05:50 +0100 Subject: [PATCH 1/8] add the HipfftError impl when no hipfft --- hip/matrix/fft_kernels_stub.hip.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hip/matrix/fft_kernels_stub.hip.cpp b/hip/matrix/fft_kernels_stub.hip.cpp index f2d06de281e..e99622c1eba 100644 --- a/hip/matrix/fft_kernels_stub.hip.cpp +++ b/hip/matrix/fft_kernels_stub.hip.cpp @@ -39,6 +39,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace gko { + + +std::string HipfftError::get_error(int64 error_code) +{ + return "Does not contain hipfft."; +} + + namespace kernels { namespace hip { /** From f091e9c72b68bee97489c7ab5820c245b6c9f565 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Mon, 4 Apr 2022 11:28:19 +0200 Subject: [PATCH 2/8] use rocm not hip and increase variety --- .gitlab-ci.yml | 102 +++++++++++++++++++++++++++++++++++++++++---- hip/CMakeLists.txt | 4 ++ 2 files changed, 97 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff934d46817..89d29f0ebdc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -530,12 +530,16 @@ build/cuda114/nompi/gcc/cuda/debug/shared: EXTRA_CMAKE_FLAGS: "-DCMAKE_CUDA_FLAGS=-diag-suppress=177" CUDA_ARCH: 61 -# HIP AMD -build/amd/nompi/gcc/hip/debug/shared: +# ROCm 3.5 and friends +build/amd/nompi/gcc/rocm35/debug/shared: <<: *default_build_with_test extends: - .quick_test_condition - - .use_gko-amd-openmpi-gnu8-llvm7 + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm35-openmpi-gnu5-llvm50 variables: <<: *default_variables BUILD_OMP: "ON" @@ -544,11 +548,15 @@ build/amd/nompi/gcc/hip/debug/shared: BUILD_TYPE: "Debug" FAST_TESTS: "ON" -build/amd/openmpi/clang/hip/release/static: +build/amd/openmpi/clang/rocm35/release/static: <<: *default_build_with_test extends: - - .quick_test_condition - - .use_gko-amd-openmpi-gnu8-llvm7 + - .full_test_condition + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm35-openmpi-gnu5-llvm50 variables: <<: *default_variables C_COMPILER: "clang" @@ -560,17 +568,93 @@ build/amd/openmpi/clang/hip/release/static: BUILD_TYPE: "Release" BUILD_SHARED_LIBS: "OFF" -# Build HIP AMD without omp -build/amd/nompi/clang/hip_wo_omp/release/shared: +# ROCm 4.5 and friends +build/amd/mvapich2/gcc/rocm45/release/shared: + <<: *default_build_with_test + extends: + - .quick_test_condition + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm45-mvapich2-gnu8-llvm8 + variables: + <<: *default_variables + BUILD_OMP: "ON" + BUILD_HIP: "ON" + RUN_EXAMPLES: "ON" + BUILD_TYPE: "Release" + +build/amd/mvapich2/clang/rocm45/debug/shared: + <<: *default_build_with_test + extends: + - .quick_test_condition + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm45-mvapich2-gnu8-llvm8 + variables: + <<: *default_variables + C_COMPILER: "clang" + CXX_COMPILER: "clang++" + BUILD_OMP: "ON" + BUILD_HIP: "ON" + RUN_EXAMPLES: "ON" + BUILD_TYPE: "Debug" + +# ROCm 5.1 and friends +build/amd/openmpi/gcc/rocm51/debug/static: <<: *default_build_with_test extends: - .full_test_condition - - .use_gko-amd-openmpi-gnu8-llvm7 + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 + variables: + <<: *default_variables + BUILD_OMP: "ON" + BUILD_HIP: "ON" + RUN_EXAMPLES: "ON" + BUILD_TYPE: "Debug" + BUILD_SHARED_LIBS: "OFF" + +build/amd/openmpi/clang/rocm51/release/shared: + <<: *default_build_with_test + extends: + - .quick_test_condition + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 variables: <<: *default_variables C_COMPILER: "clang" CXX_COMPILER: "clang++" + BUILD_OMP: "ON" BUILD_HIP: "ON" + RUN_EXAMPLES: "ON" + BUILD_TYPE: "Release" + +# without omp +build/amd/nompi/gcc/rocm51_wo_omp/release/shared: + <<: *default_build_with_test + extends: + - .full_test_condition + tags: + - private_ci + - amdci + - gpu + image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 + variables: + <<: *default_variables + BUILD_OMP: "OFF" + BUILD_MPI: "OFF" + BUILD_HIP: "ON" + RUN_EXAMPLES: "ON" BUILD_TYPE: "Release" # no cuda but latest gcc and clang diff --git a/hip/CMakeLists.txt b/hip/CMakeLists.txt index fe675987b84..2bbbc015b21 100644 --- a/hip/CMakeLists.txt +++ b/hip/CMakeLists.txt @@ -1,3 +1,7 @@ +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.21) + set(CMAKE_HIP_ARCHITECTURES OFF) +endif() + if (GINKGO_HIP_PLATFORM MATCHES "${HIP_PLATFORM_NVIDIA_REGEX}" AND GINKGO_BUILD_CUDA AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.2) message(FATAL_ERROR "Ginkgo HIP backend requires CUDA >= 9.2.") From 0820d6c51eae4eef920cfc3b8410f1ae25423964 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Wed, 6 Apr 2022 23:42:46 +0200 Subject: [PATCH 3/8] fix gcc5 on tuple from uninitialized list --- core/base/iterator_factory.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/base/iterator_factory.hpp b/core/base/iterator_factory.hpp index e4133c2d2b1..ac82a2b9184 100644 --- a/core/base/iterator_factory.hpp +++ b/core/base/iterator_factory.hpp @@ -84,7 +84,11 @@ class zip_iterator_reference template value_type cast_impl(std::index_sequence) const { - return {std::get(*this)...}; + // gcc 5 throws error as using unintialized array + // std::tuple t = { 1, '2' }; is not allowed. + // converting to 'std::tuple<...>' from initializer list would use + // explicit constructor + return value_type(std::get(*this)...); } template From b75c1c9ff170664330c1f4e36f8ffc4bcd064fc9 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Thu, 7 Apr 2022 13:46:58 +0200 Subject: [PATCH 4/8] relax error bound of sumdup due to hip with gnu<7 --- test/base/device_matrix_data_kernels.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/base/device_matrix_data_kernels.cpp b/test/base/device_matrix_data_kernels.cpp index c7325d7e97c..7e625537187 100644 --- a/test/base/device_matrix_data_kernels.cpp +++ b/test/base/device_matrix_data_kernels.cpp @@ -365,7 +365,8 @@ TYPED_TEST(DeviceMatrixData, SumsDuplicates) max_error, std::abs(arrays.values.get_const_data()[i] - ref_arrays.values.get_const_data()[i])); } - ASSERT_LT(max_error, r::value); + // when Hip with GNU < 7, it will give a little difference. + ASSERT_LT(max_error, 2 * r::value); } From a3386cb223415495c2c9dfbf367f457a8c1fda93 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Sun, 10 Apr 2022 23:38:58 +0200 Subject: [PATCH 5/8] use 5.0.2 and use loweset version --- .gitlab-ci.yml | 109 +++++++++++++++++----------------------------- .gitlab/image.yml | 35 ++++++++++++--- 2 files changed, 69 insertions(+), 75 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89d29f0ebdc..b9d932f512c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -535,11 +535,7 @@ build/amd/nompi/gcc/rocm35/debug/shared: <<: *default_build_with_test extends: - .quick_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm35-openmpi-gnu5-llvm50 + - .use_gko-rocm35-openmpi-gnu5-llvm50 variables: <<: *default_variables BUILD_OMP: "ON" @@ -552,11 +548,7 @@ build/amd/openmpi/clang/rocm35/release/static: <<: *default_build_with_test extends: - .full_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm35-openmpi-gnu5-llvm50 + - .use_gko-rocm35-openmpi-gnu5-llvm50 variables: <<: *default_variables C_COMPILER: "clang" @@ -573,11 +565,7 @@ build/amd/mvapich2/gcc/rocm45/release/shared: <<: *default_build_with_test extends: - .quick_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm45-mvapich2-gnu8-llvm8 + - .use_gko-rocm45-mvapich2-gnu8-llvm8 variables: <<: *default_variables BUILD_OMP: "ON" @@ -589,11 +577,7 @@ build/amd/mvapich2/clang/rocm45/debug/shared: <<: *default_build_with_test extends: - .quick_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm45-mvapich2-gnu8-llvm8 + - .use_gko-rocm45-mvapich2-gnu8-llvm8 variables: <<: *default_variables C_COMPILER: "clang" @@ -603,16 +587,12 @@ build/amd/mvapich2/clang/rocm45/debug/shared: RUN_EXAMPLES: "ON" BUILD_TYPE: "Debug" -# ROCm 5.1 and friends -build/amd/openmpi/gcc/rocm51/debug/static: +# ROCm 5.0.2 and friends +build/amd/openmpi/gcc/rocm502/debug/static: <<: *default_build_with_test extends: - .full_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 + - .use_gko-rocm502-openmpi-gnu11-llvm11 variables: <<: *default_variables BUILD_OMP: "ON" @@ -621,15 +601,11 @@ build/amd/openmpi/gcc/rocm51/debug/static: BUILD_TYPE: "Debug" BUILD_SHARED_LIBS: "OFF" -build/amd/openmpi/clang/rocm51/release/shared: +build/amd/openmpi/clang/rocm502/release/shared: <<: *default_build_with_test extends: - .quick_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 + - .use_gko-rocm502-openmpi-gnu11-llvm11 variables: <<: *default_variables C_COMPILER: "clang" @@ -640,15 +616,11 @@ build/amd/openmpi/clang/rocm51/release/shared: BUILD_TYPE: "Release" # without omp -build/amd/nompi/gcc/rocm51_wo_omp/release/shared: +build/amd/nompi/gcc/rocm502_wo_omp/release/shared: <<: *default_build_with_test extends: - .full_test_condition - tags: - - private_ci - - amdci - - gpu - image: localhost:5000/hpccm_hip_01b559e2_gko-rocm51-openmpi-gnu11-llvm11 + - .use_gko-rocm502-openmpi-gnu11-llvm11 variables: <<: *default_variables BUILD_OMP: "OFF" @@ -681,18 +653,6 @@ build/nocuda/nompi/clang/core/release/shared: CXX_COMPILER: "clang++" BUILD_TYPE: "Release" -build/nocuda/nompi/intel/core/debug/shared: - <<: *default_build_with_test - extends: - - .quick_test_condition - - .use_gko-nocuda-mvapich2-gnu9-llvm8-intel - variables: - <<: *default_variables - C_COMPILER: "icc" - CXX_COMPILER: "icpc" - BUILD_TYPE: "Debug" - FAST_TESTS: "ON" - build/nocuda/nompi/gcc/omp/release/shared: <<: *default_build_with_test extends: @@ -719,19 +679,44 @@ build/nocuda/openmpi/clang/omp/debug/static: FAST_TESTS: "ON" BUILD_SHARED_LIBS: "OFF" -build/nocuda/nompi/intel/omp/release/static: +# nocuda with the oldest supported compiler +build/nocuda/nompi/intel/core/debug/shared: <<: *default_build_with_test extends: - .quick_test_condition - - .use_gko-nocuda-mvapich2-gnu9-llvm8-intel + - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 variables: <<: *default_variables C_COMPILER: "icc" CXX_COMPILER: "icpc" + BUILD_TYPE: "Debug" + FAST_TESTS: "ON" + +build/nocuda/nompi/gcc/omp/release/static: + <<: *default_build_with_test + extends: + - .quick_test_condition + - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 + variables: + <<: *default_variables BUILD_OMP: "ON" BUILD_TYPE: "Release" BUILD_SHARED_LIBS: "OFF" +build/nocuda-nomixed/nompi/clang/omp/release/static: + <<: *default_build_with_test + extends: + - .full_test_condition + - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 + variables: + <<: *default_variables + C_COMPILER: "clang" + CXX_COMPILER: "clang++" + BUILD_OMP: "ON" + BUILD_TYPE: "Release" + BUILD_SHARED_LIBS: "OFF" + MIXED_PRECISION: "OFF" + build/nocuda-nomixed/openmpi/gcc/omp/release/shared: <<: *default_build_with_test extends: @@ -759,20 +744,6 @@ build/nocuda-nomixed/nompi/clang/omp/debug/static: BUILD_SHARED_LIBS: "OFF" MIXED_PRECISION: "OFF" -build/nocuda-nomixed/nompi/intel/omp/release/static: - <<: *default_build_with_test - extends: - - .full_test_condition - - .use_gko-nocuda-mvapich2-gnu9-llvm8-intel - variables: - <<: *default_variables - C_COMPILER: "icc" - CXX_COMPILER: "icpc" - BUILD_OMP: "ON" - BUILD_TYPE: "Release" - BUILD_SHARED_LIBS: "OFF" - MIXED_PRECISION: "OFF" - build/dpcpp/cpu/release/static: <<: *default_build_with_test extends: @@ -1105,7 +1076,7 @@ cudamemcheck: fineci-benchmark-build: stage: benchmark-build extends: - - .use_gko-nocuda-mvapich2-gnu9-llvm8-intel + - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 variables: <<: *default_variables BENCHMARK_SERVER: FINECI @@ -1183,7 +1154,7 @@ fineci-benchmark-build: fineci-benchmark-cuda: stage: benchmark-cuda extends: - - .use_gko-nocuda-mvapich2-gnu9-llvm8-intel + - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 variables: <<: *default_variables BENCHMARK_SERVER: FINECI diff --git a/.gitlab/image.yml b/.gitlab/image.yml index 2bf07a7e73d..5956fd0981c 100644 --- a/.gitlab/image.yml +++ b/.gitlab/image.yml @@ -5,12 +5,12 @@ - cpu - amdci -.use_gko-nocuda-mvapich2-gnu9-llvm8-intel: - image: ginkgohub/cpu:mvapich2-gnu9-llvm8-intel2020 +.use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018: + image: localhost:5000/hpccm_hip_be95edf6_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 tags: - private_ci - - cpu - - controller + - amdci + - gpu .use_gko-cuda90-openmpi-gnu5-llvm39: image: ginkgohub/cuda:openmpi-90-gnu5-llvm39 @@ -61,15 +61,17 @@ - cpu .use_gko-cuda110-mvapich2-gnu9-llvm9-intel2020: - image: ginkgohub/cuda:110-mvapich2-gnu9-llvm9-intel2020 + image: localhost:5000/hpccm_hip_be95edf6_gko-cuda110-mvapich2-gnu9-llvm9-intel2020 tags: - private_ci + - amdci - nvidia-gpu .use_gko_cuda114-openmpi-gnu11-llvm12: - image: ginkgohub/cuda:114-openmpi-gnu11-llvm12 + image: localhost:5000/hpccm_hip_be95edf6_gko-cuda114-openmpi-gnu11-llvm12 tags: - private_ci + - amdci - nvidia-gpu .use_gko-amd-openmpi-gnu8-llvm7: @@ -79,6 +81,27 @@ - amdci - gpu +.use_gko-rocm35-openmpi-gnu5-llvm50: + image: localhost:5000/hpccm_hip_be95edf6_gko-rocm35-openmpi-gnu5-llvm50 + tags: + - private_ci + - amdci + - gpu + +.use_gko-rocm45-mvapich2-gnu8-llvm8: + image: localhost:5000/hpccm_hip_be95edf6_gko-rocm45-mvapich2-gnu8-llvm8 + tags: + - private_ci + - amdci + - gpu + +.use_gko-rocm502-openmpi-gnu11-llvm11: + image: localhost:5000/hpccm_hip_be95edf6_gko-rocm502-openmpi-gnu11-llvm11 + tags: + - private_ci + - amdci + - gpu + .use_gko-oneapi-cpu: image: ginkgohub/oneapi:latest tags: From c02bac9511e52dcb643096a2448285faa7035056 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Mon, 11 Apr 2022 18:00:23 +0200 Subject: [PATCH 6/8] fix intel with old gcc and hip debug static --- .gitlab-ci.yml | 2 ++ hip/CMakeLists.txt | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9d932f512c..282eac6f039 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -687,6 +687,8 @@ build/nocuda/nompi/intel/core/debug/shared: - .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 variables: <<: *default_variables + # intel with old gcc without include path leads error: identifier "____m128d" is undefined + CXX_FLAGS: "-I /opt/intel/include/icc" C_COMPILER: "icc" CXX_COMPILER: "icpc" BUILD_TYPE: "Debug" diff --git a/hip/CMakeLists.txt b/hip/CMakeLists.txt index 2bbbc015b21..2d59e018fbc 100644 --- a/hip/CMakeLists.txt +++ b/hip/CMakeLists.txt @@ -279,7 +279,12 @@ if(GINKGO_HIP_AMDGPU) endforeach() endif() -set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP") +if(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]" AND GINKGO_STATIC_OR_SHARED MATCHES "STATIC") + # Debug Static: Hip requires PIC flags + set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP -fPIC") +else() + set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP") +endif() set(GINKGO_HIP_NVCC_OPTIONS ${GINKGO_HIP_NVCC_COMPILER_FLAGS} ${GINKGO_HIP_NVCC_ARCH} ${GINKGO_HIP_NVCC_ADDITIONAL_FLAGS}) set(GINKGO_HIP_CLANG_OPTIONS ${GINKGO_HIP_CLANG_COMPILER_FLAGS} ${GINKGO_AMD_ARCH_FLAGS}) From b2f31ff8e5f3b1028898423534f3976d7a2aaf53 Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Tue, 12 Apr 2022 12:55:52 +0200 Subject: [PATCH 7/8] fix test_install and test_exportbuild --- CMakeLists.txt | 2 ++ test/test_install/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac02b8ade62..31175e23c9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,6 +380,7 @@ add_custom_target(test_install -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} # `--config cfg` is ignored by single-configuration generator. # `$` is always be the same as `CMAKE_BUILD_TYPE` in # single-configuration generator. @@ -400,6 +401,7 @@ add_custom_target(test_exportbuild -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} # `--config cfg` is ignored by single-configuration generator. # `$` is always be the same as `CMAKE_BUILD_TYPE` in # single-configuration generator. diff --git a/test/test_install/CMakeLists.txt b/test/test_install/CMakeLists.txt index c635a62b25c..9807801d52f 100644 --- a/test/test_install/CMakeLists.txt +++ b/test/test_install/CMakeLists.txt @@ -58,6 +58,9 @@ if(GINKGO_BUILD_HIP) set (GINKGO_PIC_OPTION "-fPIC") set (GINKGO_CUDA_PIC_OPTION "-Xcompiler '-fPIC'") endif() + if (NOT GINKGO_BUILD_SHARED_LIBS AND CMAKE_BUILD_TYPE MATCHES [Dd][Ee][Bb][Uu][Gg]) + set (GINKGO_PIC_OPTION "-fPIC") + endif() if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") set(TESTINSTALL_CUDA_ARCH_FLAGS "${GINKGO_CUDA_ARCH_FLAGS}") endif() From cb4ca9d968eddc6bcfd3035c57134224c2080deb Mon Sep 17 00:00:00 2001 From: "Yuhsiang M. Tsai" Date: Wed, 13 Apr 2022 22:38:13 +0200 Subject: [PATCH 8/8] fix multi-config and use the deploy one Co-authored-by: Tobias Ribizel --- .gitlab/image.yml | 25 ++++++++---------------- hip/CMakeLists.txt | 4 ++-- test/base/device_matrix_data_kernels.cpp | 4 ++-- test/test_install/CMakeLists.txt | 5 ++--- 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.gitlab/image.yml b/.gitlab/image.yml index 5956fd0981c..e64b2cfeb60 100644 --- a/.gitlab/image.yml +++ b/.gitlab/image.yml @@ -6,11 +6,11 @@ - amdci .use_gko-nocuda-mvapich2-gnu5-llvm39-intel2018: - image: localhost:5000/hpccm_hip_be95edf6_gko-nocuda-mvapich2-gnu5-llvm39-intel2018 + image: ginkgohub/cpu:mvapich2-gnu5-llvm39-intel2018 tags: - private_ci - - amdci - - gpu + - cpu + - controller .use_gko-cuda90-openmpi-gnu5-llvm39: image: ginkgohub/cuda:openmpi-90-gnu5-llvm39 @@ -61,42 +61,33 @@ - cpu .use_gko-cuda110-mvapich2-gnu9-llvm9-intel2020: - image: localhost:5000/hpccm_hip_be95edf6_gko-cuda110-mvapich2-gnu9-llvm9-intel2020 + image: ginkgohub/cuda:110-mvapich2-gnu9-llvm9-intel2020 tags: - private_ci - - amdci - nvidia-gpu .use_gko_cuda114-openmpi-gnu11-llvm12: - image: localhost:5000/hpccm_hip_be95edf6_gko-cuda114-openmpi-gnu11-llvm12 + image: ginkgohub/cuda:114-openmpi-gnu11-llvm12 tags: - private_ci - - amdci - nvidia-gpu -.use_gko-amd-openmpi-gnu8-llvm7: - image: ginkgohub/rocm:gnu8-openmpi-llvm7 - tags: - - private_ci - - amdci - - gpu - .use_gko-rocm35-openmpi-gnu5-llvm50: - image: localhost:5000/hpccm_hip_be95edf6_gko-rocm35-openmpi-gnu5-llvm50 + image: ginkgohub/rocm:35-openmpi-gnu5-llvm50 tags: - private_ci - amdci - gpu .use_gko-rocm45-mvapich2-gnu8-llvm8: - image: localhost:5000/hpccm_hip_be95edf6_gko-rocm45-mvapich2-gnu8-llvm8 + image: ginkgohub/rocm:45-mvapich2-gnu8-llvm8 tags: - private_ci - amdci - gpu .use_gko-rocm502-openmpi-gnu11-llvm11: - image: localhost:5000/hpccm_hip_be95edf6_gko-rocm502-openmpi-gnu11-llvm11 + image: ginkgohub/rocm:502-openmpi-gnu11-llvm11 tags: - private_ci - amdci diff --git a/hip/CMakeLists.txt b/hip/CMakeLists.txt index 2d59e018fbc..270a6fb1d14 100644 --- a/hip/CMakeLists.txt +++ b/hip/CMakeLists.txt @@ -279,9 +279,9 @@ if(GINKGO_HIP_AMDGPU) endforeach() endif() -if(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]" AND GINKGO_STATIC_OR_SHARED MATCHES "STATIC") +if(GINKGO_STATIC_OR_SHARED MATCHES "STATIC") # Debug Static: Hip requires PIC flags - set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP -fPIC") + set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP $<$:-fPIC>") else() set(GINKGO_HIPCC_OPTIONS ${GINKGO_HIP_COMPILER_FLAGS} "-std=c++14 -DGKO_COMPILING_HIP") endif() diff --git a/test/base/device_matrix_data_kernels.cpp b/test/base/device_matrix_data_kernels.cpp index 7e625537187..3d55ae021a6 100644 --- a/test/base/device_matrix_data_kernels.cpp +++ b/test/base/device_matrix_data_kernels.cpp @@ -30,7 +30,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *************************************************************/ -#include "core/base/device_matrix_data_kernels.hpp" +#include #include @@ -41,11 +41,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include #include #include +#include "core/base/device_matrix_data_kernels.hpp" #include "core/test/utils.hpp" #include "core/test/utils/assertions.hpp" #include "test/utils/executor.hpp" diff --git a/test/test_install/CMakeLists.txt b/test/test_install/CMakeLists.txt index 9807801d52f..9f5df7a6c63 100644 --- a/test/test_install/CMakeLists.txt +++ b/test/test_install/CMakeLists.txt @@ -57,9 +57,8 @@ if(GINKGO_BUILD_HIP) if (GINKGO_BUILD_SHARED_LIBS) set (GINKGO_PIC_OPTION "-fPIC") set (GINKGO_CUDA_PIC_OPTION "-Xcompiler '-fPIC'") - endif() - if (NOT GINKGO_BUILD_SHARED_LIBS AND CMAKE_BUILD_TYPE MATCHES [Dd][Ee][Bb][Uu][Gg]) - set (GINKGO_PIC_OPTION "-fPIC") + else() + set (GINKGO_PIC_OPTION "$<$:-fPIC>") endif() if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") set(TESTINSTALL_CUDA_ARCH_FLAGS "${GINKGO_CUDA_ARCH_FLAGS}")