| 214 | } |
| 215 | |
| 216 | bool checkDeviceWithRuntime(int runtime, pair<int, int> compute) { |
| 217 | auto rt = find_if( |
| 218 | begin(Toolkit2MaxCompute), end(Toolkit2MaxCompute), |
| 219 | [runtime](cuNVRTCcompute c) { return c.cudaVersion == runtime; }); |
| 220 | if (rt == end(Toolkit2MaxCompute)) { |
| 221 | spdlog::get("platform") |
| 222 | ->warn( |
| 223 | "CUDA runtime version({}) not recognized. Please " |
| 224 | "create an issue or a pull request on the ArrayFire repository " |
| 225 | "to update the Toolkit2MaxCompute array with this version of " |
| 226 | "the CUDA Runtime. Continuing.", |
| 227 | fromCudaVersion(runtime)); |
| 228 | return true; |
| 229 | } |
| 230 | |
| 231 | if (rt->major >= compute.first) { |
| 232 | if (rt->major == compute.first) { |
| 233 | return rt->minor >= compute.second; |
| 234 | } else { |
| 235 | return true; |
| 236 | } |
| 237 | } else { |
| 238 | return false; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | /// Check for compatible compute version based on runtime cuda toolkit version |
| 243 | void checkAndSetDevMaxCompute(pair<int, int> &computeCapability) { |
nothing calls this directly
no test coverage detected