[Openmp-commits] [PATCH] D130371: [Libomptarget] Don't report lack of CUDA devices

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 8 07:38:07 PDT 2022


ye-luo added a comment.

In D130371#3706544 <https://reviews.llvm.org/D130371#3706544>, @jdenny wrote:

> In D130371#3700740 <https://reviews.llvm.org/D130371#3700740>, @ye-luo wrote:
>
>> I guess you machine has the nvidia driver installed but there is no GPU.
>
> On my laptop, I saw the problem when I just disabled the (discrete) nvidia gpu in favor of integrated graphics... or when I set CUDA_VISIBLE_DEVICES to the empty string.
>
> The machine that originally motivated this change has cuda installed but not the nvidia driver.  This patch helped that case too.  However, that machine also experienced other strange behavior I don't have any more time right now to pursue, and I ultimately recommended -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=False to get around it.  (I would have reported the behavior upstream, but it might be specific to Clacc.)  Anyway, my point is that I'm not sure yet that things always work right with a disabled nvidia driver.

Thanks for the info. With your patch
clang++ -fopenmp --offload-arch=sm_80,gfx906 main.cpp
CUDA_VISIBLE_DEVICES="" ./a.out # runs fine on the AMD GPU.
so it is good.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130371



More information about the Openmp-commits mailing list