Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f4ec270

Browse files
committedMay 4, 2024
Fix ABI incompatibility with pybind11
1 parent 06cb751 commit f4ec270

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)
Please sign in to comment.