<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 I use libtorch1.3.1 of debug version in my C++ app, it threw a runtime error when I was trying to load a script model:</p>
<p dir="auto">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)</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>Configure libtorch1.3.1 of debug version in my C++ project</li>
<li>Run the project by "Debug x64" model</li>
<li>It throw a runtime error when trying to load the model</li>
</ol>
<p dir="auto">Exception thrown at 0x00007FFD9A96A839 in EasyCyte.exe: Microsoft C++ exception: c10::Error at memory location 0x0000000F166F8450.<br>
Exception thrown at 0x00007FFD9A96A839 in EasyCyte.exe: Microsoft C++ exception: c10::Error at memory location 0x0000000F166F7F90.<br>
Unhandled exception at 0x00007FFD9A96A839 in EasyCyte.exe: Microsoft C++ exception: c10::Error at memory location 0x0000000F166F7F90.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The model should be loaded successfully without errors.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0):1.3.1(libtorch debug)</li>
<li>OS (e.g., Linux):Windows10</li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source):pip</li>
<li>Python version:3.6</li>
<li>CUDA/cuDNN version:CUDA9.2+CUDNN7.5.0</li>
<li>GPU models and configuration:</li>
<li>Any other relevant information:VS2017 with toolset 14.11</li>
</ul>
<h2 dir="auto">Additional context</h2>
<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>