mlx-sys-burn 0.2.2

Low-level interface and binding generation for the mlx library (fork with additional operations for burn-mlx)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Copyright © 2023-2024 Apple Inc. */

#include "mlx/c/error.h"
#include "mlx/c/private/mlx.h"

extern "C" int mlx_version(mlx_string* str_) {
  try {
    mlx_string_set_(*str_, mlx::core::version());
    return 0;
  } catch (std::exception& e) {
    mlx_error(e.what());
    return 1;
  }
}