<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">When building libtorch with cmake/make directly, the generated <code class="notranslate">TorchConfigVersion.cmake</code> will always show 1.0.0 as the version number</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Clone Pytorch</li>
<li>Checkout v1.0.0</li>
<li>Build libtorch with cmake/make</li>
<li>Look at <code class="notranslate">TorchConfigVersion.cmake</code></li>
</ol>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/pytorch/pytorch.git
cd pytorch
git checkout v1.1.0
git submodule update --init --recursive
mkdir build
cd build
cmake \
-DBUILDING_WITH_TORCH_LIBS=ON \
-DBUILD_BINARY=False \
-DBUILD_CAFFE2_OPS=True \
-DBUILD_PYTHON=False \
-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_SHARED_LINKER_FLAGS= \
-DINSTALL_TEST=True \
-DNCCL_EXTERNAL=True \
-DONNX_ML=False \
-DONNX_NAMESPACE=onnx_torch \
-DTHD_SO_VERSION=1 \
-DUSE_CUDA=True \
-DUSE_DISTRIBUTED=True \
-DUSE_FBGEMM=True \
-DUSE_FFMPEG=False \
-DUSE_LEVELDB=False \
-DUSE_LMDB=False \
-DUSE_MKLDNN=False \
-DUSE_NCCL=False \
-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 \
-DCMAKE_PREFIX_PATH=/usr/local \
..
make -j8
cat ./TorchConfigVersion.cmake
"><pre class="notranslate">git clone https://github.com/pytorch/pytorch.git
<span class="pl-c1">cd</span> pytorch
git checkout v1.1.0
git submodule update --init --recursive
mkdir build
<span class="pl-c1">cd</span> build
cmake \
-DBUILDING_WITH_TORCH_LIBS=ON \
-DBUILD_BINARY=False \
-DBUILD_CAFFE2_OPS=True \
-DBUILD_PYTHON=False \
-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_SHARED_LINKER_FLAGS= \
-DINSTALL_TEST=True \
-DNCCL_EXTERNAL=True \
-DONNX_ML=False \
-DONNX_NAMESPACE=onnx_torch \
-DTHD_SO_VERSION=1 \
-DUSE_CUDA=True \
-DUSE_DISTRIBUTED=True \
-DUSE_FBGEMM=True \
-DUSE_FFMPEG=False \
-DUSE_LEVELDB=False \
-DUSE_LMDB=False \
-DUSE_MKLDNN=False \
-DUSE_NCCL=False \
-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 \
-DCMAKE_PREFIX_PATH=/usr/local \
..
make -j8
cat ./TorchConfigVersion.cmake
</pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The first line in <code class="notranslate">TorchConfigVersion.cmake</code> should be:<br>
<code class="notranslate">set(PACKAGE_VERSION "1.1.0")</code></p>
<h2 dir="auto">Environment</h2>
<p dir="auto">PyTorch version: 1.1.0<br>
Is debug build: No<br>
CUDA used to build PyTorch: 10.0.130</p>
<p dir="auto">OS: Ubuntu 16.04.6 LTS<br>
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609<br>
CMake version: version 3.5.1</p>
<p dir="auto">Python version: 2.7<br>
Is CUDA available: Yes<br>
CUDA runtime version: 10.0.130<br>
GPU models and configuration:<br>
GPU 0: GeForce GTX 1080 Ti</p>
<p dir="auto">Nvidia driver version: 410.104<br>
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.0</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip] numpy==1.16.4<br>
[pip] torch==1.1.0<br>
[conda] Could not collect</p>
<h2 dir="auto">Additional context</h2>
<p dir="auto">This was also tested on an ARM/Linux system with the same spurious results.</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">CMake version (in <code class="notranslate">TorchConfigVersion.cmake</code>) seems stuck to 1.0.0 in the latest libtorch C++ windows packages (CUDA or not).<br>
This problem may also have affected the previous 1.0.1 packages.</p>
<p dir="auto">Another big problem for me is that I can't find any more link to download libtorch C++ 1.0.1 packages,<br>
upon which I based all my current developments.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Download the latest package here:<br>
<a href="https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-latest.zip" rel="nofollow">https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-latest.zip</a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto"><code class="notranslate">TorchConfigVersion.cmake</code> with correct version.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version: 1.1</li>
<li>OS: Windows</li>
<li>How you installed PyTorch: binary package</li>
<li>CUDA/cuDNN version: 9</li>
</ul>
<p dir="auto">Thanks for your help,</p>
<p dir="auto">Albert</p>