Repository navigation
[fix] inkling: mps + cuda mel spec extraction - #47432
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: inkling |
| for device in ["cpu", torch_device]: | ||
| processor_kwargs = {} if device == "cpu" else {"audio_kwargs": {"device": device}} |
There was a problem hiding this comment.
testing both cpu and gpu mel spectrogram extraction, runners' values have been updated for A10G, and ran manually to check
There was a problem hiding this comment.
I am a bit lost on the conditional definition/ why "device" = cpu would not work in the cpu case?
There was a problem hiding this comment.
it would work, it's more that default is CPU by convention
|
run-slow: inkling |
|
This comment contains models: ["models/inkling"] |
CI recapDashboard: View test results in Grafana |
molbap
left a comment
There was a problem hiding this comment.
Thanks, 2 quick questions!
| self.mel_filters = torch.from_numpy(np.ascontiguousarray(mel_filters.T, dtype=np.float32)) | ||
|
|
||
| def _torch_extract_fbank_features(self, waveform: torch.Tensor, device: str = "cpu") -> torch.Tensor: | ||
| waveform = waveform.to(device) |
There was a problem hiding this comment.
no way to create it on correct device?
There was a problem hiding this comment.
nope, audio input can be numpy and torch tensor directly (numpy most of the time) so lives on CPU anyway and .from_numpy cannot create on device directly...
| for device in ["cpu", torch_device]: | ||
| processor_kwargs = {} if device == "cpu" else {"audio_kwargs": {"device": device}} |
There was a problem hiding this comment.
I am a bit lost on the conditional definition/ why "device" = cpu would not work in the cpu case?
* fix Co-authored-by: alwaysprince05 <218506877+alwaysprince05@users.noreply.github.com> * add test * remove redundant --------- Co-authored-by: alwaysprince05 <218506877+alwaysprince05@users.noreply.github.com>
What does this PR do?
fixes
verified via running dMel extraction on:
closes #47392