TensorRT
TensorRT copied to clipboard
Remove Bazel related file from Python wheel packaging
Description
I'm not sure if the issue is with rules_python
or Bazel but it is not possible to install a Python wheels with Bazel and rules_python if the wheels contains Bazel related files (e.g WORKSPACE, BUILD) on the root folder.
This patch will remove the two files from the Python wheel packaging (reducing it size by a very marginal amount 😄 )
I have tested that the python wheel can be built successfully and installed in a Bazel environment.
Fixes #1262
Type of change
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [ ] My code follows the style guidelines of this project (You can use the linters)
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas and hacks
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests to verify my fix or my feature
- [x] New and existing unit tests pass locally with my changes
- [ ] I have added the relevant labels to my PR in so that relevant reviewers are notified
Hi @gdippolito!
Thank you for your pull request and welcome to our community.
Action Required
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
We ship these files so that users who install the wheel file can pull in the headers and .so files as a local_repository
for C++ projects. For example this is in our WORKSPACE. https://github.com/pytorch/TensorRT/blob/8498287e70dc1e83efe68a6c5ce02953d8f65a45/WORKSPACE#L34
Which allows us to do testing against pre-compiled versions of torch_tensorrt. For us I guess we can just make this a new_local_repository
and just reference the BUILD file in tree but seems like something that may be useful to others (ala the torch/share/cmake
dir in pytorch's package).
Was thinking about why this might be a problem and it could be rules_python is generating a BUILD file and placing it in the unpacked package dir and this causes a conflict. iirc there's a build filename hierarchy so perhaps we can use a different lower priority filename for the build file and this would solve the issue. We do something like this here
This PR has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days