<h3 dir="auto">Solved 🎉</h3>
<p dir="auto">Starting from <a href="https://github.com/pytorch/pytorch/releases/tag/v1.10.0">v1.10.0</a>, <code class="notranslate">torch.nn.CrossEntropy()</code>has an arg <code class="notranslate">label_smoothing=0.0</code> - <a href="https://pytorch.org/docs/1.10/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss" rel="nofollow">API link</a>.</p>
<hr>
<p dir="auto">Hi, guys. The type <code class="notranslate">torch.LongTensor</code> of target will hinder the implementation like some methods in <a href="https://arxiv.org/abs/1512.00567" rel="nofollow">reference</a>. So is there a possible to add a <code class="notranslate">Arg: label_smoothing</code> for <code class="notranslate">torch.nn.CrossEntropyLoss()</code>, or maybe simply add the docs to show how to convert the <code class="notranslate">target</code> into <code class="notranslate">one-hot vector</code> to work with <code class="notranslate">torch.nn.CrossEntropyLoss()</code> together, or any other simple ways? Thanks.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bdhirsh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bdhirsh">@bdhirsh</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/albanD/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/albanD">@albanD</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mruberry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mruberry">@mruberry</a></p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">building from source fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Building wheel torch-1.1.0a0+f5165ad
-- Building version 1.1.0a0+f5165ad
['cmake',
 '-DBUILDING_WITH_TORCH_LIBS=ON',
 '-DBUILD_BINARY=False',
 '-DBUILD_CAFFE2_OPS=True',
 '-DBUILD_PYTHON=True',
 '-DBUILD_SHARED_LIBS=ON',
 '-DBUILD_TEST=True',
 '-DBUILD_TORCH=ON',
 '-DCAFFE2_STATIC_LINK_CUDA=False',
 '-DCMAKE_BUILD_TYPE=Release',
 '-DCMAKE_CXX_FLAGS= ',
 '-DCMAKE_C_FLAGS= ',
 '-DCMAKE_EXE_LINKER_FLAGS=',
 '-DCMAKE_INSTALL_PREFIX=/home/msl/isaac/pytorch/torch',
 '-DCMAKE_PREFIX_PATH=/home/msl/anaconda3/envs/pytorch',
 '-DCMAKE_SHARED_LINKER_FLAGS=',
 '-DINSTALL_TEST=True',
 '-DNCCL_EXTERNAL=True',
 '-DNUMPY_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/lib/python3.6/site-packages/numpy/core/include',
 '-DONNX_ML=False',
 '-DONNX_NAMESPACE=onnx_torch',
 '-DPYTHON_EXECUTABLE=/home/msl/anaconda3/envs/pytorch/bin/python',
 '-DPYTHON_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/include/python3.6m',
 '-DPYTHON_LIBRARY=/home/msl/anaconda3/envs/pytorch/lib/libpython3.6m.so.1.0',
 '-DTHD_SO_VERSION=1',
 '-DTORCH_BUILD_VERSION=1.1.0a0+f5165ad',
 '-DUSE_CUDA=True',
 '-DUSE_DISTRIBUTED=True',
 '-DUSE_FBGEMM=True',
 '-DUSE_FFMPEG=False',
 '-DUSE_LEVELDB=False',
 '-DUSE_LMDB=False',
 '-DUSE_MKLDNN=True',
 '-DUSE_NCCL=True',
 '-DUSE_NNPACK=True',
 '-DUSE_NUMPY=True',
 '-DUSE_OPENCV=False',
 '-DUSE_QNNPACK=True',
 '-DUSE_ROCM=False',
 '-DUSE_SYSTEM_EIGEN_INSTALL=OFF',
 '-DUSE_SYSTEM_NCCL=False',
 '-DUSE_TENSORRT=False',
 '-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON',
 '/home/msl/isaac/pytorch']
