If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found.
Details
- Reviewers
Hahnfeld ABataev carlo.bertolli caomhin tra - Commits
- rG5a3608ccfaa9: [OpenMP] Don't throw cudalib not found error if only front-end is required.
rG8cf757cedaac: [OpenMP] Don't throw cudalib not found error if only front-end is required.
rC314217: [OpenMP] Don't throw cudalib not found error if only front-end is required.
rC314150: [OpenMP] Don't throw cudalib not found error if only front-end is required.
rL314217: [OpenMP] Don't throw cudalib not found error if only front-end is required.
rL314150: [OpenMP] Don't throw cudalib not found error if only front-end is required.
Diff Detail
- Build Status
Buildable 10296 Build 10296: arc lint + arc unit
Event Timeline
lib/Driver/ToolChains/Cuda.cpp | ||
---|---|---|
505–508 | This could probably be rephrased as: if (DeviceOffloadingKind == Action::OFK_OpenMP && DriverArgs.hasArg(options::OPT_S, options::OPT_c))) ... |
BTW, at least for CUDA compilation, '-c' would still needs libdevice as device-side will compile PTX to SASS and will need all the symbols PTX may refer to.
Would that not be the case for OpenMP's compilation, too?
I'm not particularly familiar with OpenMP internals. Could you elaborate on why libdevice would not be needed with -c for the OpenMP case?
Is that because it would only apply to the host compilation and that nothing will be compiled for the openmp targets?
Does openmp allow separate compilation for the target (i.e. something similar to what --cuda-device-only does?)
test/Driver/openmp-offload-gpu.c | ||
---|---|---|
133 ↗ | (On Diff #115500) | I'd have separate runs -- one with -S and another one with -c. That would cover openMP compilation changes. There should also be similar test to verify new behavior for CUDA compilation. |
test/Driver/openmp-offload-gpu.c | ||
---|---|---|
133 ↗ | (On Diff #115500) | There is no new behaviour for CUDA actually, I only introduce this for OpenMP offloading. |
test/Driver/openmp-offload-gpu.c | ||
---|---|---|
140 ↗ | (On Diff #115697) | Do you need both -c and -S? I'm under the impression that -c -S is equivalent to -S. |
This could probably be rephrased as: