__CUDA_ARCH__ is not defined

While compiling on the Orin, I get this error:

In file included from /usr/local/cuda-11.4/include/cublas_v2.h:65:
In file included from /usr/local/cuda-11.4/include/cublas_api.h:76:
In file included from /usr/local/cuda-11.4/include/cuda_bf16.h:3584:
/usr/local/cuda-11.4/include/cuda_bf16.hpp:428:5: error: '__CUDA_ARCH__' is not defined, evaluates to 0 [-Werror,-Wundef]
#if __CUDA_ARCH__ >= 800

CUDA_ARCH is not defined for host compilation, and other posts explain that is better to check if CUDA_ARCH is defined before using it. Since this is a cuda header, could this fix be applied there too?

Thank you,

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.


Could you share a source that can reproduce this issue?
Is this can be reproduced with the default CUDA sample directly?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.