-- The CXX compiler identification is GNU 5.3.0
-- The C compiler identification is GNU 5.3.0
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Success
-- Performing Test SUPPORT_GLIBCXX_USE_C99
-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
-- std::exception_ptr is supported.
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE - Failed
-- NUMA is not available
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Caffe2 protobuf include directory: $&lt;BUILD_INTERFACE:/home/msl/isaac/pytorch/third_party/protobuf/src&gt;$&lt;INSTALL_INTERFACE:include&gt;
-- Trying to find preferred BLAS backend of choice: MKL
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Looking for cblas_sgemm
-- Looking for cblas_sgemm - found
-- MKL libraries: /home/msl/anaconda3/envs/pytorch/lib/libmkl_intel_lp64.so;/home/msl/anaconda3/envs/pytorch/lib/libmkl_gnu_thread.so;/home/msl/anaconda3/envs/pytorch/lib/libmkl_core.so;-fopenmp;/usr/lib64/libpthread.so;/usr/lib64/libm.so;/usr/lib64/libdl.so
-- MKL include directory: /home/msl/anaconda3/envs/pytorch/include
-- MKL OpenMP type: GNU
-- MKL OpenMP library: -fopenmp
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/gcc
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Brace yourself, we are building NNPACK
-- Performing Test NNPACK_ARCH_IS_X86_32
-- Performing Test NNPACK_ARCH_IS_X86_32 - Failed
-- Found PythonInterp: /home/msl/anaconda3/envs/pytorch/bin/python (found version &quot;3.6.8&quot;)
-- NNPACK backend is x86-64
-- Failed to find LLVM FileCheck
-- Found Git: /usr/bin/git (found version &quot;1.8.3.1&quot;)
-- git Version: v1.4.0-505be96a
-- Version: 1.4.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- compiled but failed to run
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Error at third_party/benchmark/CMakeLists.txt:231 (message):
  Failed to determine the source files for the regular expression backend


-- Configuring incomplete, errors occurred!
See also &quot;/home/msl/isaac/pytorch/build/CMakeFiles/CMakeOutput.log&quot;.
See also &quot;/home/msl/isaac/pytorch/build/CMakeFiles/CMakeError.log&quot;.
Traceback (most recent call last):
  File &quot;setup.py&quot;, line 719, in &lt;module&gt;
    build_deps()
  File &quot;setup.py&quot;, line 285, in build_deps
    build_dir='build')
  File &quot;/home/msl/isaac/pytorch/tools/build_pytorch_libs.py&quot;, line 259, in build_caffe2
    my_env)
  File &quot;/home/msl/isaac/pytorch/tools/build_pytorch_libs.py&quot;, line 239, in run_cmake
    check_call(cmake_args, cwd=build_dir, env=my_env)
  File &quot;/home/msl/anaconda3/envs/pytorch/lib/python3.6/subprocess.py&quot;, line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DBUILDING_WITH_TORCH_LIBS=ON', '-DBUILD_BINARY=False', '-DBUILD_CAFFE2_OPS=True', '-DBUILD_PYTHON=True', '-DBUILD_SHARED_LIBS=ON', '-DBUILD_TEST=True', '-DBUILD_TORCH=ON', '-DCAFFE2_STATIC_LINK_CUDA=False', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_CXX_FLAGS= ', '-DCMAKE_C_FLAGS= ', '-DCMAKE_EXE_LINKER_FLAGS=', '-DCMAKE_INSTALL_PREFIX=/home/msl/isaac/pytorch/torch', '-DCMAKE_PREFIX_PATH=/home/msl/anaconda3/envs/pytorch', '-DCMAKE_SHARED_LINKER_FLAGS=', '-DINSTALL_TEST=True', '-DNCCL_EXTERNAL=True', '-DNUMPY_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/lib/python3.6/site-packages/numpy/core/include', '-DONNX_ML=False', '-DONNX_NAMESPACE=onnx_torch', '-DPYTHON_EXECUTABLE=/home/msl/anaconda3/envs/pytorch/bin/python', '-DPYTHON_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/include/python3.6m', '-DPYTHON_LIBRARY=/home/msl/anaconda3/envs/pytorch/lib/libpython3.6m.so.1.0', '-DTHD_SO_VERSION=1', '-DTORCH_BUILD_VERSION=1.1.0a0+f5165ad', '-DUSE_CUDA=True', '-DUSE_DISTRIBUTED=True', '-DUSE_FBGEMM=True', '-DUSE_FFMPEG=False', '-DUSE_LEVELDB=False', '-DUSE_LMDB=False', '-DUSE_MKLDNN=True', '-DUSE_NCCL=True', '-DUSE_NNPACK=True', '-DUSE_NUMPY=True', '-DUSE_OPENCV=False', '-DUSE_QNNPACK=True', '-DUSE_ROCM=False', '-DUSE_SYSTEM_EIGEN_INSTALL=OFF', '-DUSE_SYSTEM_NCCL=False', '-DUSE_TENSORRT=False', '-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON', '/home/msl/isaac/pytorch']' returned non-zero exit status 1."><pre class="notranslate"><code class="notranslate">Building wheel torch-1.1.0a0+f5165ad
