Skip to content

Commit d181635

Browse files
committed
up
1 parent fab5620 commit d181635

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/mlx/backend/metal/device.cpp b/mlx/backend/metal/device.cpp
2+
--- a/mlx/backend/metal/device.cpp
3+
+++ b/mlx/backend/metal/device.cpp
4+
@@ -39,6 +39,7 @@ auto load_device() {
5+
?: MTL::CreateSystemDefaultDevice();
6+
if (!device) {
7+
throw std::runtime_error("Failed to load device");
8+
}
9+
+ device->retain(); // Ensure device outlives the array/pool
10+
return device;
11+
}

0 commit comments

Comments
 (0)