| 523 | |
| 524 | #ifdef WITH_CUDNN |
| 525 | cudnnHandle_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 | |
| 542 | SolveHandle solverDnHandle() { return *cusolverManager(getActiveDeviceId()); } |
no test coverage detected