diff --git a/mlx/backend/common/conv.cpp b/mlx/backend/common/conv.cpp index bd8fe23ca..3f4f09d0c 100644 --- a/mlx/backend/common/conv.cpp +++ b/mlx/backend/common/conv.cpp @@ -3,7 +3,7 @@ #include #ifdef ACCELERATE_NEW_LAPACK -#include +#include #else #include #endif diff --git a/mlx/backend/common/default_primitives.cpp b/mlx/backend/common/default_primitives.cpp index bcb8bd7b4..d9023fe9b 100644 --- a/mlx/backend/common/default_primitives.cpp +++ b/mlx/backend/common/default_primitives.cpp @@ -1,7 +1,7 @@ // Copyright © 2023-2024 Apple Inc. #ifdef ACCELERATE_NEW_LAPACK -#include +#include #else #include #endif diff --git a/mlx/backend/common/qrf.cpp b/mlx/backend/common/qrf.cpp index 41561cbad..4171398fd 100644 --- a/mlx/backend/common/qrf.cpp +++ b/mlx/backend/common/qrf.cpp @@ -5,7 +5,7 @@ #include "mlx/primitives.h" #ifdef ACCELERATE_NEW_LAPACK -#include +#include #else #include #endif diff --git a/mlx/backend/metal/device.cpp b/mlx/backend/metal/device.cpp index 999c67084..7c61e68ae 100644 --- a/mlx/backend/metal/device.cpp +++ b/mlx/backend/metal/device.cpp @@ -26,7 +26,8 @@ static constexpr const char* default_mtllib_path = METAL_PATH; auto load_device() { auto devices = MTL::CopyAllDevices(); - auto device = static_cast(devices->object(0)); + auto device = static_cast(devices->object(0)) + ?: MTL::CreateSystemDefaultDevice(); if (!device) { throw std::runtime_error("Failed to load device"); }