diff --git a/mlx/export.cpp b/mlx/export.cpp index 377c6c601..743d20409 100644 --- a/mlx/export.cpp +++ b/mlx/export.cpp @@ -9,17 +9,13 @@ #define TOSTRING(x) STRINGIFY(x) // clang-format off -#define SERIALIZE_PRIMITIVE(primitive, keys...) \ - { \ - #primitive, { \ - [](Writer& os, const Primitive& p) { \ - serialize_primitive(os, p); \ - }, \ - [](Reader& is, Stream s) { \ - return deserialize_primitive(is, s); \ - }, \ - {keys} \ - } \ +#define SERIALIZE_PRIMITIVE(primitive, ...) \ + { \ + #primitive, { \ + serialize_primitive, \ + deserialize_primitive, \ + {__VA_ARGS__} \ + } \ } // clang-format on diff --git a/tests/export_import_tests.cpp b/tests/export_import_tests.cpp index 41c7ade02..83ee1e590 100644 --- a/tests/export_import_tests.cpp +++ b/tests/export_import_tests.cpp @@ -13,7 +13,7 @@ using namespace mlx::core; namespace { std::string get_temp_file(const std::string& name) { - return std::filesystem::temp_directory_path().append(name); + return std::filesystem::temp_directory_path().append(name).string(); } } // namespace