<h2 dir="auto">Issue description</h2>
<p dir="auto">The error <code class="notranslate">LINK : fatal error LNK1189: library limit of 65535 objects exceeded</code> occurred when linking caffe2 using Visual Studio 2015.</p>
<h2 dir="auto">Code example</h2>
<div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="set &quot;VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build&quot;
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
REM The following line is needed for Python 2.7, but the support for it is very experimental.
set MSSdk=1

call &quot;%VS150COMNTOOLS%\vcvarsall.bat&quot; x64 -vcvars_ver=14.11
python setup.py install"><pre class="notranslate"><span class="pl-k">set</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">VS150COMNTOOLS</span><span class="pl-k">=</span>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build<span class="pl-pds">"</span></span>
<span class="pl-k">set</span> <span class="pl-smi">CMAKE_GENERATOR</span><span class="pl-k">=</span>Visual Studio <span class="pl-c1">15</span> <span class="pl-c1">2017</span> Win64
<span class="pl-k">set</span> <span class="pl-smi">DISTUTILS_USE_SDK</span><span class="pl-k">=</span><span class="pl-c1">1</span>
<span class="pl-c"><span class="pl-k">REM</span> The following line is needed for Python 2.7, but the support for it is very experimental.</span>
<span class="pl-k">set</span> <span class="pl-smi">MSSdk</span><span class="pl-k">=</span><span class="pl-c1">1</span>

<span class="pl-k">call</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">%VS150COMNTOOLS%</span>\vcvarsall.bat<span class="pl-pds">"</span></span> x64 -vcvars_ver=14.11
python setup.py install</pre></div>
<h2 dir="auto">System Info</h2>
<p dir="auto">PyTorch or Caffe2: PyTorch<br>
PyTorch version: 0.4.0<br>
Is debug build: No<br>
CUDA used to build PyTorch: 9.0</p>
<p dir="auto">OS: Microsoft Windows 10 Pro<br>
GCC version: (Rev2, Built by MSYS2 project) 7.1.0<br>
CMake version: version 3.8.1</p>
<p dir="auto">Python version: 3.6<br>
Is CUDA available: Yes<br>
CUDA runtime version: 9.0.176<br>
GPU models and configuration: GPU 0: GeForce GTX 1070<br>
Nvidia driver version: 398.36<br>
cuDNN version: Probably one of the following:<br>
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\cudnn64_7.dll</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip] numpy (1.13.3)<br>
[pip] torch (0.4.0)<br>
[pip] torchfile (0.1.0)<br>
[pip] torchnet (0.0.1)<br>
[pip] torchtext (0.2.1)<br>
[pip] torchvision (0.1.9)<br>
[pip] warpctc-pytorch (0.1)<br>
[conda] torchfile                 0.1.0                     <br>
[conda] torchnet                  0.0.1                     <br>
[conda] torchtext                 0.2.1                     <br>
[conda] torchvision               0.1.9                     <br>
[conda] warpctc-pytorch           0.1                       </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>

<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>follow the instruction here <a href="https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/super_resolution_with_caffe2.ipynb#scrollTo=fUI45vwDNZR6" rel="nofollow">https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/super_resolution_with_caffe2.ipynb#scrollTo=fUI45vwDNZR6</a></li>
<li>use onnx to convert pytorch to onnx</li>
</ol>
<h2 dir="auto">Code to execute</h2>
<p dir="auto">model = SegNet_Small(<br>
input_channels=1,<br>
num_classes=4,<br>
skip_type="mul",<br>
BR_bool=False,<br>
separable_conv=False,<br>
)<br>
model = model.to(device)<br>
x = torch.randn(1, 1, 184, 184, requires_grad=True).to(device)<br>
torch.onnx.export(model, x, "test.onnx", verbose=True)</p>
<h2 dir="auto">Error information</h2>
<hr>
<p dir="auto">RuntimeError                              Traceback (most recent call last)<br>
 in <br>
3<br>
4 # Export the model<br>
----&gt; 5 torch.onnx.export(model, x, "test.onnx", verbose=True)<br>
6<br>
7 # torch_out = torch.onnx._export(model,             # model being run<br>
..................<br>
~/anaconda3/lib/python3.7/site-packages/torch/onnx/symbolic_registry.py in get_registered_op(opname, domain, version)<br>
107         else:<br>
108             msg += "Please open a bug to request ONNX export support for the missing operator."<br>
--&gt; 109         raise RuntimeError(msg)<br>
110     return _registry[(domain, version)][opname]</p>
<p dir="auto"><strong>RuntimeError: Exporting the operator max_unpool2d to ONNX opset version 9 is not supported. Please open a bug to request ONNX export support for the missing operator.</strong></p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Versio: 1.6.0</li>
<li>OS (e.g., Linux): Fedora release 30 (Thirty) (x86_64)</li>
<li>How you installed PyTorch: conda</li>
<li>Python version: 3.7</li>
<li>CUDA/cuDNN version: 10.0.130 / 7.5.0</li>
<li>GPU models and configuration: TITAN RTX</li>
<li>Any other relevant information:</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Versions of relevant libraries:<br>
[pip3] numpy==1.18.1<br>
[conda] _pytorch_select           0.2                       gpu_0<br>
[conda] blas                      1.0                         mkl<br>
[conda] cudatoolkit               10.2.89              hfd86e86_1<br>
[conda] mkl                       2019.4                      243<br>
[conda] mkl-service               2.3.0            py37he904b0f_0<br>
[conda] mkl_fft                   1.0.15           py37ha843d7b_0<br>
[conda] mkl_random                1.1.0            py37hd6b4f25_0<br>
[conda] numpy                     1.18.1           py37h4f9e942_0<br>
[conda] numpy-base                1.18.1           py37hde5b4d6_1<br>
[conda] numpydoc                  0.9.2                      py_0<br>
[conda] pytorch                   1.6.0           py3.7_cuda10.2.89_cudnn7.6.5_0    pytorch<br>
[conda] pytorch-lightning         0.7.5                    pypi_0    pypi<br>
[conda] pytorch-nn-tools          0.1.3                    pypi_0    pypi<br>
[conda] torchvision               0.7.0                py37_cu102    pytorch</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/houseroad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/houseroad">@houseroad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/spandantiwari/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/spandantiwari">@spandantiwari</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lara-hdr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lara-hdr">@lara-hdr</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BowenBao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BowenBao">@BowenBao</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/neginraoof/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/neginraoof">@neginraoof</a></p>