This is an archive of the discontinued LLVM Phabricator instance.

Retire Polly's FindCUDA.cmake in favour of CMake's default FindCUDA.cmake script.
ClosedPublic

Authored by singam-sanjay on May 30 2017, 3:45 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

singam-sanjay created this revision.May 30 2017, 3:45 AM
singam-sanjay added inline comments.May 30 2017, 6:10 AM
include/polly/Config/config.h.cmake
16 ↗(On Diff #100685)

CUDALIB_FOUND didn't seem to be used anywhere in the source. So I changed just this instance of CUDALIB_FOUND.

For consistency, should I add OpenCL_FOUND ?

philip.pfaffe edited edge metadata.May 30 2017, 7:03 AM

Generally LGTM.

It troubles me a little that GPUJIT is not actually linked to the found libraries, though this might be beyond the scope of this patch.

I see that GPUJIT instead manually dlopens libcudart.so, however this could be a different library than the one found by cmake, and also just might not be in the LD_LIBRARY_PATH, or even might not exist.

@grosser: Can you maybe shed some light on why GPUJIT is built that way, instead of just normally linking against CUDA/OpenCL?

include/polly/Config/config.h.cmake
16 ↗(On Diff #100685)

I think you might just remove this instead.

grosser edited edge metadata.May 30 2017, 9:11 AM

The idea is that binaries linked with libGPURuntime can run on systems where CUDA is not available by just falling back to CPU only mode. This is not yet fully implemented, but at least this is what we are shooting for.

philip.pfaffe accepted this revision.May 31 2017, 3:10 AM

Okay, I see.

This revision is now accepted and ready to land.May 31 2017, 3:10 AM

@singam-sanjay Do you need someone to commit this for you?

Yes. It would be helpful if you could commit it.

This revision was automatically updated to reflect the committed changes.
polly/trunk/CMakeLists.txt