Refactored pointwise samples to minimize duped code and speed up#104
Open
rsuderman wants to merge 4 commits intoiree-org:mainfrom
Open
Refactored pointwise samples to minimize duped code and speed up#104rsuderman wants to merge 4 commits intoiree-org:mainfrom
rsuderman wants to merge 4 commits intoiree-org:mainfrom
Conversation
- Introduce PointwiseBinaryGraphBuilder and PointwiseUnaryGraphBuilder classes to encapsulate graph creation, tensor setup, compilation, and execution for pointwise operations - Add getTensorAttr() helper function to simplify contiguous tensor creation - Refactor all pointwise test files to use the new builder classes, reducing boilerplate and improving readability - Remove redundant multi-iteration execution loops from tests (keeping single execution per test case) Design Notes The new pointwise_utils.h header is intentionally placed in samples/pointwise/ alongside the tests that use it, rather than in a shared location. This keeps the utilities scoped to the pointwise operators and avoids exposing implementation details to other sample categories or the broader codebase. Signed-off-by: Rob Suderman <rob.suderman@gmail.com>
9fd32b8 to
7152fff
Compare
Signed-off-by: Rob Suderman <rob.suderman@gmail.com>
ca96e36 to
d57c74a
Compare
Signed-off-by: Rob Suderman <rob.suderman@gmail.com>
Signed-off-by: Rob Suderman <rob.suderman@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Design Notes
The new pointwise_utils.h header is intentionally placed in samples/pointwise/ alongside the tests that use it, rather than in a shared location. This keeps the utilities scoped
to the pointwise operators and avoids exposing implementation details to other sample categories or the broader codebase.