mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-25 09:51:17 +08:00
Fix export.cpp compilation with MSVC (#1737)
This commit is contained in:
parent
4ba0c24a8f
commit
8ecdfb718b
@ -9,17 +9,13 @@
|
|||||||
#define TOSTRING(x) STRINGIFY(x)
|
#define TOSTRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define SERIALIZE_PRIMITIVE(primitive, keys...) \
|
#define SERIALIZE_PRIMITIVE(primitive, ...) \
|
||||||
{ \
|
{ \
|
||||||
#primitive, { \
|
#primitive, { \
|
||||||
[](Writer& os, const Primitive& p) { \
|
serialize_primitive<primitive>, \
|
||||||
serialize_primitive<primitive>(os, p); \
|
deserialize_primitive<primitive>, \
|
||||||
}, \
|
{__VA_ARGS__} \
|
||||||
[](Reader& is, Stream s) { \
|
} \
|
||||||
return deserialize_primitive<primitive>(is, s); \
|
|
||||||
}, \
|
|
||||||
{keys} \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ using namespace mlx::core;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::string get_temp_file(const std::string& name) {
|
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
|
} // namespace
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user