[Openmp-commits] [PATCH] D82718: [OpenMP] Use primary context in CUDA plugin
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 6 21:02:00 PDT 2020
ye-luo marked an inline comment as done.
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:420
+ unsigned int FormerPrimaryCtxFlags;
+ int FormerPrimaryCtxIsActive;
+ Err = cuDevicePrimaryCtxGetState(Device, &FormerPrimaryCtxFlags,
----------------
jdoerfert wrote:
> We should initialize these, I never trust runtime calls to do that for some reason.
Apart from trusting the runtime calls, I don't see any fallback/default value makes sense. There are no "unknown" flags mentioned in the documentation. We do check returned status of these runtime calls. It should be safe.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82718/new/
https://reviews.llvm.org/D82718
More information about the Openmp-commits
mailing list