[Python STABLE ABI] Port pybind11 extension modules to torch stable libraries#4157
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/4157
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d77d279 with merge base a004389 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
4bbff44 to
531ddeb
Compare
531ddeb to
ee273ca
Compare
fc8ba7a to
2d37922
Compare
9aa5c3d to
7c02610
Compare
7c02610 to
4d3f4fa
Compare
289804c to
de13de9
Compare
de13de9 to
be6e2b6
Compare
74da408 to
154e43d
Compare
| (forced_align_impl<scalar_t, int64_t>( | ||
| logProbs, targets, blank, paths)); | ||
| } else if (targets.scalar_type() == ScalarType::Int) { | ||
| (forced_align_impl<scalar_t, int32_t>( |
There was a problem hiding this comment.
This change fixes access violation in one of the autograd tests on Windows CPU.
It is likely related to MSVC compiler handling of templates that sometimes have mysterious (d)effects.
| path = _get_lib_path(lib) | ||
| if not path.exists(): | ||
| suffix = ".pyd" if os.name == "nt" else ".so" | ||
| paths = list(_LIB_DIR.glob(f"{lib}*{suffix}")) |
There was a problem hiding this comment.
To support ABI components in library paths.
| extension = CppExtension | ||
|
|
||
| if _USE_CUDA: | ||
| extension = CUDAExtension |
There was a problem hiding this comment.
The libtorch ABI libraries are really not Python extension modules, so it's weird to use Cpp/CudaExtension here. Using Cpp/CudaLibrary is more appropriate but torch/tools/cpp_extension does not have these. Although, Cpp/CudaExtension and Cpp/CudaLibrary are fairly similar in their functionalities.
| export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}" | ||
| export PIP_PROGRESS_BAR=off | ||
| export CONDA_QUIET=1 | ||
| export NO_COLOR=1 |
There was a problem hiding this comment.
To avoid garbage from pytest output in logs.
As in the title.
In addition, the PR removes cmake dependency as unused.
PLEASE NOTE THAT THE TORCHAUDIO REPOSITORY IS NO LONGER ACTIVELY MONITORED. You may not get a response. For open discussions, visit https://discuss.pytorch.org/.