Oh, a good answer, I tried to comiple from master. by if  get a error
../libATen.so.1: undefined reference to `std::runtime_error::runtime_error(char const*)'
collect2: error: ld returned 1 exit status
src/ATen/test/CMakeFiles/scalar_tensor_test.dir/build.make:117: recipe for target 'src/ATen/test/scalar_tensor_test' failed
make[2]: *** [src/ATen/test/scalar_tensor_test] Error 1
CMakeFiles/Makefile2:375: recipe for target 'src/ATen/test/CMakeFiles/scalar_tensor_test.dir/all' failed
make[1]: *** [src/ATen/test/CMakeFiles/scalar_tensor_test.dir/all] Error 2
../libATen.so.1: undefined reference to `std::runtime_error::runtime_error(char const*)'
collect2: error: ld returned 1 exit status
src/ATen/test/CMakeFiles/basic.dir/build.make:117: recipe for target 'src/ATen/test/basic' failed
make[2]: *** [src/ATen/test/basic] Error 1
CMakeFiles/Makefile2:338: recipe for target 'src/ATen/test/CMakeFiles/basic.dir/all' failed
make[1]: *** [src/ATen/test/CMakeFiles/basic.dir/all] Error 2
../libATen.so.1: undefined reference to `std::runtime_error::runtime_error(char const*)'
collect2: error: ld returned 1 exit status
src/ATen/test/CMakeFiles/scalar_test.dir/build.make:117: recipe for target 'src/ATen/test/scalar_test' failed
make[2]: *** [src/ATen/test/scalar_test] Error 1
CMakeFiles/Makefile2:264: recipe for target 'src/ATen/test/CMakeFiles/scalar_test.dir/all' failed
make[1]: *** [src/ATen/test/CMakeFiles/scalar_test.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I compiled code on Ubuntu16.04 and g++ 5.4, gcc 5.4 cmake 3.6 following the instructions here 3