Skip to content

Conversation

mthrok
Copy link
Contributor

@mthrok mthrok commented May 8, 2020

This PR

  • always include codecs to _torchaudio.so so that it does not depend on external SoX.
  • adds python setup.py clean command which facilitates clean build.

These changes follow the identical pattern as pytorch/text#755 .

  • Note on build time requirements
    • Before this change, it was assumed that SoX was built somewhere in the System. (could be one that was installed by package management system like apt, or manually built one)
    • After this change, curl and CMake are required, so that it can build SoX and codecs.

@mthrok mthrok requested review from cpuhrsch and vincentqb May 8, 2020 22:00
@mthrok mthrok force-pushed the csrc branch 2 times, most recently from eeebf6c to 670994e Compare May 9, 2020 16:42
Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

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

Tests are failing.

@vincentqb
Copy link
Contributor

  • change the library name to _torchaudio.so under torchaudio directory

Can that be BC breaking?

@mthrok
Copy link
Contributor Author

mthrok commented May 12, 2020

  • change the library name to _torchaudio.so under torchaudio directory

Can that be BC breaking?

I do not think so.

  • Python naming convention tells that _torch_sox.so is not intended for external use.
  • We do not have any header file, so it is not possible to link against _torch_sox.so.

Added the list of things changed by PR in the description.

@cpuhrsch
Copy link
Contributor

cpuhrsch commented May 12, 2020

I think we should consider breaking this into a few more PRs. Changes like the move of the files or the rename of the library could be separated from the build scripts, etc. and make for a more manageable / revertable changeset. They will also be quicker to merge.

@mthrok
Copy link
Contributor Author

mthrok commented May 12, 2020 via email

@mthrok mthrok marked this pull request as draft May 12, 2020 15:33
@mthrok mthrok force-pushed the csrc branch 4 times, most recently from be1c032 to ac09a12 Compare May 14, 2020 02:19
@mthrok mthrok changed the title Clean up extension build mechanism and extension location Self-contain codecs library May 14, 2020
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #625 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #625   +/-   ##
=======================================
  Coverage   88.84%   88.84%           
=======================================
  Files          21       21           
  Lines        2223     2223           
=======================================
  Hits         1975     1975           
  Misses        248      248           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 241ab1e...0f86469. Read the comment docs.

@mthrok mthrok marked this pull request as ready for review May 15, 2020 18:56
@mthrok mthrok requested a review from vincentqb May 15, 2020 18:57
@vincentqb
Copy link
Contributor

offline discussion with @mthrok -- how about compilation on the internal systems? e.g. internal

@vincentqb
Copy link
Contributor

cc @seemethere for awareness

@mthrok
Copy link
Contributor Author

mthrok commented May 21, 2020

offline discussion with @mthrok -- how about compilation on the internal systems? e.g. internal

I added bypass for the internal. In internal, nothing about dependencies changes. This PR cannot address T53444370.

Copy link
Contributor

@vincentqb vincentqb left a comment

Choose a reason for hiding this comment

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

LGTM

def _get_extra_objects():
objs = []
if _BUILD_DEPS:
# NOTE: The order of the library listed bellow matters.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "below" :)

- restore_cache:

keys:
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: v1 will be deleted soon after merging this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Caches on CCI will not be deleted, and we do not have control over them.
We change cache key on weekly basis, but this PR also changes what is cached, so it's safer to change the cache key from the previous one.
That way existing PR can still use the old style cache without rebasing, as long as there is no merge conflict.

@vincentqb vincentqb merged commit d3c83ea into pytorch:master May 27, 2020
@mthrok mthrok deleted the csrc branch May 27, 2020 19:57
@mthrok mthrok mentioned this pull request Jun 4, 2020
8 tasks
mpc001 pushed a commit to mpc001/audio that referenced this pull request Aug 4, 2023
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.

3 participants