Skip to content

Commit 3f4b66d

Browse files
committed
up
1 parent 2663439 commit 3f4b66d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

install_requirements.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import re
1111
import subprocess
1212
import sys
13+
import os
1314

1415

1516
def python_is_compatible():
@@ -117,6 +118,8 @@ def install_requirements(use_pytorch_nightly):
117118

118119
# Install packages directly from local copy instead of pypi.
119120
# This is usually not recommended.
121+
new_env = os.environ.copy()
122+
new_env["USE_CPP"] = "1" # build torchao kernels
120123
subprocess.run(
121124
[
122125
sys.executable,
@@ -127,6 +130,7 @@ def install_requirements(use_pytorch_nightly):
127130
"--no-build-isolation",
128131
*LOCAL_REQUIREMENTS,
129132
],
133+
env=new_env,
130134
check=True,
131135
)
132136

0 commit comments

Comments
 (0)