GridTools / gridtools

Libraries and utilities to develop performance portable applications for weather and climate.
https://gridtools.github.io/gridtools
Other
60 stars 21 forks source link

Fix __builtin_assume usage with CUDA #1791

Closed iomaganaris closed 2 months ago

iomaganaris commented 2 months ago

It seems like the nvcc compiler for device code doesn't support the check __has_builtin(__builtin_assume) even if __builtin_assume is supported since CUDA 11.2. Adding a check for __CUDA_ARCH__ and the compiler version fixes the issue. See godbolt example.

havogt commented 2 months ago

It should be fixed in #1789. Can you test that PR (maybe after adding the __CUDA_ARCH__ check).

gridtoolsjenkins commented 2 months ago

Hi there, this is jenkins continuous integration... Do you want me to verify this patch?

iomaganaris commented 2 months ago

It should be fixed in #1789. Can you test that PR (maybe after adding the __CUDA_ARCH__ check).

Missed this PR.. It works as expected so this PR can be closed.