chore(gpu): add a compilation conditional to assert we won't be checking for cudaDevAttrClusterLaunch on archs < 9.0

This commit is contained in:
Pedro Alves
2024-05-13 12:14:35 -03:00
committed by Agnès Leroy
parent 80fda99068
commit d167e9b38d

View File

@@ -86,12 +86,16 @@ bool cuda_check_support_cooperative_groups() {
/// false if Thread Block Cluster is not supported.
/// true otherwise
bool cuda_check_support_thread_block_clusters() {
#if CUDA_ARCH >= 900
// To-do: Is this really the best way to check support?
int tbc_supported = 0;
check_cuda_error(
cudaDeviceGetAttribute(&tbc_supported, cudaDevAttrClusterLaunch, 0));
return tbc_supported > 0;
#else
return false;
#endif
}
/// Copy memory to the GPU asynchronously