From 1322f889c5e9f019030c05369544d026b8fad095 Mon Sep 17 00:00:00 2001 From: Jane Xu Date: Tue, 12 Nov 2024 16:32:40 -0800 Subject: [PATCH] Enable python agnosticism --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index b7334631a8..e2462ae13d 100644 --- a/setup.py +++ b/setup.py @@ -117,6 +117,7 @@ def get_extensions(): extension( "torchao._C", sources, + py_limited_api=True, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, ) @@ -139,4 +140,7 @@ def get_extensions(): long_description_content_type="text/markdown", url="https://github.com/pytorch-labs/ao", cmdclass={"build_ext": BuildExtension}, + options={"bdist_wheel": { + "py_limited_api": "cp39" + }}, )