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

[MLIR][OpenMP] Fix handling of constant num_teams/threads #204

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

skatrak
Copy link

@skatrak skatrak commented Nov 13, 2024

The PR stack transitioning to the host_eval representation introduced an issue causing the num_teams, thread_limit and num_threads clauses to not properly initialize kernel attributes during target device compilation when these are constant.

This patch fixes that issue by using host-evaluated values instead of their corresponding block arguments when extracting these constant values.

The PR stack transitioning to the `host_eval` representation for introduced an
issue causing the `num_teams`, `thread_limit` and `num_threads` clauses to not
properly initialize kernel attributes during target device compilation when
these are constant.

This patch fixes that issue by using host-evaluated values instead of their
corresponding block argument when extracting these constant values.
Copy link

@TIFitis TIFitis left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix 👍🏽

@skatrak
Copy link
Author

skatrak commented Nov 13, 2024

LGTM. Thanks for the fix 👍🏽

That was quick, thank you!

@skatrak skatrak merged commit 0258a52 into ROCm:amd-trunk-dev Nov 13, 2024
3 of 5 checks passed
@skatrak skatrak deleted the fix-target-num-teams-threads branch November 13, 2024 16:40
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.

2 participants