This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Check compatibility of -fgpu-sanitize with offload arch
ClosedPublic

Authored by yaxunl on May 22 2021, 9:13 PM.

Details

Summary

-fgpu-sanitize is incompatible with offload arch containing xnack-.

This patch checks that.

Diff Detail

Event Timeline

yaxunl created this revision.May 22 2021, 9:13 PM
yaxunl requested review of this revision.May 22 2021, 9:13 PM
tra added inline comments.May 24 2021, 10:56 AM
clang/lib/Driver/ToolChains/AMDGPU.h
114–115

I'd use a struct instead. It makes things more readable in all the other other places where we don't have the exact return type spelled out.

clang/lib/Driver/ToolChains/HIP.cpp
473

What if FeatureMap is None?
Considering that it's derived from user input, this should be properly checked and diagnosed, if we didn't get the feature map.
At the very least there should be an assert, if we ensure somewhere else that we always get a valid FeatureMap here.

foad removed a subscriber: foad.May 25 2021, 2:01 AM
yaxunl updated this revision to Diff 347769.May 25 2021, 1:27 PM
yaxunl marked 2 inline comments as done.

revised by Artem's comments

tra accepted this revision.May 25 2021, 2:00 PM
This revision is now accepted and ready to land.May 25 2021, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2021, 9:07 AM