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

[Build] _NV_IF__NV_TARGET_BOOL_NV_PROVIDES_SM_90 is undefined #299

Closed
dmikushin opened this issue Mar 5, 2024 · 1 comment
Closed

[Build] _NV_IF__NV_TARGET_BOOL_NV_PROVIDES_SM_90 is undefined #299

dmikushin opened this issue Mar 5, 2024 · 1 comment

Comments

@dmikushin
Copy link
Contributor

By some reason, SM90-related constructs in cuda_fp16.hpp make the compilation to fail for me:

/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda_fp16.hpp(1337): error: type name is not allowed
  unsigned int tmp; asm("cvt.rzi.s8.f16 %0, %1;" : "=r"(tmp) : "h"(*(reinterpret_cast<const unsigned short *>(&(h))))); const unsigned char u = static_cast<unsigned char>(tmp); i = static_cast<signed char>(u);
  ^

/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda_fp16.hpp(1337): error: expected a ")"
  unsigned int tmp; asm("cvt.rzi.s8.f16 %0, %1;" : "=r"(tmp) : "h"(*(reinterpret_cast<const unsigned short *>(&(h))))); const unsigned char u = static_cast<unsigned char>(tmp); i = static_cast<signed char>(u);
           ^

/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda_fp16.hpp(1337): error: identifier "_NV_IF__NV_TARGET_BOOL_NV_PROVIDES_SM_90" is undefined
  { _NV_IF__NV_TARGET_BOOL_NV_PROVIDES_SM_90(
    ^

I've tried CUDA 12.2 and 12.3, same issue. It occurs regardless of whether or not the 90 arch is actually requested for building. AMGX compilation only works with CUDA 11.8.0.

My distro is wsl-ubuntu 22.04, and GCC is 11.4.

It's quite surprising nobody else is getting this error anywhere. What am I missing?

@dmikushin
Copy link
Contributor Author

This issue occurred as a result of the clash between the separate CUB & libcudacxx dependencies and the same headers provided by the CUDA Toolkit. So the solution is: do NOT use standalone CUB & libcudacxx for AMGX. If AMGX is not able to find them, do not try to provide them separately; instead fix AMGX to properly find CUB & libcudacxx in the CUDA Toolkit include directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant