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

Expire traced tensors #1600

Merged
merged 8 commits into from
Feb 27, 2023
Merged

Conversation

vshampor
Copy link
Contributor

Changes

Traced tensors will now be marked as "expired" upon leaving the TracingContext they were created in, and expired traced tensors will have their TensorMeta data discarded next time they end up in (possibly another) TracingContext.

Reason for changes

YOLOv8 from ultralytics caches anchors during a forward call, which leads to a TracedTensorfrom one dummy forward persist into the other dummy forward tracing call, with TensorMeta data which is no longer valid.

Related tickets

104305

Tests

tests.torch.test_tracing_context.test_traced_tensors_are_expired_on_context_exit
tests.torch.test_tracing_context.test_no_cross_forward_run_dependency

@vshampor vshampor requested a review from ljaljushkin February 24, 2023 15:54
@github-actions github-actions bot added the NNCF PT Pull requests that updates NNCF PyTorch label Feb 24, 2023
@vshampor vshampor force-pushed the expire_traced_tensors branch from df1ea36 to 3167850 Compare February 24, 2023 18:58
@vshampor vshampor force-pushed the expire_traced_tensors branch from 3167850 to 276f68c Compare February 25, 2023 18:14
@vshampor vshampor force-pushed the expire_traced_tensors branch from 276f68c to 7ec8146 Compare February 27, 2023 10:43
@vshampor vshampor merged commit 5e5b740 into openvinotoolkit:develop Feb 27, 2023
@vshampor vshampor deleted the expire_traced_tensors branch January 9, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF PT Pull requests that updates NNCF PyTorch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant