File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -799,7 +799,7 @@ if(EXECUTORCH_BUILD_PYBIND)
799799 util
800800 torch
801801 )
802-
802+
803803 # Build common AOTI functionality if needed by CUDA or Metal backends
804804 if (EXECUTORCH_BUILD_CUDA OR EXECUTORCH_BUILD_METAL)
805805 list (APPEND _dep_libs aoti_common)
Original file line number Diff line number Diff line change 6565from pathlib import Path
6666from typing import List , Optional
6767
68+ # Add the current directory to sys.path to import install_utils
69+ CWD = Path (__file__ ).absolute ().parent
70+ # Add the current directory to the Python path so that we can import `install_utils`.
71+ # This is required when running this script with a PEP-517-enabled build backend.
72+ #
73+ # From the PEP-517 documentation: https://peps.python.org/pep-0517
74+ #
75+ # > When importing the module path, we do *not* look in the directory containing
76+ # > the source tree, unless that would be on `sys.path` anyway (e.g. because it
77+ # > is specified in `PYTHONPATH`).
78+ #
79+ sys .path .insert (0 , str (CWD )) # this only affects the current process
6880import install_utils
6981
7082from setuptools import Extension , setup
@@ -831,6 +843,7 @@ def run(self): # noqa C901
831843
832844 if cmake_cache .is_enabled ("EXECUTORCH_BUILD_CUDA" ):
833845 cmake_build_args += ["--target" , "aoti_cuda" ]
846+ cmake_build_args += ["--target" , "aoti_common" ]
834847
835848 if cmake_cache .is_enabled ("EXECUTORCH_BUILD_EXTENSION_LLM_RUNNER" ):
836849 cmake_build_args += ["--target" , "_llm_runner" ]
You can’t perform that action at this time.
0 commit comments