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

Function nnHandle

src/backend/cuda/platform.cpp:525–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523
524#ifdef WITH_CUDNN
525cudnnHandle_t nnHandle() {
526 // Keep the getCudnnPlugin call here because module loading can throw an
527 // exception the first time its called. We want to avoid that because
528 // the unique handle object is marked noexcept and could terminate. if
529 // the module is not loaded correctly
530 static cudnnModule keep_me_to_avoid_exceptions_exceptions =
531 getCudnnPlugin();
532 static unique_handle<cudnnHandle_t> *handle =
533 nnManager(getActiveDeviceId());
534 if (*handle) {
535 return *handle;
536 } else {
537 AF_ERROR("Error Initializing cuDNN\n", AF_ERR_RUNTIME);
538 }
539}
540#endif
541
542SolveHandle solverDnHandle() { return *cusolverManager(getActiveDeviceId()); }

Callers 3

convolve2_cudnnFunction · 0.85
data_gradient_cudnnFunction · 0.85
filter_gradient_cudnnFunction · 0.85

Calls 2

nnManagerFunction · 0.85
getActiveDeviceIdFunction · 0.70

Tested by

no test coverage detected