@@ -399,10 +399,12 @@ def get_proton_cmake_args(self):
399399
400400 def build_extension (self , ext ):
401401 lit_dir = shutil .which ('lit' )
402- ninja_dir = shutil .which ('ninja' )
402+ # ninja_dir = shutil.which('ninja')
403+ ninja_dir = "/home/chengjun/clion-2023.1.3/bin/ninja/linux/x64/ninja"
403404 # lit is used by the test suite
404- thirdparty_cmake_args = get_thirdparty_packages ([get_llvm_package_info ()])
405- thirdparty_cmake_args += self .get_pybind11_cmake_args ()
405+ # thirdparty_cmake_args = get_thirdparty_packages([get_llvm_package_info()])
406+ # thirdparty_cmake_args += self.get_pybind11_cmake_args()
407+ thirdparty_cmake_args = []
406408 extdir = os .path .abspath (os .path .dirname (self .get_ext_fullpath (ext .path )))
407409 # create build directories
408410 if not os .path .exists (self .build_temp ):
@@ -435,7 +437,7 @@ def build_extension(self, ext):
435437 else :
436438 cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg ]
437439 max_jobs = os .getenv ("MAX_JOBS" , str (2 * os .cpu_count ()))
438- build_args += ['-j' + max_jobs ]
440+ build_args += ['-j' + "2" ]
439441
440442 if check_env_flag ("TRITON_BUILD_WITH_CLANG_LLD" ):
441443 cmake_args += [
@@ -481,7 +483,10 @@ def build_extension(self, ext):
481483
482484 env = os .environ .copy ()
483485 cmake_dir = get_cmake_dir ()
484- subprocess .check_call (["cmake" , self .base_dir ] + cmake_args , cwd = cmake_dir , env = env )
486+ # subprocess.check_call(["cmake", self.base_dir] + cmake_args, cwd=cmake_dir, env=env)
487+ print (["cmake" , self .base_dir ] + cmake_args )
488+ print (cmake_dir )
489+ print (["cmake" , "--build" , "." ] + build_args )
485490 subprocess .check_call (["cmake" , "--build" , "." ] + build_args , cwd = cmake_dir )
486491 subprocess .check_call (["cmake" , "--build" , "." , "--target" , "mlir-doc" ], cwd = cmake_dir )
487492
0 commit comments