This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Utilize the "non-uniform-workgroup" to simplify DeviceRTL
ClosedPublic

Authored by jdoerfert on Oct 7 2022, 6:36 AM.

Details

Summary

OpenMP offloading always uses uniform workgroups, see
https://reviews.llvm.org/D135374. The runtime doesn't need to handle
non-uniform workgroups at all either.

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 7 2022, 6:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 6:36 AM
jdoerfert requested review of this revision.Oct 7 2022, 6:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 6:36 AM
Herald added a subscriber: sstefan1. · View Herald Transcript
This revision is now accepted and ready to land.Oct 24 2022, 1:00 PM

@estewart08 Can you try the suggested fix below?

openmp/libomptarget/DeviceRTL/src/Mapping.cpp
82

This should be __builtin_amdgcn_grid_size_x()/__builtin_amdgcn_workgroup_size_x().

estewart08 added inline comments.Nov 2 2022, 7:45 AM
openmp/libomptarget/DeviceRTL/src/Mapping.cpp
82

That fixed the check-openmp failures on my local build.