Skip to content

fix: audio_length_total only accumulated for CUDA kernel - #23

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/test-cuda-vs-torch-model-d91193ca
Open

fix: audio_length_total only accumulated for CUDA kernel#23
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/test-cuda-vs-torch-model-d91193ca

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: audio_length_total only accumulated for CUDA kernel

Fix

Replace:

        vram_used_original_total += torch.cuda.max_memory_allocated(device="cuda")
        
        del data, audio_original
        torch.cuda.empty_cache()

with:

        vram_used_original_total += torch.cuda.max_memory_allocated(device="cuda")
        audio_length_total += audio_original.shape[-1]
        
        del data, audio_original
        torch.cuda.empty_cache()

Files changed

  • tests/test_cuda_vs_torch_model.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 28, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant