Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA On Windows (MSVC) #4309

Merged
merged 4 commits into from
Jan 24, 2025
Merged

CUDA On Windows (MSVC) #4309

merged 4 commits into from
Jan 24, 2025

Conversation

WeiqunZhang
Copy link
Member

@WeiqunZhang WeiqunZhang commented Jan 23, 2025

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.

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.
@WeiqunZhang WeiqunZhang force-pushed the win-cuda branch 4 times, most recently from 581a9e4 to d738812 Compare January 24, 2025 05:14
@ax3l ax3l self-assigned this Jan 24, 2025
@ax3l ax3l added the GPU label Jan 24, 2025
@ax3l ax3l changed the title CUDA On Windows CUDA On Windows (MSVC) Jan 24, 2025
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!! 🚀 ✨

@ax3l ax3l merged commit 4b34f9c into AMReX-Codes:development Jan 24, 2025
75 checks passed
@WeiqunZhang WeiqunZhang deleted the win-cuda branch January 25, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMReX Build Errors Windows Visual Studio 2022 (CUDA Enabled) - With Latest Development branch Pull
2 participants