MCPcopy Create free account
hub / github.com/ml-explore/mlx / set_cache_limit

Method set_cache_limit

mlx/backend/cuda/allocator.cpp:374–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374size_t CudaAllocator::set_cache_limit(size_t limit) {
375 std::lock_guard lk(mutex_);
376 std::swap(limit, max_pool_size_);
377 return limit;
378}
379
380void CudaAllocator::clear_cache() {
381 std::lock_guard lk(mutex_);

Callers 2

test_memory_infoMethod · 0.45
set_cache_limitFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_memory_infoMethod · 0.36