mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-28 03:41:14 +08:00

* fix tests for linux * make a move on compile * basic compile scaffold works * compile binding * clean * fix * fix grad, more tests * basic python tests * fix segfault on python exit * compile works with python closures * fix test * fix python globals bug, and erase * simplify * more cpp tests * bug fix with move function and compile at exit * simplify inputs also * enable and disable compiler * remove simplify * simplify tests use compile now * fix multi-output with compile * clear output tree from cache when function goes out of scope * ../python/src/transforms.cpp * remove closure capture * comments
38 lines
1.1 KiB
CMake
38 lines
1.1 KiB
CMake
target_sources(
|
|
mlx
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/allocator.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/array.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dtype.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compile.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/fft.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ops.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/graph_utils.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/primitives.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/random.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/scheduler.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/transforms.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linalg.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/backend/metal/metal.h
|
|
)
|
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backend/common)
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/io)
|
|
if (MLX_BUILD_ACCELERATE)
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backend/accelerate)
|
|
else()
|
|
target_sources(
|
|
mlx
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/backend/common/default_primitives.cpp
|
|
)
|
|
endif()
|
|
|
|
if (MLX_BUILD_METAL)
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backend/metal)
|
|
else()
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backend/no_metal)
|
|
endif()
|