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

Add krnl prefetch #2786

Closed

Conversation

AlexandreEichenberger
Copy link
Collaborator

Cannot add affine.prefetch during ONNX to KRNL lowering because affine prefetch check the enclosing loop nests, which are not yet affine.for loops during KRNL lowering.

Thus created a placeholder krnl.prefetch that will later be lowered to affine.prefetch.

… pass

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
@AlexandreEichenberger AlexandreEichenberger marked this pull request as draft April 4, 2024 15:37
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
@AlexandreEichenberger AlexandreEichenberger marked this pull request as ready for review April 5, 2024 21:24
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
@AlexandreEichenberger
Copy link
Collaborator Author

cleaned up old dialect builder for affine prefetch that are not in use.

@AlexandreEichenberger AlexandreEichenberger changed the title [WIP] Add krnl prefetch Add krnl prefetch Apr 5, 2024
Copy link
Collaborator

@tungld tungld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

// Code lifted from affine prefetch as is.
// I have seen parsing errors when multiple '#x' are used in the indices, could
// not tell why.
// krnl.prefetch %arg0[%1#0, %1#1, %3], read, locality<3>, data :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about affine.prefetch %arg0[%1#0, %1#1, %3], read, locality<3>, data ?

@AlexandreEichenberger
Copy link
Collaborator Author

Got included as part of other PRs

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.

None yet

3 participants