MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / ~DeviceManager

Method ~DeviceManager

src/backend/cuda/platform.cpp:186–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186DeviceManager::~DeviceManager() {
187 try {
188 // Reset unique_ptrs for all cu[BLAS | Sparse | Solver]
189 // handles of all devices
190 for (int i = 0; i < nDevices; ++i) {
191 setDevice(i);
192 cusolverManager(i)->reset();
193 cusparseManager(i)->reset();
194 cufftManager(i).reset();
195 cublasManager(i)->reset();
196#ifdef WITH_CUDNN
197 nnManager(i)->reset();
198#endif
199 }
200 } catch (const AfError &err) {
201 AF_TRACE(
202 "Exception thrown during destruction of DeviceManager(ignoring). "
203 "{}({}):{} "
204 "{}",
205 err.getFileName(), err.getLine(), err.getFunctionName(),
206 err.what());
207 } catch (...) {
208 AF_TRACE(
209 "Unknown exception thrown during destruction of "
210 "DeviceManager(ignoring)");
211 }
212}
213
214bool isDeviceBufferAccessible(int buf_device_id, int execution_id) {
215 DeviceManager &mngr = DeviceManager::getInstance();

Callers

nothing calls this directly

Calls 7

cusolverManagerFunction · 0.85
cusparseManagerFunction · 0.85
cublasManagerFunction · 0.85
nnManagerFunction · 0.85
resetMethod · 0.80
getLineMethod · 0.80
setDeviceFunction · 0.70

Tested by

no test coverage detected