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

Function getDriverVersion

src/backend/cuda/platform.cpp:312–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312string getDriverVersion() noexcept {
313 char driverVersion[1024] = {" "};
314 int x = nvDriverVersion(driverVersion, sizeof(driverVersion));
315 if (x != 1) {
316// Windows, OSX, Tegra Need a new way to fetch driver
317#if !defined(OS_WIN) && !defined(OS_MAC) && !defined(__arm__) && \
318 !defined(__aarch64__)
319 return "N/A";
320#endif
321 int driver = 0;
322 if (cudaDriverGetVersion(&driver)) { return "N/A"; }
323 return to_string(driver);
324 } else {
325 return string(driverVersion);
326 }
327}
328
329string getCUDARuntimeVersion() noexcept {
330 int runtime = 0;

Callers 2

getPlatformInfoFunction · 0.85

Calls 2

nvDriverVersionFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected