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

Jameszianxu/runtime intermediates #383

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jameszianxuTT
Copy link
Contributor

Ticket

#260

Problem description

Currently no way to get intermediate ttnn results
from runtime.

What's changed

  • Create a cache object for runtime intermediates
  • Save per-torchfx op goldens
  • Save per-ttnn op runtime output tensors
  • Run a verification pass between torchfx and runtime output tensors
    based on torchfx-ttnn mapping, accounting for decomposition

Checklist

  • New/Existing tests provide coverage for changes

- Register runtime tensor cpp binding (tbd - API for descriptor)
	and runtime tensor to torch Tensor conversion
- Add test codepath to prepopulate intermediate golden map
- Add cache for intermediate data incl. golden tensor(s), decomposed
	ttnn op output tensor(s) as a list
- Add post-execution PCC / ATOL comparison
- Use testing goldens in place of real intermediates for verification
- Fixup datatype bugs (tuple of tensor vs tensor)
- Remove circular dependency in verify.py
@jameszianxuTT jameszianxuTT force-pushed the jameszianxu/runtime_intermediates branch from da6ff94 to 8a8949c Compare February 28, 2025 20:56
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Torch Tests435 ran428 passed7 skipped0 failed
TestResult
No test annotations available

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 45 lines in your changes missing coverage. Please review.

Project coverage is 73.50%. Comparing base (186ad28) to head (8a8949c).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tt_torch/dynamo/backend.py 27.41% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
- Coverage   75.81%   73.50%   -2.31%     
==========================================
  Files           8        8              
  Lines        1199     1253      +54     
==========================================
+ Hits          909      921      +12     
- Misses        290      332      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants