-
Notifications
You must be signed in to change notification settings - Fork 350
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: Add optional tensor domain argument to Input class #1537
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
component: api [Python]
Issues re: Python API
component: api [C++]
Issues re: C++ API
component: core
Issues re: The core compiler
component: partitioning
labels
Dec 8, 2022
- Add support for specifying one, both, or neither integer bound (in Python) on Tensor domain used for generating a sample tensor in shape analysis - Add bounds checking to avoid int32_t overflow issues - Add validation for inputs to ensure high bound exceeds low bound and inputs are strictly integers - Use [0, 2) as the default bound, which works well as a random-number selection range in cases of Bool, Int, and Float types - Add validation in C++ to ensure provided domain arguments have the correct number of elements and ordering - Add functionality to print domains as part of both partitioning and initialization, for debugging purposes - Add hooks in pybind to capture specified input domain argument and parse values for mirrored internal representation - Add new Input constructors with defaults to accommodate new `tensor_domain` argument - Add pybind and torchbind get/set fields for C++ and Python API compatibility - Add C++ and Python collections test cases to ensure domain specification is functional across APIs
gs-olive
force-pushed
the
dynamic_input_domain_phase_1
branch
from
December 8, 2022 18:16
7e91ee0
to
7be7982
Compare
@bowang007 can you be the reviewer for this PR? |
bowang007
approved these changes
Feb 5, 2023
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
narendasan
approved these changes
Feb 8, 2023
- Update Python API to accept a full domain definition or None, without intermediates - Update cpp and Python APIs to include float support - Update data structure for tensor domain object to _Float64 - Add tests to ensure tensor domain usage in shape analysis is covered via test cases
gs-olive
force-pushed
the
dynamic_input_domain_phase_1
branch
from
February 9, 2023 18:13
5d29a19
to
ce84566
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla signed
component: api [C++]
Issues re: C++ API
component: api [Python]
Issues re: Python API
component: core
Issues re: The core compiler
component: partitioning
component: tests
Issues re: Tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
tensor_domain
argumentFixes #1531
Addresses Prototype + MVP of #1425
Type of change
Checklist: