| 57 | } |
| 58 | |
| 59 | Version cudaRuntimeVersionComponents(size_t version) { |
| 60 | int major = static_cast<int>(version / 1000); |
| 61 | int minor = static_cast<int>((version - (major * 1000)) / 10); |
| 62 | int patch = |
| 63 | static_cast<int>((version - (major * 1000) - (minor * 10)) / 10); |
| 64 | return {major, minor, patch}; |
| 65 | } |
| 66 | |
| 67 | Version getCudnnVersion(const LibHandle& handle) { |
| 68 | std::function<size_t()> fptr(reinterpret_cast<size_t (*)()>( |