This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][nfc][amdgpu] Remove atmi_status_t type
ClosedPublic

Authored by JonChesterfield on May 25 2021, 1:56 PM.

Details

Summary

ATMI_STATUS_UNKNOWN was unused, deleted references to it.
Replaced ATMI_STATUS_{SUCCESS,ERROR} with HSA_STATUS_{SUCCESS,ERROR}
Replaced atmi_status_t with hsa_status_t

Otherwise no change. In particular, conversions between atmi_status_t and
hsa_status_t will now be conversions between hsa_status_t and itself.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.May 25 2021, 1:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2021, 1:56 PM
JonChesterfield added a comment.EditedMay 25 2021, 2:05 PM

Deleted the references to ATMI_STATUS_UNKNOWN manually, then

for f in `find . -type f`; do sed -i 's$ATMI_STATUS_SUCCESS$HSA_STATUS_SUCCESS$g' $f; sed -i 's$ATMI_STATUS_ERROR$HSA_STATUS_ERROR$g' $f; sed -i 's$atmi_status_t$hsa_status_t$g' $f; done

and clang-format

Landing this after the other refactors is probably easier. It can be reliably rebased/reimplemented on top of other changes and will otherwise create conflicts with anything near an error path.

openmp/libomptarget/plugins/amdgpu/impl/data.cpp
60

This can be return err;, leaving that for a later patch to help with rebasing. Several patches to these files currently live.

JonChesterfield edited the summary of this revision. (Show Details)May 25 2021, 3:17 PM
pdhaliwal accepted this revision.May 26 2021, 5:05 AM

Looks good. Thanks!

This revision is now accepted and ready to land.May 26 2021, 5:05 AM
This revision was landed with ongoing or failed builds.May 26 2021, 9:02 AM
This revision was automatically updated to reflect the committed changes.