Skip to content

Commit 3bc81f8

Browse files
update
1 parent 80f8fc9 commit 3bc81f8

File tree

2,099 files changed

+680414
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,099 files changed

+680414
-28
lines changed

.DS_Store

0 Bytes
Binary file not shown.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ if(WITH_METAL)
209209
"-framework Metal"
210210
"-framework Foundation"
211211
"-framework MetalKit"
212+
"-framework MetalPerformanceShaders"
212213
)
213214
endif()
214215

python/.DS_Store

-2 KB
Binary file not shown.

python/build_full.log

Lines changed: 355 additions & 0 deletions
Large diffs are not rendered by default.

python/build_metal.log

Lines changed: 700 additions & 0 deletions
Large diffs are not rendered by default.

python/build_universal2_wheel.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -e
77
# Use your universal binary Python (replace 'ub python3' with your actual command if different)
88
export ARCHFLAGS='-arch x86_64 -arch arm64'
99
export CMAKE_OSX_ARCHITECTURES='arm64;x86_64'
10+
1011
# Install build tool if needed
1112
uv pip install --upgrade pip build
1213

@@ -16,7 +17,7 @@ rm -rf build/ dist/ ctranslate2.egg-info/
1617

1718
# Build sdist and universal2 wheel
1819
echo "Building universal2 wheel..."
19-
uv run -m build --sdist --wheel
20+
CMAKE_ARGS="-DWITH_METAL=ON" uv run -m build --sdist --wheel
2021

2122
echo "\nBuild complete. Check dist/ for the universal2 wheel."
2223
ls -lh dist/

python/build_verbose.log

Lines changed: 355 additions & 0 deletions
Large diffs are not rendered by default.

python/cpp/generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ namespace ctranslate2 {
151151
152152
Arguments:
153153
model_path: Path to the CTranslate2 model directory.
154-
device: Device to use (possible values are: cpu, cuda, auto).
154+
device: Device to use (possible values are: cpu, cuda, metal, auto).
155155
device_index: Device IDs where to place this generator on.
156156
compute_type: Model computation type or a dictionary mapping a device name
157157
to the computation type (possible values are: default, auto, int8, int8_float32,

python/cpp/storage_view.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ namespace ctranslate2 {
109109
py::enum_<Device>(m, "Device")
110110
.value("cpu", Device::CPU)
111111
.value("cuda", Device::CUDA)
112+
.value("metal", Device::METAL)
112113
;
113114

114115
py::class_<StorageView>(

python/cpp/translator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ namespace ctranslate2 {
300300
301301
Arguments:
302302
model_path: Path to the CTranslate2 model directory.
303-
device: Device to use (possible values are: cpu, cuda, auto).
303+
device: Device to use (possible values are: cpu, cuda, metal, auto).
304304
device_index: Device IDs where to place this generator on.
305305
compute_type: Model computation type or a dictionary mapping a device name
306306
to the computation type (possible values are: default, auto, int8, int8_float32,

0 commit comments

Comments
 (0)