10 #ifndef CUDA_API_WRAPPERS_FATBIN_VERSIONS_HPP_ 11 #define CUDA_API_WRAPPERS_FATBIN_VERSIONS_HPP_ 15 #if CUDA_VERSION >= 12040 22 namespace version_numbers {
24 #if CUDA_VERSION >= 12040 26 inline version_t
fatbin() {
27 unsigned int major { 0 }, minor { 0 };
29 auto status = nvFatbinVersion(&major, &minor);
32 if ( (major == 0) or (major > ::std::numeric_limits<int>::max())
33 or (minor == 0) or (minor > ::std::numeric_limits<int>::max())) {
34 throw ::std::logic_error(
"Invalid version encountered: (" 35 + ::std::to_string(major) +
", " + ::std::to_string(minor) +
')' );
38 return version_t{
static_cast<int>(major), static_cast<int>(minor) };
40 #endif // CUDA_VERSION >= 12040 45 #endif // CUDA_API_WRAPPERS_FATBIN_VERSIONS_HPP_ Facilities for exception-based handling of errors originating in NVIDIA's fatbin creating library (nv...
Definitions and functionality wrapping CUDA APIs.
Definition: array.hpp:22
PTX (microarchitecture-inspecific intermediate representation)
#define throw_if_error_lazy(status__,...)
A macro for only throwing an error if we've failed - which also ensures no string is constructed unle...
Definition: error.hpp:316