-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add tracing support for optional Device and Layout #30979
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
[ghstack-poisoned]
|
Someone from JIT (e.g. @eellison should review this). |
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.
LGTM. I don't know how exactly you plan on landing this stack; could you not land this PR without adding tests for these changes ? If it's in an upcoming PR that's fine.
| if (value.has_value()) { | ||
| detail::genericAddInput(n, static_cast<int64_t>(*value)); | ||
| } else { | ||
| Graph* g = n->owningGraph(); |
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.
It would be nice if you factored the 8 copy-pasta's of this three-line block into it's own function (i am one of those copy-paster's...)
This stack is a first step toward an effort to fix, clean up and simplify code generation logic. Please see the master [task](#30405) to see related discussions and all the known issues. Main focus of these changes is TensorOptions in code generation. Goals: - Remove TensorOptions from generated code wherever it's possible. Leave it only in python/C++ API layers. - Refactor TensorOptions logic to a single place. - Log all discovered issues. Non goals: - Fix Everything! - Remove all the hacks in code generation scripts. - Clean up and defector all code generation scripts. -------------- In this PR: Add tracing support for optional Device and Layout types. -------------- [ghstack-poisoned]
This stack is a first step toward an effort to fix, clean up and simplify code generation logic. Please see the master [task](#30405) to see related discussions and all the known issues. Main focus of these changes is TensorOptions in code generation. Goals: - Remove TensorOptions from generated code wherever it's possible. Leave it only in python/C++ API layers. - Refactor TensorOptions logic to a single place. - Log all discovered issues. Non goals: - Fix Everything! - Remove all the hacks in code generation scripts. - Clean up and defector all code generation scripts. -------------- In this PR: Add tracing support for optional Device and Layout types. -------------- Differential Revision: [D18912685](https://our.internmc.facebook.com/intern/diff/D18912685) [ghstack-poisoned]
Summary: Pull Request resolved: pytorch#30979 This stack is a first step toward an effort to fix, clean up and simplify code generation logic. �Please see the master [task](pytorch#30405) to see related discussions and all the known issues. Main focus of these changes is TensorOptions in code generation. Goals: - Remove TensorOptions from generated code wherever it's possible. Leave it only in python/C++ API layers. - Refactor TensorOptions logic to a single place. - Log all discovered issues. Non goals: - Fix Everything! - Remove all the hacks in code generation scripts. - Clean up and defector all code generation scripts. -------------- In this PR: Add tracing support for optional Device and Layout types. -------------- Test Plan: Imported from OSS Differential Revision: D18912685 Pulled By: izdeby fbshipit-source-id: 4a9514ce2eee0041f9bc96636d3ddb4f077675e1
This stack is a first step toward an effort to fix, clean up and simplify code generation logic. Please see the master task to see related discussions and all the known issues.
Main focus of these changes is TensorOptions in code generation.
Goals:
Non goals:
In this PR:
Add tracing support for optional Device and Layout types.
Stack from ghstack:
Differential Revision: D18912685