This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Only use CUDA Driver API
ClosedPublic

Authored by Hahnfeld on Jan 30 2018, 6:06 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Jan 30 2018, 6:06 AM
grokos added inline comments.Jan 30 2018, 6:24 AM
libomptarget/plugins/cuda/src/rtl.cpp
691–692 ↗(On Diff #131956)

This assertion is guaranteed to trip - it's inside an if (sync_err != CUDA_SUCCESS) - so it doesn't make sense to have it. Besides, if kernel execution fails, the plugin should just return OFFLOAD_FAIL to the parent runtime, not terminate the program.

Hahnfeld added inline comments.Jan 30 2018, 6:44 AM
libomptarget/plugins/cuda/src/rtl.cpp
691–692 ↗(On Diff #131956)

I know, I was just mimicking the same behavior of the previous if statement. If that's not what we want, we should probably remove the first assert as well.

grokos added inline comments.Jan 30 2018, 6:50 AM
libomptarget/plugins/cuda/src/rtl.cpp
691–692 ↗(On Diff #131956)

Right, the previous assertion must be removed, it shouldn't be there.

Hahnfeld updated this revision to Diff 131965.Jan 30 2018, 6:55 AM
Hahnfeld marked 3 inline comments as done.

Remove asserts.

grokos accepted this revision.Jan 30 2018, 7:02 AM

LGTM.

This revision is now accepted and ready to land.Jan 30 2018, 7:02 AM
This revision was automatically updated to reflect the committed changes.