mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-15 02:05:37 +00:00
Printing mem info
This commit is contained in:
parent
595f512a6e
commit
a74e2dc12e
@ -149,6 +149,9 @@ inline void *acceleratorAllocShared(size_t bytes)
|
||||
ptr = (void *) NULL;
|
||||
printf(" cudaMallocManaged failed for %d %s \n",bytes,cudaGetErrorString(err));
|
||||
}
|
||||
// size_t free,total;
|
||||
// cudaMemGetInfo(&free,&total);
|
||||
// std::cout << "Malloc managed "<<bytes<<" "<<free<<"/"<<total<<std::endl;
|
||||
return ptr;
|
||||
};
|
||||
inline void *acceleratorAllocDevice(size_t bytes)
|
||||
@ -159,6 +162,9 @@ inline void *acceleratorAllocDevice(size_t bytes)
|
||||
ptr = (void *) NULL;
|
||||
printf(" cudaMalloc failed for %d %s \n",bytes,cudaGetErrorString(err));
|
||||
}
|
||||
// size_t free,total;
|
||||
// cudaMemGetInfo(&free,&total);
|
||||
// std::cout << "Malloc device "<<bytes<<" "<<free<<"/"<<total<<std::endl;
|
||||
return ptr;
|
||||
};
|
||||
inline void acceleratorFreeShared(void *ptr){ cudaFree(ptr);};
|
||||
|
Loading…
Reference in New Issue
Block a user