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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cpp extensions in favor of torch ops #1348

Merged
merged 8 commits into from
Sep 18, 2019

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Sep 18, 2019

Fixes #1322

Now we only use torch operators, which makes it possible for them to be available in torchscript.

I also handle the case of TorchHub support, because now instead of lazily importing the extensions, we unconditionally import the extensions at torchvision import time, but we don't fail hard if it's not available

@fmassa fmassa requested a review from lara-hdr September 18, 2019 14:06
@codecov-io
Copy link

codecov-io commented Sep 18, 2019

Codecov Report

Merging #1348 into master will decrease coverage by 0.02%.
The diff coverage is 72.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1348      +/-   ##
==========================================
- Coverage    65.5%   65.48%   -0.03%     
==========================================
  Files          75       75              
  Lines        5819     5827       +8     
  Branches      892      892              
==========================================
+ Hits         3812     3816       +4     
- Misses       1737     1743       +6     
+ Partials      270      268       -2
Impacted Files Coverage Δ
torchvision/ops/boxes.py 94.44% <ø> (-0.3%) ⬇️
torchvision/__init__.py 76.19% <100%> (+1.19%) ⬆️
torchvision/ops/roi_pool.py 72% <100%> (-2.08%) ⬇️
torchvision/ops/roi_align.py 69.23% <100%> (-2.2%) ⬇️
torchvision/ops/__init__.py 100% <100%> (ø) ⬆️
torchvision/ops/_register_onnx_ops.py 100% <100%> (ø)
torchvision/ops/_utils.py 33.33% <33.33%> (+6.06%) ⬆️
torchvision/extension.py 48.48% <71.42%> (+7.57%) ⬆️
torchvision/models/detection/roi_heads.py 55.77% <0%> (-0.16%) ⬇️
torchvision/models/detection/rpn.py 79.32% <0%> (+0.09%) ⬆️
... and 1 more

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 d7e88fb...7566dec. Read the comment docs.

@fmassa fmassa force-pushed the remove-cpp-extensions branch from ea893d3 to ceafeb4 Compare September 18, 2019 14:39
@fmassa fmassa merged commit f677ea3 into pytorch:master Sep 18, 2019
@fmassa fmassa deleted the remove-cpp-extensions branch September 18, 2019 21:21
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.

Remove C++ extensions in favor of torch operators
3 participants