<p dir="auto">Hello,</p>
<p dir="auto">Compiling tensorflow source on Skylake-X Intel i9 with "--config=opt" gives the following error in the snappy external module:</p>
<hr>
<blockquote>
<p dir="auto">ERROR: /home/armafire/.cache/bazel/<em>bazel_armafire/efbef35334c587b69e16a82829bb0e2d/external/snappy/BUILD:19:1: C++ compilation of rule '@snappy//:snappy' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command<br>
(cd /home/armafire/.cache/bazel/<em>bazel_armafire/efbef35334c587b69e16a82829bb0e2d/execroot/org_tensorflow &amp;&amp; <br>
exec env - <br>
CUDA_TOOLKIT_PATH=/usr/local/cuda <br>
CUDNN_INSTALL_PATH=/usr/local/cuda-8.0 <br>
GCC_HOST_COMPILER_PATH=/usr/bin/gcc <br>
PWD=/proc/self/cwd <br>
PYTHON_BIN_PATH=/usr/bin/python <br>
PYTHON_LIB_PATH=/usr/local/lib/python2.7/dist-packages <br>
TF_CUDA_CLANG=0 <br>
TF_CUDA_COMPUTE_CAPABILITIES=6.1 <br>
TF_CUDA_VERSION=8.0 <br>
TF_CUDNN_VERSION=6 <br>
TF_NEED_CUDA=1 <br>
TF_NEED_OPENCL=0 <br>
external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-march=native' '-std=c++11' '-march=native' -MD -MF bazel-out/local_linux-opt/bin/external/snappy/<em>objs/snappy/external/snappy/snappy.pic.d '-frandom-seed=bazel-out/local_linux-opt/bin/external/snappy/<em>objs/snappy/external/snappy/snappy.pic.o' -fPIC -iquote external/snappy -iquote bazel-out/local_linux-opt/genfiles/external/snappy -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -Wno-shift-negative-value -Wno-implicit-function-declaration -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE</em></em>="redacted"' '-D__TIMESTAMP</em></em>="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/snappy/snappy.cc -o bazel-out/local_linux-opt/bin/external/snappy/<em>objs/snappy/external/snappy/snappy.pic.o)<br>
cc1plus: warning: command line option '-Wno-implicit-function-declaration' is valid for C/ObjC but not for C++<br>
external/snappy/snappy.cc: In member function 'void snappy::SnappySinkAllocator::Flush(size_t)':<br>
external/snappy/snappy.cc:1403:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]<br>
for (int i = 0; i &lt; blocks</em>.size(); ++i) {<br>
~~^~~~~~~~~~~~~~~~<br>
In file included from external/snappy/snappy-internal.h:34:0,<br>
from external/snappy/snappy.cc:30:<br>
external/snappy/snappy.cc: In instantiation of 'bool snappy::SnappyScatteredWriter::AppendFromSelf(size_t, size_t) [with Allocator = snappy::SnappySinkAllocator; size_t = long unsigned int]':<br>
external/snappy/snappy.cc:715:13:   required from 'void snappy::SnappyDecompressor::DecompressAllTags(Writer*) [with Writer = snappy::SnappyScatteredWritersnappy::SnappySinkAllocator]'<br>
external/snappy/snappy.cc:799:3:   required from 'bool snappy::InternalUncompressAllTags(snappy::SnappyDecompressor*, Writer*, snappy::uint32) [with Writer = snappy::SnappyScatteredWritersnappy::SnappySinkAllocator; snappy::uint32 = unsigned int]'<br>
external/snappy/snappy.cc:1460:78:   required from here<br>
external/snappy/snappy.cc:1316:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]<br>
if (PREDICT_TRUE(offset - 1u &lt; op_ptr_ - op_base_ &amp;&amp; op_end &lt;= op_limit_)) {<br>
~~~~~~~~~~~~^~~~~~~~~~~~~<br>
external/snappy/snappy-stubs-internal.h:80:25: note: in definition of macro 'PREDICT_TRUE'<br>
#define PREDICT_TRUE(x) x<br>
^<br>
/tmp/ccxBWytY.s: Assembler messages:<br>
<strong><em>/tmp/ccxBWytY.s:389: Error: no such instruction: <code class="notranslate">kmovq %rdx,%k3' /tmp/ccxBWytY.s:391: Error: no such instruction: </code>kshiftrq $32,%k3,%k2'<br>
/tmp/ccxBWytY.s:394: Error: no such instruction: <code class="notranslate">kmovq %k2,%rdx' /tmp/ccxBWytY.s:600: Error: no such instruction: </code>kmovq %rsi,%k1'<br>
/tmp/ccxBWytY.s:602: Error: no such instruction: <code class="notranslate">kshiftrq $32,%k1,%k0' /tmp/ccxBWytY.s:605: Error: no such instruction: </code>kmovq %k0,%rsi'</em></strong><br>
Target //tensorflow/tools/pip_package:build_pip_package failed to build<br>
INFO: Elapsed time: 34.595s, Critical Path: 14.66s<br>
FAILED: Build did NOT complete successfully</p>
</blockquote>
<hr>
<p dir="auto">The command I use is:</p>
<p dir="auto">bazel build --config=opt -c opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures -j 64</p>
<p dir="auto">If I change to --config=mkl, then it compiles fine. Therefore, it seems that the problem is "--march=native" (generated by "--config=opt"), which forces the snappy module to generate AVX512, however, the generated assembly is not correct for Skylake-X Intel i9 (which supports AVX512). I tried "--march=skylake-avx512" and all other AVX512 options like "-mavx512f" and similar, and all result in the same error.</p>
<p dir="auto">My goal is to compile tensorflow with Eigen AVX512. Any ideas how this can be done?</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: no</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Linux Ubuntu 16.04</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: building from source</li>
<li><strong>TensorFlow version (use command below)</strong>:  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/5ae244ed0b702e50fd6bb7bc73d45b9188c4239d/hovercard" href="https://github.com/tensorflow/tensorflow/commit/5ae244ed0b702e50fd6bb7bc73d45b9188c4239d"><tt>5ae244e</tt></a></li>
<li><strong>Bazel version (if compiling from source)</strong>:  0.4.5</li>
<li><strong>CUDA/cuDNN version</strong>: CUDA 8.0.61, cudnn 6.0.21 (tried also 5.1)</li>
<li><strong>GPU model and memory</strong>: 2x Tesla P100-PCIE-12GB</li>
<li><strong>Exact command to reproduce</strong>: building</li>
<li><strong>Additional information</strong>: Intel(R) Xeon(R) CPU E7-4860 v2 @ 2.60GHz, gcc version 5.4.1 20170519 (Ubuntu 5.4.1-11ubuntu2~16.04)</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">On the regular rebuild of Tensorflow, the build crashes with bunch of <code class="notranslate">error: argument of type "const void *" is incompatible with parameter of type "const something *"</code></p>
<h3 dir="auto">Source code / logs</h3>
<p dir="auto">Crash log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INFO: From Compiling tensorflow/core/kernels/scatter_functor_gpu.cu.cc:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9218): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9229): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9242): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9253): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9266): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9277): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9290): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9301): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9314): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9325): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9338): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9350): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9363): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9374): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9387): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9399): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9408): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9417): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9426): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9435): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9443): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9452): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9461): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9470): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9479): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9488): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9497): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9506): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9515): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9524): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9533): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9542): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(54): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(62): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(70): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(78): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(86): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(95): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(104): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(112): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(120): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(129): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(138): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(146): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10223): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10235): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10247): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10259): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10271): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10283): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10295): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10307): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10319): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10331): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10343): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10355): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10367): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10379): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10391): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10403): error: argument of type &quot;const void *&quot; is incompatible with parameter of type &quot;const long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10413): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10424): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10433): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10444): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10453): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10464): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10473): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10484): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10493): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10504): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10513): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10524): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;float *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10533): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10544): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10553): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10564): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;double *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10573): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10584): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10593): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10604): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10613): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10624): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10633): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10644): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10653): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10664): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10673): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10684): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;int *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10693): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10704): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10713): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10724): error: argument of type &quot;void *&quot; is incompatible with parameter of type &quot;long long *&quot;

