This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.
ClosedPublic

Authored by gtbercea on Sep 15 2017, 11:36 AM.

Event Timeline

gtbercea created this revision.Sep 15 2017, 11:36 AM

Please add a test case.

tra added inline comments.Sep 19 2017, 10:16 AM
lib/Driver/ToolChains/Cuda.cpp
255–257

The purpose of the original assert was to catch a programming error and this change negates that purpose.
Perhaps I'm missing something. Could you elaborate on what's the motivation for this particular change?

I don't understand why it would be OK to end up with an unknown GPU architecture if -nocudalib is specified.
You still do want to pass *some* specific GPU arch to ptxas and that has nothing to do with whether you happen to have suitable libdevice.

gtbercea updated this revision to Diff 115943.Sep 19 2017, 6:05 PM

Don't take into account unknown CUDA archs not even for testing purposes.

tra accepted this revision.Sep 20 2017, 9:37 AM

One small nit. LGTM otherwise.

test/Driver/openmp-offload-gpu.c
133

Please split this RUN line further.

This revision is now accepted and ready to land.Sep 20 2017, 9:37 AM
gtbercea updated this revision to Diff 116621.Sep 25 2017, 2:54 PM

Split line.

gtbercea closed this revision.Sep 25 2017, 2:58 PM