Remove "using namespace mlx::core" in python/src (#1689)

This commit is contained in:
Cheng
2024-12-12 08:45:39 +09:00
committed by GitHub
parent f3dfa36a3a
commit 0bf19037ca
22 changed files with 1423 additions and 1302 deletions

View File

@@ -14,22 +14,24 @@
#include <variant>
#include "mlx/io.h"
namespace mx = mlx::core;
namespace nb = nanobind;
using namespace mlx::core;
using LoadOutputTypes = std::variant<
array,
std::unordered_map<std::string, array>,
SafetensorsLoad,
GGUFLoad>;
mx::array,
std::unordered_map<std::string, mx::array>,
mx::SafetensorsLoad,
mx::GGUFLoad>;
SafetensorsLoad mlx_load_safetensor_helper(nb::object file, StreamOrDevice s);
mx::SafetensorsLoad mlx_load_safetensor_helper(
nb::object file,
mx::StreamOrDevice s);
void mlx_save_safetensor_helper(
nb::object file,
nb::dict d,
std::optional<nb::dict> m);
GGUFLoad mlx_load_gguf_helper(nb::object file, StreamOrDevice s);
mx::GGUFLoad mlx_load_gguf_helper(nb::object file, mx::StreamOrDevice s);
void mlx_save_gguf_helper(
nb::object file,
@@ -40,8 +42,8 @@ LoadOutputTypes mlx_load_helper(
nb::object file,
std::optional<std::string> format,
bool return_metadata,
StreamOrDevice s);
void mlx_save_helper(nb::object file, array a);
mx::StreamOrDevice s);
void mlx_save_helper(nb::object file, mx::array a);
void mlx_savez_helper(
nb::object file,
nb::args args,