add pool threshold

This commit is contained in:
Awni Hannun
2025-10-27 16:26:57 -07:00
parent 58ccbaaf12
commit 21453281a4

View File

@@ -99,8 +99,10 @@ CudaAllocator::CudaAllocator()
loc.id = 0;
loc.type = cudaMemLocationTypeNone;
cudaMemGetDefaultMemPool(&cuda_pool_, &loc, cudaMemAllocationTypeManaged);
// TODO set that.
// uint64_t threshold = UINT64_MAX;
// TODO need a strategy for that
uint64_t threshold = UINT64_MAX;
cudaMemPoolSetAttribute(
cuda_pool_, cudaMemPoolAttrReleaseThreshold, &threshold);
#endif
}