CUPM: Cuda device crashes when cudaDeviceGetMemPool and cudaMallocAsync are not supported
On older cuda devices, the device attribute
int attr_val;
cudaDeviceGetAttribute(&attr_val, cudaDevAttrMemoryPoolsSupported , 0);
can be false. A possible workaround is:
- query cudaDevAttrMemoryPoolsSupported, and if false:
- do not call
cupmDeviceGetMemPool
andcupmMemPoolSetAttribute
incupmcontext.hpp::initialize
- replace the call in
PetscCUPMMallocAsync
fromcupmMallocAsync
tocupmMalloc
incupminterface.hpp
- replace the call in
cupmFreeAsync
fromcupmFreeAsync
tocupmFree
incupminterface.hpp