92 errors detected in the compilation of &quot;/tmp/tmpxft_00008f12_00000000-7_scatter_functor_gpu.cu.cpp1.ii&quot;.
ERROR: /scratch/chaimb/tensorflow/tensorflow/core/kernels/BUILD:1140:1: output 'tensorflow/core/kernels/_objs/scatter_functor_gpu/tensorflow/core/kernels/scatter_functor_gpu.cu.pic.o' was not created.
ERROR: /scratch/chaimb/tensorflow/tensorflow/core/kernels/BUILD:1140:1: not all outputs were created or valid.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 147.888s, Critical Path: 69.54s"><pre class="notranslate"><code class="notranslate">INFO: From Compiling tensorflow/core/kernels/scatter_functor_gpu.cu.cc:
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9218): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9229): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9242): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9253): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9266): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9277): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9290): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9301): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9314): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9325): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9338): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9350): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9363): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9374): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9387): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9399): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9408): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9417): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9426): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9435): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9443): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9452): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9461): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9470): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9479): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9488): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9497): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9506): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9515): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9524): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9533): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9542): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(54): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(62): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(70): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(78): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(86): error: argument of type "void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(95): error: argument of type "void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(104): error: argument of type "void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(112): error: argument of type "void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(120): error: argument of type "void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(129): error: argument of type "void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(138): error: argument of type "void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512pfintrin.h(146): error: argument of type "void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10223): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10235): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10247): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10259): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10271): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10283): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10295): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10307): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10319): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10331): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10343): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10355): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10367): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10379): error: argument of type "const void *" is incompatible with parameter of type "const int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10391): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10403): error: argument of type "const void *" is incompatible with parameter of type "const long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10413): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10424): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10433): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10444): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10453): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10464): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10473): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10484): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10493): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10504): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10513): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10524): error: argument of type "void *" is incompatible with parameter of type "float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10533): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10544): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10553): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10564): error: argument of type "void *" is incompatible with parameter of type "double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10573): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10584): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10593): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10604): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10613): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10624): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10633): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10644): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10653): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10664): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10673): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10684): error: argument of type "void *" is incompatible with parameter of type "int *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10693): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10704): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10713): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(10724): error: argument of type "void *" is incompatible with parameter of type "long long *"

92 errors detected in the compilation of "/tmp/tmpxft_00008f12_00000000-7_scatter_functor_gpu.cu.cpp1.ii".
ERROR: /scratch/chaimb/tensorflow/tensorflow/core/kernels/BUILD:1140:1: output 'tensorflow/core/kernels/_objs/scatter_functor_gpu/tensorflow/core/kernels/scatter_functor_gpu.cu.pic.o' was not created.
ERROR: /scratch/chaimb/tensorflow/tensorflow/core/kernels/BUILD:1140:1: not all outputs were created or valid.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 147.888s, Critical Path: 69.54s
</code></pre></div>
<p dir="auto">I've tried disabling most of the options (MKL, architecture optimizations, computability) but the crash happens even with full-default (except CUDA and XLA) configuration.</p>