-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CMake 3/3] Split source files with Python dependency to separate library #1660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The destination directory torchtext/lib
is not created by setuptools.
One trick I used in torchaudio is to add .gitignore
in torchaudio/lib
.
https://github.com/pytorch/audio/blob/main/torchaudio/lib/.gitignore
Doing the same should resolve the current failing unittest_linux
jobs.
@mthrok adding the |
Looking at the log, it cannot find the implementations of torchtext's custom kernels. Comparing the failing link command against the one from torchaudio's successful compilation [src], they look exactly the same. So I think this suggests that something about
|
The link command for libtorchXXX also look identical
|
The command for compiling obj for libtorchXXX seems to be different. Ttrchtext uses
|
Similarly compile command for PyBind registration is different.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Reference Issue #1644
Description
CppExtension
module_torchtext.so
library with all source files fromcsrc/
folder. This is similar to the build artifacts created by the current build process - [CMake 2/3] Add CMake Build to torchtext to create single_torchtext
library #1673_torchtext.so
. This will link against thelibtorchtext.so
library containing source files with pure C++ dependecies.Build Process
Building the torctext project using
setup.py
Building the extension manually using CMake