[Openmp-commits] [PATCH] D109304: [OpenMP][libomptarget] Add __tgt_target_return_t enum for __tgt_target_XXX return int

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 6 18:50:16 PDT 2021


ye-luo added a comment.

In my understanding of the return of `__tgt_target_mapper` `__tgt_target_teams_mapper`, when offload is disabled via environment variable, there are early returns to return OMP_TGT_FAIL. When actually offload to target device happens, handleTargetOutcome aborts if rc != OFFLOAD_SUCCESS, thus return value is always OMP_TGT_SUCCESS although `return rc` seems like being able to return OFFLOAD_FAIL.

OMP_TGT_FAIL is recoverable and the host fallback runs.
OFFLOAD_FAIL is generally unrecoverable and should be stopped by handleTargetOutcome.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109304/new/

https://reviews.llvm.org/D109304



More information about the Openmp-commits mailing list