-
Notifications
You must be signed in to change notification settings - Fork 197
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
Feat: Remove QOP Export #917
Conversation
src/brevitas/export/manager.py
Outdated
@@ -254,8 +205,6 @@ def _cache_inp_out(cls, module, *args, **kwargs): | |||
module.apply(lambda m: _override_inp_caching_mode(m, enabled=True)) | |||
module.apply(lambda m: _override_out_caching_mode(m, enabled=True)) | |||
with ExitStack() as stack: |
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.
If we don't add anything to the stack, we can remove the context manager and leave the forward pass as part of the function
@@ -280,8 +229,6 @@ def jit_inference_trace( | |||
# force requires_grad to False to let the wrapped model lambda go through tracing | |||
requires_grad_backup_dict = _force_requires_grad_false(module) | |||
with ExitStack() as stack: | |||
for mgr in cls._trace_patches(): |
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.
Same as before
@@ -123,8 +123,6 @@ def export_onnx( | |||
module.apply(lambda m: _override_inp_caching_mode(m, enabled=False)) | |||
# perform export pass | |||
with ExitStack() as stack: | |||
for mgr in cls._trace_patches(): |
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.
Same as before, everything can be flattened one level down
…g put on the stack after changes
Reason for this PR
QOp export is not in use so can be removed to simplify code base
Changes Made in this PR
Remove QOp export code and references in documentation
Testing Summary
Relying on automated testing, functionality is being removed and none is being added
Risk Highlight
ONNX and Torch QOp export will no longer be possible
Checklist
dev
branch.Future Work