GPGPU Codegeneration requires the LLVM NVPTX target for it to work.
D47888 switches it off if that's not available, but still emits a warning.
Instead, just figure out if NVPTX is enabled and only then switch on GPGPU
codegen.
Details
- Reviewers
Meinersbur grosser bollu
Diff Detail
- Build Status
Buildable 19072 Build 19072: arc lint + arc unit
Event Timeline
zorg/buildbot/builders/PollyBuilder.py | ||
---|---|---|
78–79 | [suggestion] any('LLVM_TARGETS_TO_BUILD' in A and 'NVPTX' in A for A in extraCmakeArgs) Does this actually work? Isn't extraCmakeArgs formatted like ['-DLLVM_TARGETS_TO_BUILD=X86;NVPTX'], that is, neither 'LLVM_TARGETS_TO_BUILD' nor 'NVPTX' as entire strings are in the list. | |
80–81 | Could you add a comment why this is here? |
zorg/buildbot/builders/PollyBuilder.py | ||
---|---|---|
78–79 | Yes, that's why I'm iterating the list. |
zorg/buildbot/builders/PollyBuilder.py | ||
---|---|---|
78–79 | sorry, I seem to have confused 'NVPTX' in A and 'NVPTX' == A |
That's a way to find the first matching element and decide whether there is one in a compact functional way. Do you think it's stylistically questionable?
IMHO it is functionally identical to any('LLVM_TARGETS_TO_BUILD' in A and 'NVPTX' in A for A in extraCmakeArgs) which is even more compact. Why does your version add an if-constraint to the generator when any ignores false-ish elements anyway?
[suggestion] any('LLVM_TARGETS_TO_BUILD' in A and 'NVPTX' in A for A in extraCmakeArgs)
Does this actually work? Isn't extraCmakeArgs formatted like ['-DLLVM_TARGETS_TO_BUILD=X86;NVPTX'], that is, neither 'LLVM_TARGETS_TO_BUILD' nor 'NVPTX' as entire strings are in the list.