Skip to content

Commit 504d9de

Browse files
authored
Add whisper-cuda-debug build target (#16343)
Add a debug build target for Whisper with CUDA backend. This allows building the Whisper runner with debug symbols for easier debugging. Changes: - Add whisper-cuda-debug target to Makefile - Add whisper-cuda-debug presets to CMakePresets.json
1 parent b8916b7 commit 504d9de

File tree

2 files changed

+57
-13
lines changed

2 files changed

+57
-13
lines changed

Makefile

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,22 @@
8787
#
8888
# ==============================================================================
8989

90-
.PHONY: voxtral-cuda voxtral-cpu voxtral-metal whisper-cuda whisper-cpu whisper-metal llama-cpu llava-cpu gemma3-cuda gemma3-cpu clean help
90+
.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
9191

9292
help:
93-
@echo "This Makefile adds targets to build runners for various models on various backends. Run using `make <target>`. Available targets:"
94-
@echo " voxtral-cuda - Build Voxtral runner with CUDA backend"
95-
@echo " voxtral-cpu - Build Voxtral runner with CPU backend"
96-
@echo " voxtral-metal - Build Voxtral runner with Metal backend (macOS only)"
97-
@echo " whisper-cuda - Build Whisper runner with CUDA backend"
98-
@echo " whisper-cpu - Build Whisper runner with CPU backend"
99-
@echo " whisper-metal - Build Whisper runner with Metal backend (macOS only)"
100-
@echo " llama-cpu - Build Llama runner with CPU backend"
101-
@echo " llava-cpu - Build Llava runner with CPU backend"
102-
@echo " gemma3-cuda - Build Gemma3 runner with CUDA backend"
103-
@echo " gemma3-cpu - Build Gemma3 runner with CPU backend"
104-
@echo " clean - Clean build artifacts"
93+
@echo "This Makefile adds targets to build runners for various models on various backends. Run using \`make <target>\`. Available targets:"
94+
@echo " voxtral-cuda - Build Voxtral runner with CUDA backend"
95+
@echo " voxtral-cpu - Build Voxtral runner with CPU backend"
96+
@echo " voxtral-metal - Build Voxtral runner with Metal backend (macOS only)"
97+
@echo " whisper-cuda - Build Whisper runner with CUDA backend"
98+
@echo " whisper-cuda-debug - Build Whisper runner with CUDA backend (debug mode)"
99+
@echo " whisper-cpu - Build Whisper runner with CPU backend"
100+
@echo " whisper-metal - Build Whisper runner with Metal backend (macOS only)"
101+
@echo " llama-cpu - Build Llama runner with CPU backend"
102+
@echo " llava-cpu - Build Llava runner with CPU backend"
103+
@echo " gemma3-cuda - Build Gemma3 runner with CUDA backend"
104+
@echo " gemma3-cpu - Build Gemma3 runner with CPU backend"
105+
@echo " clean - Clean build artifacts"
105106

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

143+
whisper-cuda-debug:
144+
@echo "==> Building and installing ExecuTorch with CUDA (debug mode)..."
145+
cmake --workflow --preset llm-debug-cuda
146+
@echo "==> Building Whisper runner with CUDA (debug mode)..."
147+
cd examples/models/whisper && cmake --workflow --preset whisper-cuda-debug
148+
@echo ""
149+
@echo "✓ Build complete!"
150+
@echo " Binary: cmake-out/examples/models/whisper/whisper_runner"
151+
142152
whisper-cpu:
143153
@echo "==> Building and installing ExecuTorch..."
144154
cmake --workflow --preset llm-release

examples/models/whisper/CMakePresets.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@
2929
"list": ["Linux", "Windows"]
3030
}
3131
},
32+
{
33+
"name": "whisper-cuda-debug",
34+
"displayName": "Whisper runner (CUDA Debug)",
35+
"inherits": ["whisper-base"],
36+
"cacheVariables": {
37+
"EXECUTORCH_BUILD_CUDA": "ON",
38+
"CMAKE_BUILD_TYPE": "Debug"
39+
},
40+
"condition": {
41+
"type": "inList",
42+
"string": "${hostSystemName}",
43+
"list": ["Linux", "Windows"]
44+
}
45+
},
3246
{
3347
"name": "whisper-metal",
3448
"displayName": "Whisper runner (Metal)",
@@ -56,6 +70,12 @@
5670
"configurePreset": "whisper-cuda",
5771
"targets": ["whisper_runner"]
5872
},
73+
{
74+
"name": "whisper-cuda-debug",
75+
"displayName": "Build Whisper runner (CUDA Debug)",
76+
"configurePreset": "whisper-cuda-debug",
77+
"targets": ["whisper_runner"]
78+
},
5979
{
6080
"name": "whisper-metal",
6181
"displayName": "Build Whisper runner (Metal)",
@@ -92,6 +112,20 @@
92112
}
93113
]
94114
},
115+
{
116+
"name": "whisper-cuda-debug",
117+
"displayName": "Configure and build Whisper runner (CUDA Debug)",
118+
"steps": [
119+
{
120+
"type": "configure",
121+
"name": "whisper-cuda-debug"
122+
},
123+
{
124+
"type": "build",
125+
"name": "whisper-cuda-debug"
126+
}
127+
]
128+
},
95129
{
96130
"name": "whisper-metal",
97131
"displayName": "Configure and build Whisper runner (Metal)",

0 commit comments

Comments
 (0)