[Openmp-commits] [PATCH] D50522: [OpenMP][libomptarget] Bringing up to spec with respect to OMP_TARGET_OFFLOAD env var

Alexandre Eichenberger via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 9 11:54:45 PDT 2018


AlexEichenberger added a comment.

In https://reviews.llvm.org/D50522#1194100, @Hahnfeld wrote:

> Does this patch supersede https://reviews.llvm.org/D44522?


yes

> As discussed in there I don't see that `DEFAULT` means `MANDATORY` only iff there was a successful offload. From TR7, page 610, lines 17/18:
> 
>> The DEFAULT value specifies that when one or more target devices are available, the runtime
>>  behaves as if this environment variable is set to MANDATORY [...]

The question is how we define "available." IMO, it means success of first command. Happy to reconsider, I think most of our users are fine with success of first command

> Another remark from https://reviews.llvm.org/D44522: I think we need to handle API methods as well.

I am all for using the suggested __kmpc_get_target_offload function, which is implemented. If we do so, we will be depending on a definition in kmp.h. Do we want a redundant definition of the

enum kmp_target_offload_kind {

  tgt_disabled = 0,
  tgt_default = 1,
  tgt_mandatory = 2

};

I assume we want to do that, as we don't want to include kmp.h in libomptarget.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D50522





More information about the Openmp-commits mailing list