Skip to content

Commit

Permalink
Add compile-time check for minimum CUDA arch (#855)
Browse files Browse the repository at this point in the history
MatX requires CUDA compute capability / architecture 6.0 (Pascal)
or newer. Building for an older version, such as 5.2 (Maxwell),
results in errors due to missing atomic support for some data
types. Add an explicit check to the matx.h header to generate
an earlier compile-time error that specifies the minimum architecture
requirement.
  • Loading branch information
tbensonatl authored Feb 4, 2025
1 parent 877b4ec commit b3ca482
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/matx.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

#pragma once
#ifdef __CUDACC__
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600
#error "MatX requires CUDA compute capability 6.0 or newer."
#endif
#include <cuda_runtime_api.h>
#endif
#include <cuda/std/ccomplex>
Expand Down

0 comments on commit b3ca482

Please sign in to comment.