Replace uses of __CUDA_ARCH__
and __NVCOMPILER_CUDA_ARCH__
for compile time target version checks
#976
Labels
libcu++
For all items related to libcu++
We currently use
__CUDA_ARCH__
/__NVCOMPILER_CUDA_ARCH__
in a few places that are difficult to replace withif target
:<cuda/[std/]atomic>
and<cuda/[std/]barrier>
, we need to produce a compile time error if the header is being compiled for an older SM target.memcpy_async
implementation details that are#if
'd out for older SM targets. I think we should probably just allow these to be present for all SM targets.atomic_flag
's wait/notify member functions is only defined for newer targets. Note that we do NOT do this foratomic
, which is strange.Possible solutions:
<nv/target>
that usesNV_TARGET_SM_INTEGER_LIST
instead to detect if any of the SMs in the list don't meet the requirements of the feature. This would require some preprocessor logic.static_assert_target
facility to NVC++. This wouldn't solve the case of thememcpy_async
overloads that should only be present for newer targets.The text was updated successfully, but these errors were encountered: