[Openmp-commits] [PATCH] D148808: [OpenMP][libomptarget][AMDGPU] Enable optional active HSA wait state

Jan-Patrick Lehr via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Apr 20 08:17:13 PDT 2023


jplehr created this revision.
jplehr added reviewers: jdoerfert, jhuber6, JonChesterfield, tianshilei1992, ye-luo.
Herald added subscribers: sunshaoce, kosarev, kerbowa, guansong, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
jplehr requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1, wdng.
Herald added a project: OpenMP.

Adds support for optional env vars LIBOMPTARGET_AMDGPU_KERNEL_BUSYWAIT and LIBOMPTARGET_AMDGPU_DATA_BUSYWAIT.
When present, the wait for kernel completion or wait for data transfer will use HSA_WAIT_STATE_ACTIVE for the specified timeout.
Then the runtime will switch to blocked state.  Without these controls, small target regions such as found in benchmarks like Stream are 4-7% slower.

This superseeds https://reviews.llvm.org/D146849 and allows more finegrain control, while also addressing some of the outstanding reviewer comments.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148808

Files:
  openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148808.515343.patch
Type: text/x-patch
Size: 4515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230420/66d6d602/attachment.bin>


More information about the Openmp-commits mailing list