From 3541a5844576b69db81b73a0a12bc5e7609cb6dc Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Tue, 2 Jan 2024 09:59:58 -0800 Subject: [PATCH] increase block limit to original --- mlx/backend/metal/allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlx/backend/metal/allocator.cpp b/mlx/backend/metal/allocator.cpp index a3e90df83..07f502998 100644 --- a/mlx/backend/metal/allocator.cpp +++ b/mlx/backend/metal/allocator.cpp @@ -148,7 +148,7 @@ MetalAllocator::MetalAllocator() : device_(device(mlx::core::Device::gpu).mtl_device()), buffer_cache_(device_), peak_allocated_size_(0), - block_limit_(device_->recommendedMaxWorkingSetSize()), + block_limit_(1.5 * device_->recommendedMaxWorkingSetSize()), gc_limit_(0.95 * device_->recommendedMaxWorkingSetSize()) {} Buffer MetalAllocator::malloc(size_t size, bool allow_swap /* = false */) {