Skip to content

Commit bb3523f

Browse files
authored
Documenting cuda 11.5 windows issue (pytorch#1826)
1 parent ebef634 commit bb3523f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

advanced_source/cpp_extension.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,27 @@ into C++. Our primary datatype for all computations will be
206206
also that we can include ``<iostream>`` or *any other C or C++ header* -- we have
207207
the full power of C++11 at our disposal.
208208

209+
Note that CUDA-11.5 nvcc will hit internal compiler error while parsing torch/extension.h on Windows.
210+
To workaround the issue, move python binding logic to pure C++ file.
211+
Example use:
212+
213+
.. code-block:: cpp
214+
215+
#include <ATen/ATen.h>
216+
at::Tensor SigmoidAlphaBlendForwardCuda(....)
217+
218+
Instead of:
219+
220+
.. code-block:: cpp
221+
222+
#include <torch/extension.h>
223+
torch::Tensor SigmoidAlphaBlendForwardCuda(...)
224+
225+
Currently open issue for nvcc bug `here
226+
<https://github.com/pytorch/pytorch/issues/69460>`_.
227+
Complete workaround code example `here
228+
<https://github.com/facebookresearch/pytorch3d/commit/cb170ac024a949f1f9614ffe6af1c38d972f7d48>`_.
229+
209230
Forward Pass
210231
************
211232

0 commit comments

Comments
 (0)