Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CMake Based Build System for Torchtext #1644

Closed
5 tasks done
Nayef211 opened this issue Mar 9, 2022 · 0 comments
Closed
5 tasks done

Enable CMake Based Build System for Torchtext #1644

Nayef211 opened this issue Mar 9, 2022 · 0 comments
Assignees

Comments

@Nayef211
Copy link
Contributor

Nayef211 commented Mar 9, 2022

馃殌 Feature

Create native C++ binaries using a CMake based build system to allow third-parties to integrate torchtext in their applications

Motivation

Currently torchtext鈥檚 C++ extension and third party libraries are built using PyTorch鈥檚 CppExtension module. Though this approach has some pros, the main downsides are that it makes integrating third party libraries challenging and the resulting library is linked against libpython, via libtorch_python. Due to the dependency on libpython, OSS torchtext does not have a standalone C++ binary that downstream users can depend on. This is a blocker for some customers who want to use torchtext operators in a non-Python environment (using TorchScript or as a C++ API).

There are some issues created by users that further motivate this work:

Pitch

We aim to resolve these problems by moving our build system to use CMake. Firstly, CMake should make it easier to integrate third party libraries simply by adding a reference to it鈥檚 own CMake file to build the library. Secondly, since CMake is language-agnostic, there is no need to link against libpython.

Before making any changes to torchtext鈥檚 build system, we need to ensure that there is adequate testing across all platforms in our OSS CI. This means enabling MacOS unit tests in CircleCI to catch platform specific build failures caused by the switch to CMake.

Milestones

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

No branches or pull requests

1 participant