Page MenuHomePhabricator

[HIP] Support flush denorms bitcode
ClosedPublic

Authored by ashi1 on Jun 22 2018, 10:32 AM.

Details

Summary

We need to use oclc_daz_opt_on.amdgcn.bc bitcode when option fcuda-flush-denormal-to-zero is enabled for HIP.

Diff Detail

Event Timeline

ashi1 created this revision.Jun 22 2018, 10:32 AM
yaxunl added a reviewer: scchan.

I think we should have a lit test for linked bitcode files.

lib/Driver/ToolChains/HIP.cpp
78

you can use StringRef here. Please use a more meaningful name, e.g. FlushDenormalControlBC.

ashi1 marked an inline comment as done.Jun 26 2018, 11:35 AM
ashi1 updated this revision to Diff 153124.Jun 27 2018, 10:36 AM

I've changed the string to a more meaningful name, and also added a lit test to check that oclc_daz_opt_on.amdgcn.bc is used.

ashi1 updated this revision to Diff 153127.Jun 27 2018, 10:54 AM
This comment was removed by ashi1.
ashi1 updated this revision to Diff 153131.Jun 27 2018, 11:02 AM

Fix diff file

yaxunl added inline comments.Jun 27 2018, 11:04 AM
test/Driver/hip-toolchain-flush-denorms.hip
7

we only need test with one arch

8

better put the dummy bc files under test/Driver/Inputs/hip_dev_lib

9

we also need to test the case without this option

yaxunl added inline comments.Jun 27 2018, 11:06 AM
lib/Driver/ToolChains/HIP.cpp
85

we need to fix the order. should be ocml, then ockl, then irif. but should do it in another patch

ashi1 updated this revision to Diff 153136.Jun 27 2018, 11:17 AM

I've updated. Moved the bitcode files into hip_dev_lib and added test for both on and off flush denorms to zero option.

ashi1 marked 3 inline comments as done.Jun 27 2018, 11:17 AM
ashi1 updated this revision to Diff 153140.Jun 27 2018, 11:29 AM

better merge these two tests and rename it as hip-device-libs.hip. We can also add other device lib tests to it later.

ashi1 updated this revision to Diff 153146.Jun 27 2018, 11:47 AM

Merged checks for flush denorm on and off into single test hip-device-libs.hip

yaxunl accepted this revision.Jun 27 2018, 11:57 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jun 27 2018, 11:57 AM
Closed by commit rC335765: [HIP] Support flush denormals bitcode (authored by aaronenyeshi, committed by ). · Explain WhyJun 27 2018, 12:03 PM
This revision was automatically updated to reflect the committed changes.