Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 23 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,22 @@
#
# ==============================================================================

.PHONY: voxtral-cuda voxtral-cpu voxtral-metal whisper-cuda whisper-cpu whisper-metal llama-cpu llava-cpu gemma3-cuda gemma3-cpu clean help
.PHONY: voxtral-cuda voxtral-cpu voxtral-metal whisper-cuda whisper-cuda-debug whisper-cpu whisper-metal llama-cpu llava-cpu gemma3-cuda gemma3-cpu clean help

help:
@echo "This Makefile adds targets to build runners for various models on various backends. Run using `make <target>`. Available targets:"
@echo " voxtral-cuda - Build Voxtral runner with CUDA backend"
@echo " voxtral-cpu - Build Voxtral runner with CPU backend"
@echo " voxtral-metal - Build Voxtral runner with Metal backend (macOS only)"
@echo " whisper-cuda - Build Whisper runner with CUDA backend"
@echo " whisper-cpu - Build Whisper runner with CPU backend"
@echo " whisper-metal - Build Whisper runner with Metal backend (macOS only)"
@echo " llama-cpu - Build Llama runner with CPU backend"
@echo " llava-cpu - Build Llava runner with CPU backend"
@echo " gemma3-cuda - Build Gemma3 runner with CUDA backend"
@echo " gemma3-cpu - Build Gemma3 runner with CPU backend"
@echo " clean - Clean build artifacts"
@echo "This Makefile adds targets to build runners for various models on various backends. Run using \`make <target>\`. Available targets:"
@echo " voxtral-cuda - Build Voxtral runner with CUDA backend"
@echo " voxtral-cpu - Build Voxtral runner with CPU backend"
@echo " voxtral-metal - Build Voxtral runner with Metal backend (macOS only)"
@echo " whisper-cuda - Build Whisper runner with CUDA backend"
@echo " whisper-cuda-debug - Build Whisper runner with CUDA backend (debug mode)"
@echo " whisper-cpu - Build Whisper runner with CPU backend"
@echo " whisper-metal - Build Whisper runner with Metal backend (macOS only)"
@echo " llama-cpu - Build Llama runner with CPU backend"
@echo " llava-cpu - Build Llava runner with CPU backend"
@echo " gemma3-cuda - Build Gemma3 runner with CUDA backend"
@echo " gemma3-cpu - Build Gemma3 runner with CPU backend"
@echo " clean - Clean build artifacts"

voxtral-cuda:
@echo "==> Building and installing ExecuTorch with CUDA..."
Expand Down Expand Up @@ -139,6 +140,15 @@ whisper-cuda:
@echo "✓ Build complete!"
@echo " Binary: cmake-out/examples/models/whisper/whisper_runner"

whisper-cuda-debug:
@echo "==> Building and installing ExecuTorch with CUDA (debug mode)..."
cmake --workflow --preset llm-debug-cuda
@echo "==> Building Whisper runner with CUDA (debug mode)..."
cd examples/models/whisper && cmake --workflow --preset whisper-cuda-debug
@echo ""
@echo "✓ Build complete!"
@echo " Binary: cmake-out/examples/models/whisper/whisper_runner"

whisper-cpu:
@echo "==> Building and installing ExecuTorch..."
cmake --workflow --preset llm-release
Expand Down
34 changes: 34 additions & 0 deletions examples/models/whisper/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@
"list": ["Linux", "Windows"]
}
},
{
"name": "whisper-cuda-debug",
"displayName": "Whisper runner (CUDA Debug)",
"inherits": ["whisper-base"],
"cacheVariables": {
"EXECUTORCH_BUILD_CUDA": "ON",
"CMAKE_BUILD_TYPE": "Debug"
},
"condition": {
"type": "inList",
"string": "${hostSystemName}",
"list": ["Linux", "Windows"]
}
},
{
"name": "whisper-metal",
"displayName": "Whisper runner (Metal)",
Expand Down Expand Up @@ -56,6 +70,12 @@
"configurePreset": "whisper-cuda",
"targets": ["whisper_runner"]
},
{
"name": "whisper-cuda-debug",
"displayName": "Build Whisper runner (CUDA Debug)",
"configurePreset": "whisper-cuda-debug",
"targets": ["whisper_runner"]
},
{
"name": "whisper-metal",
"displayName": "Build Whisper runner (Metal)",
Expand Down Expand Up @@ -92,6 +112,20 @@
}
]
},
{
"name": "whisper-cuda-debug",
"displayName": "Configure and build Whisper runner (CUDA Debug)",
"steps": [
{
"type": "configure",
"name": "whisper-cuda-debug"
},
{
"type": "build",
"name": "whisper-cuda-debug"
}
]
},
{
"name": "whisper-metal",
"displayName": "Configure and build Whisper runner (Metal)",
Expand Down
Loading