-- Building version 1.1.0a0+f5165ad
['cmake',
 '-DBUILDING_WITH_TORCH_LIBS=ON',
 '-DBUILD_BINARY=False',
 '-DBUILD_CAFFE2_OPS=True',
 '-DBUILD_PYTHON=True',
 '-DBUILD_SHARED_LIBS=ON',
 '-DBUILD_TEST=True',
 '-DBUILD_TORCH=ON',
 '-DCAFFE2_STATIC_LINK_CUDA=False',
 '-DCMAKE_BUILD_TYPE=Release',
 '-DCMAKE_CXX_FLAGS= ',
 '-DCMAKE_C_FLAGS= ',
 '-DCMAKE_EXE_LINKER_FLAGS=',
 '-DCMAKE_INSTALL_PREFIX=/home/msl/isaac/pytorch/torch',
 '-DCMAKE_PREFIX_PATH=/home/msl/anaconda3/envs/pytorch',
 '-DCMAKE_SHARED_LINKER_FLAGS=',
 '-DINSTALL_TEST=True',
 '-DNCCL_EXTERNAL=True',
 '-DNUMPY_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/lib/python3.6/site-packages/numpy/core/include',
 '-DONNX_ML=False',
 '-DONNX_NAMESPACE=onnx_torch',
 '-DPYTHON_EXECUTABLE=/home/msl/anaconda3/envs/pytorch/bin/python',
 '-DPYTHON_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/include/python3.6m',
 '-DPYTHON_LIBRARY=/home/msl/anaconda3/envs/pytorch/lib/libpython3.6m.so.1.0',
 '-DTHD_SO_VERSION=1',
 '-DTORCH_BUILD_VERSION=1.1.0a0+f5165ad',
 '-DUSE_CUDA=True',
 '-DUSE_DISTRIBUTED=True',
 '-DUSE_FBGEMM=True',
 '-DUSE_FFMPEG=False',
 '-DUSE_LEVELDB=False',
 '-DUSE_LMDB=False',
 '-DUSE_MKLDNN=True',
 '-DUSE_NCCL=True',
 '-DUSE_NNPACK=True',
 '-DUSE_NUMPY=True',
 '-DUSE_OPENCV=False',
 '-DUSE_QNNPACK=True',
 '-DUSE_ROCM=False',
 '-DUSE_SYSTEM_EIGEN_INSTALL=OFF',
 '-DUSE_SYSTEM_NCCL=False',
 '-DUSE_TENSORRT=False',
 '-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON',
 '/home/msl/isaac/pytorch']
-- The CXX compiler identification is GNU 5.3.0
-- The C compiler identification is GNU 5.3.0
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Success
-- Performing Test SUPPORT_GLIBCXX_USE_C99
-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
-- std::exception_ptr is supported.
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE
-- Performing Test CAFFE2_IS_NUMA_AVAILABLE - Failed
-- NUMA is not available
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Caffe2 protobuf include directory: $&lt;BUILD_INTERFACE:/home/msl/isaac/pytorch/third_party/protobuf/src&gt;$&lt;INSTALL_INTERFACE:include&gt;
-- Trying to find preferred BLAS backend of choice: MKL
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Looking for cblas_sgemm
-- Looking for cblas_sgemm - found
-- MKL libraries: /home/msl/anaconda3/envs/pytorch/lib/libmkl_intel_lp64.so;/home/msl/anaconda3/envs/pytorch/lib/libmkl_gnu_thread.so;/home/msl/anaconda3/envs/pytorch/lib/libmkl_core.so;-fopenmp;/usr/lib64/libpthread.so;/usr/lib64/libm.so;/usr/lib64/libdl.so
-- MKL include directory: /home/msl/anaconda3/envs/pytorch/include
-- MKL OpenMP type: GNU
-- MKL OpenMP library: -fopenmp
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/gcc
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Brace yourself, we are building NNPACK
-- Performing Test NNPACK_ARCH_IS_X86_32
-- Performing Test NNPACK_ARCH_IS_X86_32 - Failed
-- Found PythonInterp: /home/msl/anaconda3/envs/pytorch/bin/python (found version "3.6.8")
-- NNPACK backend is x86-64
-- Failed to find LLVM FileCheck
-- Found Git: /usr/bin/git (found version "1.8.3.1")
-- git Version: v1.4.0-505be96a
-- Version: 1.4.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- compiled but failed to run
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Error at third_party/benchmark/CMakeLists.txt:231 (message):
  Failed to determine the source files for the regular expression backend


