mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-19 10:48:09 +08:00
Fix a few ccache cache miss (#2573)
* Fix ccache cache miss * Do not define _VERSION_ in python bindings
This commit is contained in:
@@ -52,7 +52,6 @@ set_target_properties(
|
||||
${MLX_PYTHON_BINDINGS_OUTPUT_DIRECTORY})
|
||||
|
||||
target_link_libraries(core PRIVATE mlx)
|
||||
target_compile_definitions(core PRIVATE _VERSION_=${MLX_VERSION})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <nanobind/nanobind.h>
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#include "mlx/version.h"
|
||||
|
||||
namespace mx = mlx::core;
|
||||
namespace nb = nanobind;
|
||||
|
||||
void init_mlx_func(nb::module_&);
|
||||
@@ -48,5 +48,5 @@ NB_MODULE(core, m) {
|
||||
init_distributed(m);
|
||||
init_export(m);
|
||||
|
||||
m.attr("__version__") = TOSTRING(_VERSION_);
|
||||
m.attr("__version__") = mx::version();
|
||||
}
|
||||
|
Reference in New Issue
Block a user