Skip to content

Commit a8f7550

Browse files
committed
Enable Metal and Accelerate features for Apple platforms in Candle module
- Uncomment Apple-specific CMake configuration for Candle - Add Metal and Accelerate features when building on macOS - Provide option to disable Metal support via DISABLE_CANDLE_METAL flag
1 parent 57bbce0 commit a8f7550

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: shards/modules/candle/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Platform-specific features
2-
# if(APPLE)
3-
# if(NOT DISABLE_CANDLE_METAL)
4-
# list(APPEND ML_RUST_FEATURES "metal") # In reality this will only work on macOS unless metal is initialized before (e.g. Formabble app)
5-
# endif()
6-
# list(APPEND ML_RUST_FEATURES "accelerate")
7-
# endif()
2+
if(APPLE)
3+
if(NOT DISABLE_CANDLE_METAL)
4+
list(APPEND ML_RUST_FEATURES "metal") # In reality this will only work on macOS unless metal is initialized before (e.g. Formabble app)
5+
endif()
6+
list(APPEND ML_RUST_FEATURES "accelerate")
7+
endif()
88

99
# Add an option to enable or disable CUDA support
1010
option(ENABLE_CUDA "Enable CUDA support" OFF)

0 commit comments

Comments
 (0)