<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">I have this assert using libtorch-win-shared-with-deps-debug-latest.zip loading a saved model:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cuda_dispatch_ptr INTERNAL ASSERT FAILED at 
C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:74, please report a bug to 
PyTorch. DispatchStub: missing CUDA kernel (operator () at 
C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:74)
(no backtrace available)"><pre class="notranslate"><code class="notranslate">cuda_dispatch_ptr INTERNAL ASSERT FAILED at 
C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:74, please report a bug to 
PyTorch. DispatchStub: missing CUDA kernel (operator () at 
C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:74)
(no backtrace available)
</code></pre></div>
<p dir="auto">It works with the release version libtorch-win-shared-with-deps-latest.zip</p>
<p dir="auto">To Reproduce:</p>
<ol dir="auto">
<li>download the <a href="https://download.pytorch.org/libtorch/nightly/cu101/libtorch-win-shared-with-deps-debug-latest.zip" rel="nofollow">nightly build</a> and compile with VS2019.</li>
<li>save a model to "cuda":<br>
<code class="notranslate">model = models.densenet121(pretrained=True)</code><br>
<code class="notranslate"># do forward...</code><br>
<code class="notranslate">traced_script_module.save("traced_resnet_model.pt")</code></li>
<li>load the model:<br>
<code class="notranslate">module = torch::jit::load("traced_resnet_model.pt");</code></li>
</ol>
<ul dir="auto">
<li>PyTorch Version nightly build:</li>
<li>OS W10:</li>
<li><a href="https://download.pytorch.org/libtorch/nightly/cu101/libtorch-win-shared-with-deps-debug-latest.zip" rel="nofollow">https://download.pytorch.org/libtorch/nightly/cu101/libtorch-win-shared-with-deps-debug-latest.zip</a></li>
<li>VS2019:</li>
<li>CUDA 10:</li>
</ul>
<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 doing inference using LibTorch in C++ for semantic segmentation on the GPU, i get the following error in debug compilation mode:</p>
<p dir="auto">cuda_dispatch_ptr INTERNAL ASSERT FAILED at C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:70, please report a bug to PyTorch. DispatchStub: missing CUDA kernel (operator () at C:\w\1\s\windows\pytorch\aten\src\ATen/native/DispatchStub.h:70)<br>
(no backtrace available)</p>
<p dir="auto">When I run it in release mode it does not crash and delivers the expected result. Also on the CPU, this assert is not shown.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0): latest nightly</li>
<li>OS (e.g., Linux): WIndows 10, Visual Studio 19</li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): downloaded prebuild libtorch</li>
<li>Build command you used (if compiling from source):</li>
<li>Python version:</li>
<li>CUDA/cuDNN version: the one included in the prebuild (cuda 10)</li>
<li>GPU models and configuration: Titan X</li>
<li>Any other relevant information:</li>
</ul>