[Openmp-commits] [PATCH] D82718: [OpenMP] Use primary context in CUDA plugin

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 2 10:17:24 PDT 2020


ye-luo marked an inline comment as done.
ye-luo added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:428
+      DP("The primary context is active, no change to its flags\n");
+      if (FormerPrimaryCtxFlags != CU_CTX_SCHED_BLOCKING_SYNC)
+        DP("Warning the current flags are not CU_CTX_SCHED_BLOCKING_SYNC\n");
----------------
protze.joachim wrote:
> I think, it should be
> ```
> if (! (FormerPrimaryCtxFlags & CU_CTX_SCHED_BLOCKING_SYNC))
> 
> ```
> or
> ```
> if ((FormerPrimaryCtxFlags & CU_CTX_SCHED_MASK) != CU_CTX_SCHED_BLOCKING_SYNC)
> 
> ```
> They might be equivalent, if only one scheduling policy can be set at a time.
I adopted CU_CTX_SCHED_MASK. So far only one flag is allowed but we never know the future.


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

https://reviews.llvm.org/D82718





More information about the Openmp-commits mailing list