[flang-commits] [flang] [OpenMP][flang] Move `todo` for checking reduction support status on the GPU (PR #175172)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Mon Jan 19 02:17:03 PST 2026
================
@@ -598,26 +598,6 @@ DeclareRedType ReductionProcessor::createDeclareReductionHelper(
genCombinerCB(builder, loc, type, op1, op2, isByRef);
if (isByRef && fir::isa_box_type(valTy)) {
- bool isBoxReductionSupported = [&]() {
- auto offloadMod = llvm::dyn_cast<mlir::omp::OffloadModuleInterface>(
- *builder.getModule());
-
- // This check tests the implementation status on the GPU. Box reductions
- // are fully supported on the CPU.
- if (!offloadMod.getIsGPU())
----------------
ergawy wrote:
> which we wouldn't be able to use because the representation would have been lowered to something else by that stage, but perhaps the same case can be inferred from that lowered representation.
Yes, that's the reason for doing this a bit early. I am not sure how to detect this in a robust manner to honest. Do you have any suggestions?
https://github.com/llvm/llvm-project/pull/175172
More information about the flang-commits
mailing list