Skip to content

Conversation

bigcash
Copy link

@bigcash bigcash commented Sep 25, 2025

When reading audio files in large quantities with multiple processes, it sometimes leads to discontinuous memory space for the audio. Then, when calling the fbank method, the continuous method is usually not called to make its stored content space continuous. Furthermore, an exception occurred in the torch.mm within the fbank method, ultimately leading to an unexpected segmentation fault.
I ultimately identified this bug and added contigues() to the variables spectrum and mel_deergies. T to avoid this error.

@bigcash bigcash requested a review from a team as a code owner September 25, 2025 03:21
Copy link

pytorch-bot bot commented Sep 25, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4111

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link

meta-cla bot commented Sep 25, 2025

Hi @bigcash!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@pearu
Copy link
Collaborator

pearu commented Sep 30, 2025

Furthermore, an exception occurred in the torch.mm within the fbank method, ultimately leading to an unexpected segmentation fault.

What was the exception and which torch version are you using?

torch.mm is able to handle non-contiguous inputs, for instance:

>>> import torch
>>> a = torch.randn(4, 4)[::2, ::2]
>>> b = torch.randn(4, 4)[::2, ::2]
>>> a.is_contiguous()
False
>>> torch.mm(a, b)
tensor([[ 0.2873, -0.2190],
        [-0.6884, -0.3184]])

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.

2 participants