dist/include/ contains the MLX and MLX-C headers needed for CGo compilation. Without these, go-mlx cannot be used as a module dependency (headers not found in module cache). Libraries (dylib/metallib) are still gitignored — users build those locally via cmake. Co-Authored-By: Virgil <virgil@lethean.io>
61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
/* Copyright © 2023-2024 Apple Inc. */
|
|
/* */
|
|
/* This file is auto-generated. Do not edit manually. */
|
|
/* */
|
|
|
|
#ifndef MLX_IO_H
|
|
#define MLX_IO_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
#include "mlx/c/array.h"
|
|
#include "mlx/c/closure.h"
|
|
#include "mlx/c/distributed_group.h"
|
|
#include "mlx/c/io_types.h"
|
|
#include "mlx/c/map.h"
|
|
#include "mlx/c/stream.h"
|
|
#include "mlx/c/string.h"
|
|
#include "mlx/c/vector.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* \defgroup io IO operations
|
|
*/
|
|
/**@{*/
|
|
int mlx_load_reader(
|
|
mlx_array* res,
|
|
mlx_io_reader in_stream,
|
|
const mlx_stream s);
|
|
int mlx_load(mlx_array* res, const char* file, const mlx_stream s);
|
|
int mlx_load_safetensors_reader(
|
|
mlx_map_string_to_array* res_0,
|
|
mlx_map_string_to_string* res_1,
|
|
mlx_io_reader in_stream,
|
|
const mlx_stream s);
|
|
int mlx_load_safetensors(
|
|
mlx_map_string_to_array* res_0,
|
|
mlx_map_string_to_string* res_1,
|
|
const char* file,
|
|
const mlx_stream s);
|
|
int mlx_save_writer(mlx_io_writer out_stream, const mlx_array a);
|
|
int mlx_save(const char* file, const mlx_array a);
|
|
int mlx_save_safetensors_writer(
|
|
mlx_io_writer in_stream,
|
|
const mlx_map_string_to_array param,
|
|
const mlx_map_string_to_string metadata);
|
|
int mlx_save_safetensors(
|
|
const char* file,
|
|
const mlx_map_string_to_array param,
|
|
const mlx_map_string_to_string metadata);
|
|
/**@}*/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|