Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mlx/c/metal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ extern "C" int mlx_metal_is_available(bool* res) {
}
return 0;
}
extern "C" int mlx_metal_set_metallib_path(const char* path) {
try {
mlx::core::metal::set_metallib_path(std::string(path));
} catch (std::exception& e) {
mlx_error(e.what());
return 1;
}
return 0;
}
extern "C" int mlx_metal_start_capture(const char* path) {
try {
mlx::core::metal::start_capture(std::string(path));
Expand Down
1 change: 1 addition & 0 deletions mlx/c/metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern "C" {
/**@{*/

int mlx_metal_is_available(bool* res);
int mlx_metal_set_metallib_path(const char* path);
int mlx_metal_start_capture(const char* path);
int mlx_metal_stop_capture(void);

Expand Down