-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement various workarounds for CUDA on Windows. - Redo some kernel launch macros because they do not work in function templates. - Extended lambda does not work inside if constexpr blocks. - Inline some function templates to avoid function mismatch. - Remove some static asserts that do not work for CUDA on Windows. - Replace small with sml because a windows system header has `#define small char`. - Disable probinit. - Disable DeviceGlobal test. Add CUDA On Windows CI with cuda toolkit installed by Jimver/cuda-toolkit.
- Loading branch information
1 parent
0f46a16
commit 21e7ab3
Showing
25 changed files
with
345 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ jobs: | |
if: needs.check_changes.outputs.has_non_docs_changes == 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# If we add ccache back, don't forget to update cleanup-cache.yml | ||
#- name: Set Up Cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
|
@@ -66,6 +67,7 @@ jobs: | |
if: needs.check_changes.outputs.has_non_docs_changes == 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# If we add ccache back, don't forget to update cleanup-cache.yml | ||
#- name: Set Up Cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
|
@@ -144,4 +146,32 @@ jobs: | |
set "PATH=%PATH%;D:\\a\amrex\amrex\installdir\bin" | ||
cmake --build build --config Release --target test_install | ||
# If we add ccache back, don't forget to update cleanup-cache.yml | ||
tests_cuda: | ||
name: CUDA on Windows | ||
runs-on: windows-latest | ||
needs: check_changes | ||
if: needs.check_changes.outputs.has_non_docs_changes == 'true' | ||
steps: | ||
- uses: Jimver/[email protected] | ||
id: cuda-toolkit | ||
with: | ||
cuda: '12.6.1' | ||
use-github-cache: 'false' | ||
- uses: actions/checkout@v4 | ||
- name: Compile | ||
run: | | ||
cmake -S . -B build ` | ||
-DCUDAToolkit_ROOT="$Env:CUDA_PATH" ` | ||
-DCMAKE_VERBOSE_MAKEFILE=ON ` | ||
-DCMAKE_BUILD_TYPE=Release ` | ||
-DAMReX_GPU_BACKEND=CUDA ` | ||
-DAMReX_CUDA_ARCH="8.0" ` | ||
-DAMReX_ENABLE_TESTS=ON ` | ||
-DAMReX_EB=ON ` | ||
-DAMReX_FFT=ON ` | ||
-DAMReX_LINEAR_SOLVERS=ON ` | ||
-DAMReX_PARTICLES=ON ` | ||
-DAMReX_FORTRAN=OFF ` | ||
-DAMReX_MPI=OFF | ||
cmake --build build --config Release -j 4 | ||
cmake --build build --config Release --target install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.