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

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 21 21:32:36 PDT 2021


ye-luo added a comment.

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.


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