Skip to content

Commit

Permalink
CI: Windows + CUDA
Browse files Browse the repository at this point in the history
Fix NVCC Hint via CMAKE_CUDA_COMPILER
  • Loading branch information
ax3l committed Dec 22, 2020
1 parent c9a571f commit ab5d3e3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,38 @@ jobs:
-DAMReX_MPI=OFF `
-DAMReX_PARTICLES=ON
cmake --build build --config Release -j 2
# Build libamrex and all tutorials with CUDA
tutorials-cuda:
name: MSVC C++17 w/ [email protected] w/o Fortran w/o MPI
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Windows CUDA Cache
uses: actions/cache@v2
with:
path: "C:/Program Files/NVIDIA GPU Computing Toolkit/"
key: msvc_cxx17_cuda111
- name: Download CUDA
run: |
if (Test-Path "C:\Program Files\NVIDIA GPU Computing Toolkit\") { exit }
New-item -ItemType directory -Name cuda
Set-Location -Path cuda -PassThru
Invoke-WebRequest -Uri 'https://developer.download.nvidia.com/compute/cuda/11.1.1/network_installers/cuda_11.1.1_win10_network.exe' -OutFile 'cuda_install.exe'
Start-Process -FilePath '.\cuda_install.exe' -ArgumentList '-s' -Wait -NoNewWindow
- name: Build & Install
run: |
cmake -S . -B build `
-G "Ninja" `
-DAMReX_BUILD_TUTORIALS=ON `
-DAMReX_FORTRAN=OFF `
-DAMReX_MPI=OFF `
-DAMReX_GPU_BACKEND=CUDA `
-DCMAKE_CXX_STANDARD=17 `
-DCMAKE_CUDA_STANDARD=17 `
-DAMReX_CUDA_ARCH=6.0 `
-DCMAKE_CUDA_COMPILER="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/bin/nvcc.exe"
cmake --build build -j 2
# use "cmd", see https://gitlab.kitware.com/cmake/cmake/-/issues/20281
# -DAMReX_PARTICLES=ON

0 comments on commit ab5d3e3

Please sign in to comment.