-
Notifications
You must be signed in to change notification settings - Fork 64
Use the new IR for building graphs in torchlib #1354
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1354 +/- ##
==========================================
- Coverage 77.26% 77.17% -0.09%
==========================================
Files 209 212 +3
Lines 22533 22867 +334
Branches 3806 3887 +81
==========================================
+ Hits 17410 17648 +238
- Misses 4418 4502 +84
- Partials 705 717 +12 ☔ View full report in Codecov by Sentry. |
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.
lintrunner found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Test Results 28 files + 2 28 suites +2 3h 21m 9s ⏱️ - 14m 28s For more details on these failures and errors, see this check. Results for commit d28b8d4. ± Comparison against base commit 9ea1d1c. This pull request removes 68 and adds 1368 tests. Note that renamed tests count towards both.
This pull request removes 1 skipped test and adds 335 skipped tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
21b7c4e
to
ccdca53
Compare
9f1f36f
to
529801f
Compare
return _ONNX_DTYPE_TO_TORCH[dtype] | ||
|
||
|
||
class TorchScriptTensor(ir.Value, onnxscript_tensor.Tensor): |
Check warning
Code scanning / CodeQL
`__eq__` not overridden when adding attributes Warning
'__eq__'
_is_complex
The class 'TorchScriptTensor' does not override
'__eq__'
_concrete_value
The class 'TorchScriptTensor' does not override
'__eq__'
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.
Overall LGTM. The TorchScript naming should go away, though :)
Maybe some docstrings for both graph_building/__init__.py
and ir/__init__.py
exaplining the goal of each module, the basic design idea/mechanics would help a lot the hand off to pytorch and new comers that start on the project
Absolutely. We need the exporter to decide how it wants to interface with the IR and move away from referencing this object. Then we can remove this class |
I added that to |
Use the new IR for building graphs in torchlib. I created a flag
TORCHLIB_EXPERIMENTAL_USE_IR
to control the feature. When enabled the classes ingraph_building
will be swapped to use the new IR. The exporter should see the same interfaces and not feel anything. After the transition period we can decide where this should live.Set
TORCHLIB_EXPERIMENTAL_USE_IR=1
to enable this feature.Fix #997