File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import argparse
4
4
import os
5
- import sys
6
5
import subprocess
6
+ import sys
7
7
from pathlib import Path
8
8
9
9
from mlc_llm .support import logging
@@ -22,7 +22,7 @@ def run_cmake(mlc4j_path: Path):
22
22
logger .info ("Running cmake" )
23
23
# use pathlib so it is cross platform
24
24
android_ndk_path = (
25
- Path (os .environ [' ANDROID_NDK' ]) / "build" / "cmake" / "android.toolchain.cmake"
25
+ Path (os .environ [" ANDROID_NDK" ]) / "build" / "cmake" / "android.toolchain.cmake"
26
26
)
27
27
cmd = [
28
28
"cmake" ,
@@ -60,7 +60,7 @@ def run_cmake_build():
60
60
"tvm4j_runtime_packed" ,
61
61
"--config" ,
62
62
"release" ,
63
- f"-j{ os .cpu_count ()} "
63
+ f"-j{ os .cpu_count ()} " ,
64
64
]
65
65
subprocess .run (cmd , check = True , env = os .environ )
66
66
@@ -93,7 +93,7 @@ def main(mlc_llm_source_dir: Path):
93
93
if "TVM_SOURCE_DIR" in os .environ :
94
94
logger .info ('Set TVM_SOURCE_DIR to "%s"' , os .environ ["TVM_SOURCE_DIR" ])
95
95
with open ("config.cmake" , "w" , encoding = "utf-8" ) as file :
96
- print ("set(TVM_SOURCE_DIR ${%s} )" % os .environ ["TVM_SOURCE_DIR" ], file = file )
96
+ print ("set(TVM_SOURCE_DIR %s )" % os .environ ["TVM_SOURCE_DIR" ], file = file )
97
97
98
98
# - Run cmake, build and install
99
99
run_cmake (mlc_llm_source_dir / "android" / "mlc4j" )
You can’t perform that action at this time.
0 commit comments