Skip to content

Commit 83a2380

Browse files
committed
Fix ABI incompatibility with pybind11
1 parent 0000e34 commit 83a2380

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
@@ -504,6 +505,7 @@ def run(self):
504505
],
505506
extra_compile_args=(
506507
[
508+
f'/DPYBIND11_BUILD_ABI=\\"{torch._C._PYBIND11_BUILD_ABI}\\"',
507509
"/GS-",
508510
"/permissive-",
509511
]

0 commit comments

Comments
 (0)