<p dir="auto">Hi, I met the following error when building from source. Does anyone have the same issue?</p>
<h2 dir="auto">Issue description</h2>
<p dir="auto">aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope</p>
<h2 dir="auto">System Info</h2>
<ul dir="auto">
<li>PyTorch or Caffe2: PyTorch</li>
<li>How you installed PyTorch (conda, pip, source): source</li>
<li>Build command you used (if compiling from source): python3 setup.py build</li>
<li>OS: Ubuntu 16.04</li>
<li>PyTorch version: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/372d1d67356f054db64bdfb4787871ecdbbcbe0b/hovercard" href="https://github.com/pytorch/pytorch/commit/372d1d67356f054db64bdfb4787871ecdbbcbe0b"><tt>372d1d6</tt></a></li>
<li>Python version: 3.5.2</li>
<li>CUDA/cuDNN version: N/A</li>
<li>GPU models and configuration: N/A</li>
<li>GCC version (if compiling from source): 5.4</li>
<li>CMake version: 3.11.0</li>
<li>Versions of any other relevant libraries:</li>
</ul>
<blockquote>
<p dir="auto">[ 74%] Building CXX object caffe2/CMakeFiles/caffe2.dir/<strong>/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o<br>
In file included from /home/xxx/Project/svn-store/PyTorch/pytorch-git/build/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp:5:0:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h: In function ‘void at::vml::{anonymous}::vlog2(scalar_t*, scalar_t*, int64_t) [with scalar_t = float; int64_t = long int]’:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope<br>
vms##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT); <br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:87:1: note: in expansion of macro ‘IMPLEMENT_FLOAT_MKL_VML’<br>
IMPLEMENT_FLOAT_MKL_VML(log2, Log2)<br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h: In function ‘void at::vml::{anonymous}::vlog2(scalar_t*, scalar_t*, int64_t) [with scalar_t = double; int64_t = long int]’:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:72:76: error: ‘vmdLog2’ was not declared in this scope<br>
vmd##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT); <br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:87:1: note: in expansion of macro ‘IMPLEMENT_FLOAT_MKL_VML’<br>
IMPLEMENT_FLOAT_MKL_VML(log2, Log2)<br>
^<br>
In file included from /home/xxx/Project/svn-store/PyTorch/pytorch-git/build/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp:5:0:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h: In function ‘void at::vml::{anonymous}::vlog2(scalar_t*, scalar_t*, int64_t) [with scalar_t = float; int64_t = long int]’:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope<br>
vms##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT); <br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:87:1: note: in expansion of macro ‘IMPLEMENT_FLOAT_MKL_VML’<br>
IMPLEMENT_FLOAT_MKL_VML(log2, Log2)<br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h: In function ‘void at::vml::{anonymous}::vlog2(scalar_t*, scalar_t*, int64_t) [with scalar_t = double; int64_t = long int]’:<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:72:76: error: ‘vmdLog2’ was not declared in this scope<br>
vmd##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT); <br>
^<br>
/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:87:1: note: in expansion of macro ‘IMPLEMENT_FLOAT_MKL_VML’<br>
IMPLEMENT_FLOAT_MKL_VML(log2, Log2)<br>
^<br>
At global scope:<br>
cc1plus: warning: unrecognized command line option ‘-Wno-aligned-allocation-unavailable’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-typedef-redefinition’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-invalid-partial-specialization’<br>
caffe2/CMakeFiles/caffe2.dir/build.make:2163: recipe for target 'caffe2/CMakeFiles/caffe2.dir/</strong>/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp.o' failed<br>
make[2]: *** [caffe2/CMakeFiles/caffe2.dir/<strong>/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp.o] Error 1<br>
make[2]: *** Waiting for unfinished jobs....<br>
At global scope:<br>
cc1plus: warning: unrecognized command line option ‘-Wno-aligned-allocation-unavailable’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-typedef-redefinition’<br>
cc1plus: warning: unrecognized command line option ‘-Wno-invalid-partial-specialization’<br>
caffe2/CMakeFiles/caffe2.dir/build.make:2124: recipe for target 'caffe2/CMakeFiles/caffe2.dir/</strong>/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o' failed<br>
make[2]: *** [caffe2/CMakeFiles/caffe2.dir/<strong>/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o] Error 1<br>
^Ccaffe2/CMakeFiles/caffe2.dir/build.make:1916: recipe for target 'caffe2/CMakeFiles/caffe2.dir/</strong>/aten/src/TH/THTensor.cpp.o' failed<br>
make[2]: *** [caffe2/CMakeFiles/caffe2.dir/__/aten/src/TH/THTensor.cpp.o] Interrupt<br>
CMakeFiles/Makefile2:901: recipe for target 'caffe2/CMakeFiles/caffe2.dir/all' failed<br>
make[1]: *** [caffe2/CMakeFiles/caffe2.dir/all] Interrupt<br>
Makefile:140: recipe for target 'all' failed<br>
make: *** [all] Interrupt</p>
</blockquote>
<p dir="auto">I tried to rebase and rebuild torch from source today, but got an error:<br>
<code class="notranslate">../aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope</code></p>
<p dir="auto">See <a href="https://gist.github.com/elanmart/8fca075c596378bd785abd8079567684">full gist</a>.</p>
<p dir="auto">For future reference, getting rid of old <code class="notranslate">mkl</code> install in <code class="notranslate">/opt/intel</code> and updating <code class="notranslate">mkl</code> via <code class="notranslate">conda</code> seems to have solved the issue.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/soumith/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/soumith">@soumith</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cpuhrsch/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cpuhrsch">@cpuhrsch</a></p>