This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP][NVPTX]Fixed checks for cuda versions.
ClosedPublic

Authored by ABataev on Jul 12 2019, 10:47 AM.

Details

Summary

We used CUDART_VERSION macro to check for the installed cuda version
but this macro is defined in cuda_runtime_api.h, which is not used by
project. Better to use CUDA_VERSION macro, which is defined in cuda.h.
Also, added the check if this macro is defined. If macro is undefined,
there is something wrong with the cuda configuration and we should not
continue the compilation.
This also fixes problems with runtime building in cuda 10+.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev created this revision.Jul 12 2019, 10:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2019, 10:47 AM
grokos accepted this revision.Jul 15 2019, 4:19 PM

This change makes sense, looks good to me.

This revision is now accepted and ready to land.Jul 15 2019, 4:19 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2019, 9:07 AM