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

[LinalgExt] Drop the unit dims on scatter ops #19450

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IanWood1
Copy link
Contributor

@IanWood1 IanWood1 commented Dec 11, 2024

This change adds patterns to drop the unit dims of a iree_linalg_ext.scatter's %updates tensor. Changes were also made to the verifier to allow for scatter to not have unit dims. For example, the following would be illegal because the updates tensor has too small of a rank:

%0 = iree_linalg_ext.scatter dimension_map = [0] unique_indices(true)
	ins(%collapsed, %arg1 : tensor<?x16x4x128xf16>, tensor<?x1xi32>) 
	outs(%arg2 : tensor<?x2x16x4x128xf16>) {
    ^bb0(%arg3: f16, %arg4: f16):                                                                                                                                                                 iree_linalg_ext.yield %arg3 : f16
} -> tensor<?x2x16x4x128xf16>

See the related issue #19091

@IanWood1 IanWood1 changed the title [LinalgExt] Drop the unit dims on scatter ops. [LinalgExt] Drop the unit dims on scatter ops Dec 11, 2024
@IanWood1 IanWood1 force-pushed the drop_unit_scatter branch 2 times, most recently from ce0ec3a to cff1fb1 Compare December 11, 2024 17:59
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.

1 participant