File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -284,15 +284,16 @@ three ways:
284284
2852851. The first way to load the C++ library that holds the custom operator definition
286286 is to define a dummy Python module for _C. Then, in Python, when you import the
287- module with ``import _C ``, the ``.so``s corresponding to the extension will be
288- loaded and the ``TORCH_LIBRARY `` and ``TORCH_LIBRARY_IMPL `` static initializers
287+ module with ``import _C ``, the ``.so `` files corresponding to the extension will
288+ be loaded and the ``TORCH_LIBRARY `` and ``TORCH_LIBRARY_IMPL `` static initializers
289289 will run. One can create a dummy Python module with ``PYBIND11_MODULE `` like below,
290290 but you will notice that this does not compile with ``Py_LIMITED_API ``, because
291291 ``pybind11 `` does not promise to only use the stable limited CPython API! With
292292 the below code, you sadly cannot build a CPython agnostic wheel for your extension!
293- (Foreshadowing: I wonder what the second way is ;)).
293+ (Foreshadowing: I wonder what the second way is ;) ).
294294
295295.. code-block :: cpp
296+
296297 // in, say, not_agnostic/csrc/extension_BAD.cpp
297298 #include <pybind11/pybind11.h>
298299
@@ -312,6 +313,7 @@ three ways:
312313 for more details:
313314
314315.. code-block :: cpp
316+
315317 #include <Python.h>
316318
317319 extern "C" {
You can’t perform that action at this time.
0 commit comments