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

Scatter elements simplification #3137

Open
shivadbhavsar opened this issue May 30, 2024 · 1 comment
Open

Scatter elements simplification #3137

shivadbhavsar opened this issue May 30, 2024 · 1 comment
Assignees

Comments

@shivadbhavsar
Copy link
Contributor

Example series of instructions found in Longformer:

@145 = hip::copy(@121,@144) -> half_type, {4, 4, 256, 513}, {525312, 131328, 513, 1}: 0.0193204ms, 1%
@146 = load[offset=8404992,end=12607488](@1) -> half_type, {4, 4, 256, 513}, {525312, 131328, 513, 1}: 0.00071044ms, 1%
@147 = hip::copy(@121,@146) -> half_type, {4, 4, 256, 513}, {525312, 131328, 513, 1}: 0.0183114ms, 1%
....
@151 = gpu::code_object[code_object=5072,symbol_name=scatter_elements_kernel,global=622592,local=1024,](@143,@150,@147) -> half_type, {4, 4, 256, 513}, {525312, 131328, 513, 1}: 0.0539156ms, 1%
@152 = gpu::code_object[code_object=5072,symbol_name=scatter_elements_kernel,global=622592,local=1024,](@55,@151,@145) -> half_type, {4, 4, 256, 513}, {525312, 131328, 513, 1}: 0.054144ms, 1%

In cases where scatter axis is the same, we might be able to simplify this to a single scatter op

@causten
Copy link
Collaborator

causten commented Jul 25, 2024

Shiv to check if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants