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

[XPU][TritonGPUToLLVM] Use reqd_work_group_size #2845

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

victor-eds
Copy link
Contributor

@victor-eds victor-eds commented Nov 27, 2024

Use llvm.func's reqd_work_group_size instead of max_work_group_size to express known work-group size information.

@victor-eds victor-eds requested review from whitneywhtsang, etiotto and a team November 27, 2024 14:44
@victor-eds victor-eds self-assigned this Nov 27, 2024
Use `llvm.func`'s `reqd_work_group_size` instead of `max_work_group_size`
to express known work-group size information.

Signed-off-by: victor-eds <victor.perez@codeplay.com>
@victor-eds victor-eds force-pushed the use-reqd-work-group-size branch from 109de74 to 3d95a81 Compare November 27, 2024 17:00
@victor-eds
Copy link
Contributor Author

I found why setting reqd_work_group_size fails.

Basically, IGC expects a non-standard format for that metadata in the LLVM module, so it has to preprocess it. Preprocessing only takes place if the kernel is listed under opencl.kernels metadata. As preprocessing is not taking place, IGC sees the attribute is present as the function is marked, so it tries to retrieve that info, but it just returns 0 as the metadata hasn't been preprocessed. In the end, the static work-group size is 0 always.

Once #2869 is completed, this PR can be continued.

@victor-eds
Copy link
Contributor Author

Blocked. Related to #2923 (comment)

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