Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .github/scripts/build-linux-cuda-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ mkdir -p build
pushd build
cmake -DMLX_BUILD_METAL=OFF -DMLX_BUILD_CUDA=ON -DMLX_C_BUILD_EXAMPLES=OFF .. -G Ninja
ninja
./example1 --device gpu
./tutorial --device gpu
# TODO dkoski -- disabled for now until clear_streams is available
# ./example1 --device gpu
# ./tutorial --device gpu
popd
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "submodules/mlx"]
path = Source/Cmlx/mlx
url = https://github.com/ml-explore/mlx
[submodule "submodules/mlx-c"]
path = Source/Cmlx/mlx-c
url = https://github.com/ml-explore/mlx-c
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif()
FetchContent_Declare(
mlx-c
GIT_REPOSITORY "https://github.com/ml-explore/mlx-c.git"
GIT_TAG "v0.6.0")
GIT_TAG "c74db5307cc8ce122f48d97ef951b30578674e7f")
FetchContent_MakeAvailable(mlx-c)

# swift-numerics
Expand Down Expand Up @@ -64,6 +64,10 @@ if(NOT MLX_BUILD_METAL)
${CMAKE_CURRENT_LIST_DIR}/Source/MLX/MLXArray+Metal.swift)
endif()

if(NOT MLX_BUILD_CUDA)
list(REMOVE_ITEM MLX-src ${CMAKE_CURRENT_LIST_DIR}/Source/MLX/GPU+CUDA.swift)
endif()

add_library(MLX STATIC ${MLX-src})
target_include_directories(MLX
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/Source/Cmlx/include)
Expand Down
Loading