This is an archive of the discontinued LLVM Phabricator instance.

[openmp] Always pass valid triple to openmp-targets when using newRTL
ClosedPublic

Authored by JonChesterfield on Jan 19 2022, 12:55 PM.

Details

Summary

Previously, we sometimes pass fopenmp-targets=nvptx64-nvidia-cuda-newRTL

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Jan 19 2022, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2022, 12:55 PM
This revision is now accepted and ready to land.Jan 19 2022, 12:56 PM

Wait. Why does this even happen?

Wait. Why does this even happen?

There were test strings for different architectures, one was testing nvptx64-nvidia-cuda-newRTL which was just copied directly into the triple without realizing it still had the newRTL

The libomptarget_target gets used as-is in two of the substitutions for forming an fopenmp-target string, and that variable was also used as a convenient way to run the tests under old and new rtl (the plugin/cuda and plugin/amdgpu cmake are responsible for enabling these tests and each appended both their normal triple and a second one with -newRTL appended as a way of switching on both tests, I've put a comment by the remainder of this.

All this comes under the heading of debt that disappears when we go back to using a single device runtime. In this particular instance, it's on me for (ab)using the triple string in that way from CMake without realising it was used like this by the test runner.

openmp/libomptarget/test/lit.cfg
105

rest of hack here

Oh, so we are using two "architectures" to trigger two tests.