-
Notifications
You must be signed in to change notification settings - Fork 634
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
Error when using Resampler on GPU with torchaudio 0.9 #1619
Comments
@mravanelli |
Hi @yoyololicon, |
Hi @mravanelli
|
ok,
thank you for the clarification. I will change my code to make it work with
the latest version.
Best,
Mirco
…On Wed, 30 Jun 2021 at 09:58, Chin-Yun Yu ***@***.***> wrote:
Hi @mravanelli <https://github.com/mravanelli>
Yes, it was meant to be a BC-breaking change according to #1514
<#1514>, I'll just copy some of the
statements here.
To maintain the original behavior would require moving the cached kernel
to the device and dtype of the input waveform every time
transforms.Resample is called, and this could result in unintended side
effects; running a CPU transforms on CUDA inputs would have overhead from
constantly moving a cached CPU kernel to CUDA, and the expectation is that
the user will manually move the transforms themself to the correct device
and dtype (ex/ resample = transforms.Resample; resample = resample.to(device=torch.device('cuda'),
dtype=torch.float16). This PR removes the moving of the cached kernel to be
of the correct device and dtype at every call to it, which will now throw
an error if a user does not move the transform to CUDA but calls the
function on a CUDA waveform.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1619 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEA2ZVRLBCR5TQHCR25GL6DTVMPJHANCNFSM47RDP6SA>
.
|
We have added kernel cache mechanism to Looks like this was missing from 0.9 release note, I will fix the release note. |
Hi,
it looks like there is a small issue when using the resampler with torchaudio 0.9.
I indeed got the error below, when running the following code:
Note that everything is fine with cpu and with torchaudio 0.8.1
The text was updated successfully, but these errors were encountered: