[llvm-bugs] [Bug 43156] New: OpenMP offload using CUDA-10.1: Instruction 'vote' without '.sync' is not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 28 15:52:32 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43156

            Bug ID: 43156
           Summary: OpenMP offload using CUDA-10.1: Instruction 'vote'
                    without '.sync' is not supported
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: csdaley at lbl.gov
                CC: llvm-bugs at lists.llvm.org

Hello all,

I get the error
ptxas /tmp/copykernel-9bb501.s, line 2611; error   : Instruction 'vote' without
'.sync' is not supported on .target sm_70 and higher from PTX ISA version 6.4
ptxas fatal   : Ptx assembly aborted due to errors
clang-10: error: ptxas command failed with exit code 255 (use -v to see
invocation)

when using OpenMP target offload with CUDA >= 10.1. This error does not appear
when using CUDA-9.2 and is flagged as a warning when using CUDA-10.0. Is it
supported to use CUDA >= 10.0 with LLVM/Clang? Is it recommended to use
CUDA-9.2 with LLVM/Clang?


I have compiled the same function on an Intel Skylake + NVIDIA V100 system when
using different values of --cuda-path and show the results below:

> for cuda in 9.2.148 10.0.130 10.1.105 10.1.168 10.1.243; do echo "Testing cuda-${cuda}"; clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda --cuda-path=/usr/common/software/cuda/${cuda} copykernel.c -c && echo "SUCCESS"; echo; done
Testing cuda-9.2.148
SUCCESS

Testing cuda-10.0.130
ptxas /tmp/copykernel-65598e.s, line 2611; warning : Instruction 'vote' without
'.sync' may produce unpredictable results on sm_70 and later architectures
ptxas /tmp/copykernel-65598e.s, line 2611; warning : Instruction 'vote' without
'.sync' is deprecated since PTX ISA version 6.0 and will be discontinued in a
future PTX ISA version
SUCCESS

Testing cuda-10.1.105
ptxas /tmp/copykernel-9bb501.s, line 2611; error   : Instruction 'vote' without
'.sync' is not supported on .target sm_70 and higher from PTX ISA version 6.4
ptxas fatal   : Ptx assembly aborted due to errors
clang-10: error: ptxas command failed with exit code 255 (use -v to see
invocation)

Testing cuda-10.1.168
ptxas /tmp/copykernel-0c2890.s, line 2611; error   : Instruction 'vote' without
'.sync' is not supported on .target sm_70 and higher from PTX ISA version 6.4
ptxas fatal   : Ptx assembly aborted due to errors
clang-10: error: ptxas command failed with exit code 255 (use -v to see
invocation)

Testing cuda-10.1.243
ptxas /tmp/copykernel-a5c2e8.s, line 2611; error   : Instruction 'vote' without
'.sync' is not supported on .target sm_70 and higher from PTX ISA version 6.4
ptxas fatal   : Ptx assembly aborted due to errors
clang-10: error: ptxas command failed with exit code 255 (use -v to see
invocation)


> cat copykernel.c
#include <stdio.h>
#include <stdlib.h>

#define NX 4096
#define NY 4096
#define STREAM_ARRAY_SIZE (NX * NY)
#define TILE_DIM 32

#define GIDX(i,j) (((i)*(NX))+(j))
#define SIDX(i,j) (((i)*(TILE_DIM))+(j))

void copySM(double* out,
            const double* in)
{
  ssize_t xtile, ytile, xg, yg, xs, ys;

# pragma omp target
# pragma omp teams distribute collapse(2)
  for (xtile = 0; xtile < NX; xtile += TILE_DIM) {
    for (ytile = 0; ytile < NY; ytile += TILE_DIM) {
      double sm[TILE_DIM * TILE_DIM];
# pragma omp parallel for collapse(2) private(xg,yg)
      for (xs = 0; xs < TILE_DIM; ++xs) {
        for (ys = 0; ys < TILE_DIM; ++ys) {
          xg = xs + xtile;
          yg = ys + ytile;
          sm[SIDX(xs,ys)] = in[GIDX(xg,yg)];
        }
      } /* Implicit barrier here */
# pragma omp parallel for collapse(2) private(xg,yg)
      for (xs = 0; xs < TILE_DIM; ++xs) {
        for (ys = 0; ys < TILE_DIM; ++ys) {
          xg = xs + xtile;
          yg = ys + ytile;
          out[GIDX(xg,yg)] = sm[SIDX(xs,ys)];
        }
      }
    }
  }
}


I am using the latest version of LLVM/Clang
> clang -v
clang version 10.0.0 (https://github.com/llvm-mirror/clang
ab7432452dd9121677d3c9cdccd67fb9b624ba07) (https://github.com/llvm-mirror/llvm
7bcf44ee14947ad934d2d0702b80beffeb1dc05d)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/project/projectdirs/m1759/csdaley/software/cgpu/llvm/9.0.0-git_20190828/bin
Found candidate GCC installation:
/opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0
Selected GCC installation: /opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /global/common/cori_cle7/software/cuda/10.1.168,
version 10.1


Thanks,
Chris

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190828/f319db5a/attachment.html>


More information about the llvm-bugs mailing list