mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-30 07:18:15 +08:00
add pool threshold
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user