From 83bb53f997754c2530718251680abaab33f28746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20=C3=9Clgen?= Date: Fri, 2 Feb 2024 18:19:25 +0000 Subject: [PATCH] CUDA Test 6 --- .github/workflows/release.yml | 15 ++++++++++----- niftyreg_build_version.txt | 2 +- reg-lib/cuda/CMakeLists.txt | 16 ++++++++-------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7382e6d..6aff37e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,13 +10,19 @@ jobs: strategy: matrix: os: [ubuntu-20.04, macos-latest, windows-2019] + platform: [cpu, cuda] include: + - platform: cpu + platform-name: "" + use-cuda: "OFF" + - platform: cuda + platform-name: "-CUDA" + use-cuda: "ON" - os: ubuntu-20.04 # For Ubuntu only os-name: "Ubuntu" - use_cuda: "ON" - os: macos-latest # For macOS only os-name: "macOS" - use_cuda: "OFF" + use-cuda: "OFF" - sudo: "sudo" # For Ubuntu and macOS c-compiler: "gcc" cxx-compiler: "g++" @@ -25,7 +31,6 @@ jobs: sudo: "" c-compiler: "cl.exe" cxx-compiler: "cl.exe" - use_cuda: "ON" - build_type: "Release" # For all platforms steps: @@ -54,7 +59,7 @@ jobs: -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ -DBUILD_ALL_DEP=ON \ - -DUSE_CUDA=${{ matrix.use_cuda }} \ + -DUSE_CUDA=${{ matrix.use-cuda }} \ -DUSE_OPENCL=OFF \ -DUSE_SSE=ON \ -DUSE_OPENMP=ON \ @@ -94,4 +99,4 @@ jobs: with: repo_token: ${{ github.token }} file: build/NiftyReg.zip - asset_name: NiftyReg-${{ matrix.os-name }}-${{ steps.get_tag.outputs.tag }}.zip \ No newline at end of file + asset_name: NiftyReg-${{ matrix.os-name }}${{ matrix.platform-name }}-${{ steps.get_tag.outputs.tag }}.zip \ No newline at end of file diff --git a/niftyreg_build_version.txt b/niftyreg_build_version.txt index 45843d29..066cbfe9 100644 --- a/niftyreg_build_version.txt +++ b/niftyreg_build_version.txt @@ -1 +1 @@ -399 +401 diff --git a/reg-lib/cuda/CMakeLists.txt b/reg-lib/cuda/CMakeLists.txt index b2272566..c4e43bc7 100755 --- a/reg-lib/cuda/CMakeLists.txt +++ b/reg-lib/cuda/CMakeLists.txt @@ -30,15 +30,15 @@ # return() # endif("${RUN_OUTPUT_VAR}" LESS "30") # string(REPLACE "." "" CAPABILITY_CODE ${RUN_OUTPUT_VAR}) - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_52,code=sm_52") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_52,code=sm_52") set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_60,code=sm_60") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_61,code=sm_61") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_70,code=sm_70") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_80,code=sm_80") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_86,code=sm_86") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_89,code=sm_89") - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_89,code=compute_89") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_61,code=sm_61") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_70,code=sm_70") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_80,code=sm_80") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_86,code=sm_86") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_89,code=sm_89") + # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_89,code=compute_89") # If desired, add PIC flags if(CMAKE_POSITION_INDEPENDENT_CODE AND DEFINED CMAKE_C_COMPILE_OPTIONS_PIC) # Add (undocumented) CMake flag that should tell the host compiler to generate position independent code