fix no_gpu build

This commit is contained in:
Awni Hannun 2025-04-29 15:29:08 -07:00
parent f6a23c44e3
commit 6151995219
2 changed files with 7 additions and 3 deletions

View File

@ -2,10 +2,14 @@
#include <stdexcept>
#include "mlx/backend/metal.h"
#include "mlx/backend/metal/metal.h"
namespace mlx::core::metal {
bool is_available() {
return false;
}
void start_capture(std::string) {}
void stop_capture() {}

View File

@ -6,9 +6,9 @@
#include "mlx/allocator.h"
#ifdef __APPLE__
#include "mlx/backend/no_metal/apple_memory.h"
#include "mlx/backend/no_gpu/apple_memory.h"
#elif defined(__linux__)
#include "mlx/backend/no_metal/linux_memory.h"
#include "mlx/backend/no_gpu/linux_memory.h"
#else
size_t get_memory_size() {
return 0;