mlx/mlx/backend/metal/no_metal.cpp

23 lines
453 B
C++
Raw Normal View History

2025-04-30 06:21:03 +08:00
// Copyright © 2025 Apple Inc.
#include <stdexcept>
2025-04-30 06:29:08 +08:00
#include "mlx/backend/metal/metal.h"
2025-04-30 06:21:03 +08:00
namespace mlx::core::metal {
2025-04-30 06:29:08 +08:00
bool is_available() {
return false;
}
2025-04-30 06:21:03 +08:00
void start_capture(std::string) {}
void stop_capture() {}
const std::unordered_map<std::string, std::variant<std::string, size_t>>&
device_info() {
throw std::runtime_error(
"[metal::device_info] Cannot get device info without metal backend");
};
} // namespace mlx::core::metal