Repository navigation
Add optional CUDA acceleration for ViSQOL - #146
Open
lingfengyao wants to merge 2 commits into
Open
lingfengyao wants to merge 2 commits into
lingfengyao wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Add an opt-in CUDA path (--use_cuda / VisqolConfig.options.use_cuda) that builds Gammatone spectrograms and scores candidate patches during the patch search on the GPU. Spectrograms recreated during realignment are processed in batches of up to 16 patch pairs. Kernels use FP64 and follow the CPU order of operations; selected-patch statistics and MOS mapping stay on the CPU. Builds without --config=cuda use stubs and do not link the CUDA runtime. Also speed up the CPU parts that dominate once the GPU path is enabled: the patch DP keeps a running maximum instead of rescanning predecessors, and the envelope and cross-correlation in alignment use PFFFT's packed real spectrum with a reusable per-thread FftManager. On 200 speech/audio pairs on an H100 the CUDA path is 51.5x faster than upstream CPU, with byte-identical results.
lingfengyao
force-pushed
the
cuda-acceleration
branch
from
October 2, 2026 01:38
7f37fe2 to
f56edb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds optional CUDA acceleration for Gammatone spectrogram construction and
NSIM candidate scoring, enabled through
--use_cudaorVisqolConfig.options.use_cuda. CPU execution remains the default.Also reduces CPU overhead in patch selection and FFT-based alignment.
README includes CUDA build and usage instructions.
Validation
upstream CPU, optimized CPU and optimized GPU, including MOS, VNSIM,
frequency statistics and patch timestamps.
Performance
Tested on NVIDIA H100 80GB and a single Intel Xeon Platinum 8468 CPU thread.
Results are averaged over two runs.
Speech uses LibriSpeech at 16 kHz; audio uses FMA and Clotho at 48 kHz,
with 3–10 second clips and controlled degradations.