Skip to content

Conversation

mthrok
Copy link
Contributor

@mthrok mthrok commented Mar 8, 2021

The C++ extension for Windows we added in #1345 were not properly loaded. This PR fixes it by

  1. Rename the extension to _torchaudio.pyd from _torchaudio.dll
  2. Properly set the installation path to _torchaudio.pyd from lib/_torchaudio.dll

@carolineechen Can you verify that the test log does not contain the warning UserWarning: torchaudio C++ extension is not available. anymore?

@mthrok mthrok changed the title Update extension discovery mechanism Update extension discovery mechanism for Windows support Mar 8, 2021
@mthrok mthrok force-pushed the windows-ext-init branch from f55784e to 7531b3f Compare March 8, 2021 02:34
@mthrok mthrok changed the title Update extension discovery mechanism for Windows support Fix C++ extension mechanism for Windows Mar 8, 2021
@mthrok mthrok changed the title Fix C++ extension mechanism for Windows Fix C++ extension initialization for Windows Mar 8, 2021
@mthrok mthrok requested a review from carolineechen March 8, 2021 04:12
@mthrok mthrok marked this pull request as ready for review March 8, 2021 14:20
Copy link
Contributor

@carolineechen carolineechen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Windows logs no longer show the C++ extension UserWarning

@mthrok mthrok merged commit f5ac116 into pytorch:master Mar 8, 2021
@mthrok mthrok deleted the windows-ext-init branch March 8, 2021 15:06
yoyolicoris added a commit to yoyolicoris/torchaudio that referenced this pull request Mar 8, 2021
Fix C++ extension for Windows (pytorch#1371)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants