[libomptarget][nfc] Move hostcall required test to rtl
Remove a global, fix minor race. First of N patches to bring up hostcall.
Differential D103058
[libomptarget][nfc] Move hostcall required test to rtl JonChesterfield on May 24 2021, 5:17 PM. Authored by
Details [libomptarget][nfc] Move hostcall required test to rtl Remove a global, fix minor race. First of N patches to bring up hostcall.
Diff Detail
Event TimelineComment Actions Hostcall exists as a libraries in rocm, aomp and my github. Trunk has hooks - mostly weak symbols - to allow the host plugin source to work with or without it present. The variable that is checked for (before and after this change) is introduced by a common variable in the GPU entry point for hostcalls. The idea is to only spin up the thread(s) associated with hostcall if the GPU will use it. __asm__("; hostcall_invoke: record need for hostcall support\n\t" ".type needs_hostcall_buffer,@object\n\t" ".global needs_hostcall_buffer\n\t" ".comm needs_hostcall_buffer,4":::); This removes one of the remaining uses of the symbol info table. Comment Actions Side point on races - I think it is possible for one thread to start loading a binary, get immediately suspended, and a second thread to then launch a kernel that is supposed to come from that binary. The locking scheme in this plugin probably doesn't handle that. Hopefully libomptarget does have locking that makes that work, otherwise the cuda plugin is probably also racy. Comment Actions Was reviewed on aomp, will wait a little while before landing this to match. Edit: though this is NFC on trunk, after landing here it'll reach rocm, where it will be tested by the usual pipeline Comment Actions Your commit message looks like commit df005fa364ae3914231f98f80acc120fcf782c26 Author: Jon Chesterfield <jonathanchesterfield@gmail.com> Date: Tue May 25 22:43:16 2021 +0100 [libomptarget][nfc] Move hostcall required test to rtl [libomptarget][nfc] Move hostcall required test to rtl Remove a global, fix minor race. First of N patches to bring up hostcall. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D103058 Notice the duplicate subject line? This appears to be a recurring issue with your commits, so it might be something in your workflow? Comment Actions Thanks for pointing it out! I was under the impression that the contents of 'Summary' as shown in Phabricator turns into the commit message. Looks like the commit message I'm creating is the title from phabricator, then a newline, then the summary, so the workflow change is probably to write less in the Summary field. I'm committing a patch by: git checkout main && git reset --hard origin/main && git pull # clean slate arc patch D1000 git checkout main git cherry-pick D1000 git log -n2 # eyeball it git push combined with creating patches with arc diff, I think the failure mode must be in my use of arcanist. Edited the WIP diffs to, I hope, avoid continuing in this pattern. |
clang-tidy: error: 'libelf.h' file not found [clang-diagnostic-error]
not useful