Issue 1:
Hi, I met the following error when building from source. Does anyone have the same issue?

Issue description

aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope

System Info

PyTorch or Caffe2: PyTorch

How you installed PyTorch (conda, pip, source): source

Build command you used (if compiling from source): python3 setup.py build

OS: Ubuntu 16.04

PyTorch version: 372d1d6

Python version: 3.5.2

CUDA/cuDNN version: N/A

GPU models and configuration: N/A

GCC version (if compiling from source): 5.4

CMake version: 3.11.0

Versions of any other relevant libraries:

[ 74%] Building CXX object caffe2/CMakeFiles/caffe2.dir//aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o

In file included from /home/xxx/Project/svn-store/PyTorch/pytorch-git/build/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp:5:0:

/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]’:

/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope

vms##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT);

^

/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’

IMPLEMENT_FLOAT_MKL_VML(log2, Log2)

^

/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]’:

/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:72:76: error: ‘vmdLog2’ was not declared in this scope

vmd##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT);

^

/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’

IMPLEMENT_FLOAT_MKL_VML(log2, Log2)

^

In file included from /home/xxx/Project/svn-store/PyTorch/pytorch-git/build/aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp:5:0:

/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]’:

/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope

vms##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT);

^

/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’

IMPLEMENT_FLOAT_MKL_VML(log2, Log2)

^

/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]’:

/home/xxx/Project/svn-store/PyTorch/pytorch-git/aten/src/ATen/cpu/vml.h:72:76: error: ‘vmdLog2’ was not declared in this scope

vmd##mklop(size, in, out, VML_HA | VML_FTZDAZ_OFF | VML_ERRMODE_DEFAULT);

^

/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’

IMPLEMENT_FLOAT_MKL_VML(log2, Log2)

^

At global scope:

cc1plus: warning: unrecognized command line option ‘-Wno-aligned-allocation-unavailable’

cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’

cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’

cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’

cc1plus: warning: unrecognized command line option ‘-Wno-typedef-redefinition’

cc1plus: warning: unrecognized command line option ‘-Wno-invalid-partial-specialization’

caffe2/CMakeFiles/caffe2.dir/build.make:2163: recipe for target 'caffe2/CMakeFiles/caffe2.dir//aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp.o' failed

make[2]: *** [caffe2/CMakeFiles/caffe2.dir//aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX.cpp.o] Error 1

make[2]: *** Waiting for unfinished jobs....

At global scope:

cc1plus: warning: unrecognized command line option ‘-Wno-aligned-allocation-unavailable’

cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’

cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’

cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’

cc1plus: warning: unrecognized command line option ‘-Wno-typedef-redefinition’

cc1plus: warning: unrecognized command line option ‘-Wno-invalid-partial-specialization’

caffe2/CMakeFiles/caffe2.dir/build.make:2124: recipe for target 'caffe2/CMakeFiles/caffe2.dir//aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o' failed

make[2]: *** [caffe2/CMakeFiles/caffe2.dir//aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.AVX2.cpp.o] Error 1

^Ccaffe2/CMakeFiles/caffe2.dir/build.make:1916: recipe for target 'caffe2/CMakeFiles/caffe2.dir//aten/src/TH/THTensor.cpp.o' failed

make[2]: *** [caffe2/CMakeFiles/caffe2.dir/__/aten/src/TH/THTensor.cpp.o] Interrupt

CMakeFiles/Makefile2:901: recipe for target 'caffe2/CMakeFiles/caffe2.dir/all' failed

make[1]: *** [caffe2/CMakeFiles/caffe2.dir/all] Interrupt

Makefile:140: recipe for target 'all' failed

make: *** [all] Interrupt

Issue 2:
I tried to rebase and rebuild torch from source today, but got an error:

../aten/src/ATen/cpu/vml.h:68:76: error: ‘vmsLog2’ was not declared in this scope

See full gist.

For future reference, getting rid of old mkl install in /opt/intel and updating mkl via conda seems to have solved the issue.

cc @soumith @cpuhrsch