# How to Configure GPU Acceleration with CUDA, Vulkan, or Metal for Meetily Transcription

> Boost Meetily transcription speed by configuring GPU acceleration. Learn how to enable CUDA, Vulkan, or Metal in your Tauri build for faster performance. Follow simple steps to unlock hardware acceleration.

- Repository: [Zackriya Solutions/meetily](https://github.com/Zackriya-Solutions/meetily)
- Tags: performance
- Published: 2026-07-12

---

**Meetily automatically detects compatible GPUs at runtime, but you must compile the Tauri application with the specific backend feature flag (`cuda`, `vulkan`, `hipblas`, or `metal`) to enable hardware-accelerated transcription.**

Meetily is an open-source meeting transcription application built with Tauri and Rust that leverages the `whisper-rs` crate for speech recognition. To achieve real-time transcription performance, you can configure GPU acceleration using CUDA for NVIDIA cards, Vulkan for AMD/Intel GPUs, or Metal for Apple Silicon. The configuration process involves compile-time feature selection and runtime hardware detection working together to initialize the Whisper context with optimal acceleration.

## Prerequisites: Install System Dependencies

Before building Meetily, install the SDK corresponding to your GPU architecture. The detection logic in [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs) (lines 60-71) checks for these environment variables and libraries during initialization.

### Metal (macOS Apple Silicon)

No additional installation required. Metal is built into macOS 13+ on Apple Silicon devices. CoreML optimizations are automatically available when the `metal` feature is enabled.

### CUDA (NVIDIA)

Install the NVIDIA CUDA Toolkit to set `CUDA_PATH` or `CUDA_HOME`. Verify installation with:

```bash
nvcc --version

```

The detection code checks for these environment variables and typical Linux paths like `/usr/local/cuda`.

### Vulkan (AMD/Intel)

Install the Vulkan SDK to configure `VULKAN_SDK`. On Linux, ensure the `vulkan-1` driver (`libvulkan.so`) is available in your library path.

### HIP BLAS (AMD ROCm)

For AMD GPUs on Linux, install the ROCm platform and ensure `hipblas` headers are discoverable. This enables the `hipblas` backend alternative to Vulkan.

## Building Meetily with GPU Support

Meetily uses **compile-time backend selection** defined in [`frontend/src-tauri/Cargo.toml`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/Cargo.toml) (lines 38-49). You must specify the appropriate feature flag when building the Tauri application.

### Build Commands by Platform

Navigate to the Tauri source directory before building:

```bash
cd frontend/src-tauri

```

**macOS (Metal - default):**

```bash
cargo build --release

```

Metal is the default on macOS; no extra feature flag is required.

**Windows/Linux with NVIDIA:**

```bash
cargo build --release --features cuda

```

**Windows/Linux with AMD/Intel:**

```bash
cargo build --release --features vulkan

```

**Linux with AMD ROCm:**

```bash
cargo build --release --features hipblas

```

**CPU-only fallback (optional):**

If you lack GPU hardware, you can still optimize CPU performance:

```bash
cargo build --release --features openblas
cargo build --release --features openmp

```

## How Meetily Detects and Selects GPU Backends

The acceleration system combines compile-time configuration with runtime hardware probing to create a `WhisperContextAcceleration` struct.

### Step 1: Compile-Time Backend Detection

The `WhisperCompiledBackend::current()` function in [`acceleration.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/acceleration.rs) (lines 13-25) uses Rust's `cfg!` macros to determine which backend was compiled:

- `cfg!(feature = "cuda")` → `Cuda`
- `cfg!(feature = "vulkan")` → `Vulkan`
- `cfg!(feature = "hipblas")` → `HipBlas`
- `cfg!(target_os = "macos")` or `cfg!(feature = "metal")` → `Metal`
- Default → `Cpu`

### Step 2: Runtime Hardware Detection

The `HardwareProfile::detect()` method in [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs) (lines 84-104) calls `detect_gpu()` to probe the system:

1. Checks for Metal support on macOS
2. Validates `CUDA_PATH` and NVIDIA libraries on Linux/Windows
3. Detects Vulkan loader availability for AMD/Intel
4. Returns a `(has_gpu_acceleration, GpuType)` tuple

### Step 3: Acceleration Context Construction

The `whisper_context_acceleration_for` function in [`acceleration.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/acceleration.rs) (lines 61-78) reconciles the compiled backend with the detected GPU:

- Sets `use_gpu` to `true` unless the compiled backend is `Cpu`
- Enables **Flash Attention** for Metal and CUDA backends when `PerformanceTier` is `High` or `Ultra` (lines 69-71)
- Creates a human-readable status label describing the acceleration type

## Verifying GPU Acceleration at Runtime

You can query the active acceleration configuration using the public API from [`whisper_engine/acceleration.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/whisper_engine/acceleration.rs):

```rust
use meetily::whisper_engine::acceleration::{WhisperContextAcceleration, WhisperCompiledBackend};
use meetily::audio::HardwareProfile;

fn check_acceleration_status() {
    let profile = HardwareProfile::detect();
    let accel = whisper_context_acceleration_for(
        WhisperCompiledBackend::current(),
        profile.gpu_type,
        profile.performance_tier,
    );
    
    println!("Compiled Backend: {}", accel.compiled_backend.as_str());
    println!("Runtime GPU Detected: {:?}", accel.runtime_detected_gpu);
    println!("GPU Active: {}", accel.use_gpu);
    println!("Flash Attention: {}", accel.flash_attn);
    println!("Status: {}", accel.status_label());
}

```

Expected outputs:
- Metal build on macOS: "Metal GPU with Flash Attention (Ultra-Fast)"
- CUDA build with High tier: "CUDA GPU with Flash Attention (Ultra-Fast)"
- Vulkan build: "Vulkan GPU" (Flash Attention disabled for this backend)

## Summary

- **Compile with features**: Use `--features cuda`, `--features vulkan`, or `--features hipblas` when building; Metal is default on macOS
- **Source locations**: Configuration lives in [`frontend/src-tauri/Cargo.toml`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/Cargo.toml), detection logic in [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs), and acceleration context in [`whisper_engine/acceleration.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/whisper_engine/acceleration.rs)
- **Flash Attention**: Automatically enabled for Metal and CUDA when system resources indicate `High` or `Ultra` performance tiers
- **Runtime verification**: Use `WhisperContextAcceleration` to confirm GPU initialization and backend selection

## Frequently Asked Questions

### Why isn't my GPU being used after building with the feature flag?

The compiled backend must match the runtime detected GPU type. If you build with `--features cuda` but your system lacks the CUDA toolkit or `CUDA_PATH` environment variable, `HardwareProfile::detect()` falls back to CPU mode. Verify your SDK installation and check the `runtime_detected_gpu` field to confirm detection.

### Can I switch between GPU backends without recompiling Meetily?

No. The GPU backend is determined at compile time through Cargo features in [`Cargo.toml`](https://github.com/Zackriya-Solutions/meetily/blob/main/Cargo.toml) (lines 38-49). To switch from CUDA to Vulkan, you must rebuild with `cargo build --release --features vulkan`. The runtime detection only validates whether the compiled backend's hardware is present, not selecting alternative backends.

### Does GPU acceleration support all Whisper model sizes?

GPU acceleration works with all model sizes, but the **Flash Attention** optimization (enabled in [`acceleration.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/acceleration.rs) lines 69-71) specifically activates for Metal and CUDA backends when the system performance tier is `High` or `Ultra`. Larger models benefit most from GPU acceleration, though they require sufficient VRAM. The `WhisperEngine` in [`whisper_engine.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/whisper_engine.rs) handles model loading with the acceleration context regardless of model size.

### How do I troubleshoot GPU initialization failures?

Check the `status_label()` output from the `WhisperContextAcceleration` struct. If it shows "CPU only" despite building with GPU features, verify:
1. Environment variables (`CUDA_PATH` or `VULKAN_SDK`) are set
2. GPU drivers are installed and the hardware is detected by the OS
3. The correct feature flag was used during compilation (`WhisperCompiledBackend::current()` validates this)