-
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 (with MSVC + NVCC). - Redo some kernel launch macros because they do not work in function templates. - Work around the limitation that the extended lambda does not work inside `if constexpr` blocks. - Inline some function templates to avoid function mismatch. - Remove some SFINAE that do not work for CUDA on Windows. - Replace small with sml because a windows system header has `#define small char`. - Implement isnan and isinf for device code. - Disable probinit. - Skip DeviceGlobal and single precision linear solver tests because of certain limitations. Add CUDA On Windows CI with cuda toolkit installed by Jimver/cuda-toolkit.
- Loading branch information
1 parent
0f46a16
commit 4b34f9c
Showing
33 changed files
with
570 additions
and
453 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,31 @@ 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 ` | ||
-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
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.