diff --git a/Makefile b/Makefile index 13fc941e135..0dcfb7a5ee3 100644 --- a/Makefile +++ b/Makefile @@ -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 `. 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 \`. 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..." @@ -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 diff --git a/examples/models/whisper/CMakePresets.json b/examples/models/whisper/CMakePresets.json index 1419788cb0c..a5bfc2be5a4 100644 --- a/examples/models/whisper/CMakePresets.json +++ b/examples/models/whisper/CMakePresets.json @@ -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)", @@ -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)", @@ -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)",