-
Notifications
You must be signed in to change notification settings - Fork 53
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
C++ layer to implement Triu #3631
Open
protonu
wants to merge
8
commits into
main
Choose a base branch
from
pbasu_iota_experiment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+93
−0
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
protonu
force-pushed
the
pbasu_iota_experiment
branch
from
December 23, 2024 21:33
260141f
to
5f82c65
Compare
protonu
force-pushed
the
pbasu_iota_experiment
branch
from
January 2, 2025 20:12
0b42b74
to
b734bf6
Compare
!test |
!test |
jacobhinkle
reviewed
Jan 2, 2025
!test |
jacobhinkle
reviewed
Jan 3, 2025
csrc/ops/composite.cpp
Outdated
auto tv_columns = iota( | ||
tv->domain()->logical()[dims - 1]->extent(), | ||
SimplifyingIrBuilder::mulExpr( | ||
offset, IrBuilder::create<Val>(-1, DataType::Index)), |
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.
Nit: it might be clearer to just use a standard iota here then subtract the offset, or add/subtract it below where you are building the predicate. Here it is unclear what the args to iota are doing.
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.
This is a C++ API to implement
triu
. The PR (#3637) stacked on top of this used it to create a Python interface.Another way of using this may be to use the components of
triu
such asiota
,broadcast
,le
andwhere
from Thunder directly bypassing the need for a C++ implementation. As future work this commit/PR may be removed in favor of a Thunder only implementation.