New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU-based vectorized Specaug Version 2 #9155
Conversation
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
Signed-off-by: Piotr Żelasko <petezor@gmail.com>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I visually inspected that the masks look correct on random spectrograms. I also ran a training with this variant in Nsight profiler and noticed the specaug computation mostly disappeared from the profile. It is estimated to be about 4-5x faster than the variant proposed in #9041 which would make it 8-10x faster than the original version (still available as the "legacy" setting).
LGTM!
requested update to another version with some extra fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ! Minor comments
After this I think that we may also have to add the flag in the audio processing module: And also we may have to add a test, adding the pytest run_only_on('GPU') flag the same it is done for the numba code: |
Signed-off-by: Alessandro Morari <amorari@nvidia.com>
Signed-off-by: Alessandro Morari <amorari@nvidia.com>
Signed-off-by: Alessandro Morari <amorari@nvidia.com>
@amorari-nvidia As a last thing, could you remove the numba specaug implementation altogether in this PR? IIRC it will automatically kick in with numba 0.58 (or when numba+cuda versions are compatible for earlier versions), overriding the implementation here. CC @titu1994 pls double check if I'm right about this. |
Waiting for confirmation from @titu1994 |
You can remove it entirely, or set the default flag of numba cuda to false. I think that's sufficient for the time being. If you can remove it cleanly, then that's fine too |
I will just set the Numba version default flag to false for now |
Signed-off-by: pzelasko <pzelasko@users.noreply.github.com>
The Numba SpecAugment version is already set to false, while the vectorized version is set to true and is the default code. |
great, re-triggered tests, LGTM as soon as it's green |
CI passed |
Congrats @amorari-nvidia on the first contribution! |
What does this PR do ?
This PR proposes a faster version of the Spectrogram Augmentation module for time and frequency masking.