<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - OpenMP offload using CUDA-10.1: Instruction 'vote' without '.sync' is not supported"
href="https://bugs.llvm.org/show_bug.cgi?id=43156">43156</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>OpenMP offload using CUDA-10.1: Instruction 'vote' without '.sync' is not supported
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Clang Compiler Support
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>csdaley@lbl.gov
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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:
<span class="quote">> 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</span >
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)
<span class="quote">> cat copykernel.c</span >
#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
<span class="quote">> clang -v</span >
clang version 10.0.0 (<a href="https://github.com/llvm-mirror/clang">https://github.com/llvm-mirror/clang</a>
ab7432452dd9121677d3c9cdccd67fb9b624ba07) (<a href="https://github.com/llvm-mirror/llvm">https://github.com/llvm-mirror/llvm</a>
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>