MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / checkDeviceWithRuntime

Function checkDeviceWithRuntime

src/backend/cuda/device_manager.cpp:216–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216bool 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
243void checkAndSetDevMaxCompute(pair<int, int> &computeCapability) {

Callers

nothing calls this directly

Calls 4

beginFunction · 0.85
endFunction · 0.85
fromCudaVersionFunction · 0.85
getFunction · 0.50

Tested by

no test coverage detected