-- Configuring incomplete, errors occurred!
See also "/home/msl/isaac/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/msl/isaac/pytorch/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 719, in &lt;module&gt;
    build_deps()
  File "setup.py", line 285, in build_deps
    build_dir='build')
  File "/home/msl/isaac/pytorch/tools/build_pytorch_libs.py", line 259, in build_caffe2
    my_env)
  File "/home/msl/isaac/pytorch/tools/build_pytorch_libs.py", line 239, in run_cmake
    check_call(cmake_args, cwd=build_dir, env=my_env)
  File "/home/msl/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DBUILDING_WITH_TORCH_LIBS=ON', '-DBUILD_BINARY=False', '-DBUILD_CAFFE2_OPS=True', '-DBUILD_PYTHON=True', '-DBUILD_SHARED_LIBS=ON', '-DBUILD_TEST=True', '-DBUILD_TORCH=ON', '-DCAFFE2_STATIC_LINK_CUDA=False', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_CXX_FLAGS= ', '-DCMAKE_C_FLAGS= ', '-DCMAKE_EXE_LINKER_FLAGS=', '-DCMAKE_INSTALL_PREFIX=/home/msl/isaac/pytorch/torch', '-DCMAKE_PREFIX_PATH=/home/msl/anaconda3/envs/pytorch', '-DCMAKE_SHARED_LINKER_FLAGS=', '-DINSTALL_TEST=True', '-DNCCL_EXTERNAL=True', '-DNUMPY_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/lib/python3.6/site-packages/numpy/core/include', '-DONNX_ML=False', '-DONNX_NAMESPACE=onnx_torch', '-DPYTHON_EXECUTABLE=/home/msl/anaconda3/envs/pytorch/bin/python', '-DPYTHON_INCLUDE_DIR=/home/msl/anaconda3/envs/pytorch/include/python3.6m', '-DPYTHON_LIBRARY=/home/msl/anaconda3/envs/pytorch/lib/libpython3.6m.so.1.0', '-DTHD_SO_VERSION=1', '-DTORCH_BUILD_VERSION=1.1.0a0+f5165ad', '-DUSE_CUDA=True', '-DUSE_DISTRIBUTED=True', '-DUSE_FBGEMM=True', '-DUSE_FFMPEG=False', '-DUSE_LEVELDB=False', '-DUSE_LMDB=False', '-DUSE_MKLDNN=True', '-DUSE_NCCL=True', '-DUSE_NNPACK=True', '-DUSE_NUMPY=True', '-DUSE_OPENCV=False', '-DUSE_QNNPACK=True', '-DUSE_ROCM=False', '-DUSE_SYSTEM_EIGEN_INSTALL=OFF', '-DUSE_SYSTEM_NCCL=False', '-DUSE_TENSORRT=False', '-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON', '/home/msl/isaac/pytorch']' returned non-zero exit status 1.
</code></pre></div>

<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>follow the guide on Github on how to build from source</li>
<li>run <code class="notranslate">python setup.py install</code></li>
</ol>

<h2 dir="auto">Expected behavior</h2>
<p dir="auto">for it to install.</p>

<h2 dir="auto">Environment</h2>
<p dir="auto">Please copy and paste the output from our<br>
<a href="https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py" rel="nofollow">environment collection script</a><br>
(or fill out the checklist below manually).</p>
<p dir="auto">You can get the script and run it with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py"><pre class="notranslate"><code class="notranslate">wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
</code></pre></div>
<p dir="auto">Collecting environment information...<br>
PyTorch version: N/A<br>
Is debug build: N/A<br>
CUDA used to build PyTorch: N/A</p>
<p dir="auto">OS: CentOS Linux 7 (Core)<br>
GCC version: (GCC) 5.3.0<br>
CMake version: version 3.14.0</p>
<p dir="auto">Python version: 3.6<br>
Is CUDA available: N/A<br>
CUDA runtime version: 10.0.130<br>
GPU models and configuration:<br>
GPU 0: GeForce GTX 1080<br>
GPU 1: GeForce GTX 1080</p>
<p dir="auto">Nvidia driver version: 410.79<br>
cuDNN version: Probably one of the following:<br>
/usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudnn.so.7<br>
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.5<br>
/usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip] numpy==1.16.2<br>
[conda] blas                      1.0                         mkl<br>
[conda] magma-cuda100             2.5.0                         1    pytorch<br>
[conda] mkl                       2019.3                      199<br>
[conda] mkl-include               2019.3                      199<br>
[conda] mkl_fft                   1.0.10           py36ha843d7b_0<br>
[conda] mkl_random                1.0.2            py36hd81dba3_0</p>
<h2 dir="auto">Additional context</h2>

<p dir="auto">I have followed the solution mentioned by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alejo9719/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alejo9719">@alejo9719</a> in this <a href="https://github.com/pytorch/pytorch/issues/16602" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/16602/hovercard">issue</a> by updating <code class="notranslate">cmake</code> and deleteing <code class="notranslate">build</code> repo from pytorch, but error still persists</p>
<p dir="auto">I am not sure why <code class="notranslate">Is CUDA available</code> is N/A when I run the script to collect environment info. I have <code class="notranslate">/usr/local/cuda</code> symblinked to <code class="notranslate">/usr/local/cuda10.0</code></p>