mirror of
https://github.com/ollama/ollama.git
synced 2026-04-18 09:03:35 -04:00
* prefer rocm v6 on windows Avoid building with v7 - more changes are needed * MLX: add header vendoring and remove go build tag This switches to using a vendoring approach for the mlx-c headers so that Go can build without requiring a cmake first. This enables building the new MLX based code by default. Every time cmake runs, the headers are refreshed, so we can easily keep them in sync when we bump mlx versions. Basic Windows and Linux support are verified. * ci: harden for flaky choco repo servers CI sometimes fails due to choco not actually installing cache. Since it just speeds up the build, we can proceed without. * review comments
64 lines
1.5 KiB
C
64 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
|