[PATCH] D147940: [Flang][OpenMP][OMPIRBuilder] Add lowering of TargetOp for device codegen
Sergio Afonso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 04:19:01 PDT 2023
skatrak added a comment.
In D147940#4350512 <https://reviews.llvm.org/D147940#4350512>, @jsjodin wrote:
> Is there a way we can create a MLIR->LLVM IR test with a target region and use the --offload-device-only flag to check that we get the device function generated? It would be nice to have.
I just added a unit test to look at the translation from MLIR to LLVM IR of a target region for the device. It doesn't use the --offload-device-only flag, but I think that might be redundant, since that is a driver-only flag. In flang/test/Driver/omp-driver-offload.f90 there is a test that makes sure that, if that option is set, the proper triples for the offloading invocation are added. The new test I just added makes sure that the device function is generated from MLIR if `omp.is_device` is set and there's an OpenMP target region, and there are other tests making sure that `omp.is_device` and `omp.target` are generated in the proper cases. So I think the whole flow involving that command line option and code generation for the device function is tested already.
If this is something that you still think we should have, let me know.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147940/new/
https://reviews.llvm.org/D147940
More information about the llvm-commits
mailing list