Skip to content

Commit f8f0ab7

Browse files
committed
Fix ABI incompatibility with pybind11
1 parent 25fde7c commit f8f0ab7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from typing import List
1616

1717
import setuptools
18+
import torch
1819
import yaml
1920
from setuptools import Extension, find_namespace_packages, setup
2021
from setuptools.command.build_ext import build_ext
@@ -508,6 +509,7 @@ def run(self):
508509
],
509510
extra_compile_args=(
510511
[
512+
f'/DPYBIND11_BUILD_ABI=\\"{torch._C._PYBIND11_BUILD_ABI}\\"',
511513
"/GS-",
512514
"/permissive-",
513515
]

0 commit comments

Comments
 (0)