[Openmp-commits] [PATCH] D106460: [OpenMP] Add new execution mode for SPMD execution with Generic semantics

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 22 06:25:31 PDT 2021


jhuber6 added a comment.

In D106460#2895470 <https://reviews.llvm.org/D106460#2895470>, @ye-luo wrote:

> Please fix the warning
>
> /home/ci/ecp/working/jlselogin3/batch-03/intel-dga/automatedtests/yeluo/test_llvm/builds/users/yeluo/NFStdQBJ/0/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/openmp/libomptarget/plugins/cuda/src/rtl.cpp:1064:20: warning: variable 'CudaBlocksPerGrid' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>
>   } else if (KernelInfo->ExecutionMode == SPMD_GENERIC) {
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> /home/ci/ecp/working/jlselogin3/batch-03/intel-dga/automatedtests/yeluo/test_llvm/builds/users/yeluo/NFStdQBJ/0/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/openmp/libomptarget/plugins/cuda/src/rtl.cpp:1101:44: note: uninitialized use occurs here
>
>   Err = cuLaunchKernel(KernelInfo->Func, CudaBlocksPerGrid, /* gridDimY */ 1,
>                                          ^~~~~~~~~~~~~~~~~
>
> /home/ci/ecp/working/jlselogin3/batch-03/intel-dga/automatedtests/yeluo/test_llvm/builds/users/yeluo/NFStdQBJ/0/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/openmp/libomptarget/plugins/cuda/src/rtl.cpp:1064:16: note: remove the 'if' if its condition is always true
>
>   } else if (KernelInfo->ExecutionMode == SPMD_GENERIC) {
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> /home/ci/ecp/working/jlselogin3/batch-03/intel-dga/automatedtests/yeluo/test_llvm/builds/users/yeluo/NFStdQBJ/0/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/openmp/libomptarget/plugins/cuda/src/rtl.cpp:1041:35: note: initialize the variable 'CudaBlocksPerGrid' to silence this warning
>
>   unsigned int CudaBlocksPerGrid;
>                                 ^
>                                  = 0
>
> 1 warning generated.

rGa158d3663fc5 <https://reviews.llvm.org/rGa158d3663fc5b3596eaac7da857e7422d12b243e>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106460



More information about the Openmp-commits mailing list