Skip to content

Commit 1466c99

Browse files
Stardep-lmcflagtree-botzhzhcookieGalaxy1458
authored
[BUILD] support metax backend environment setup and plugin cache (#482)
* feat: add metax backend dependencies and plugin cache logic --------- Co-authored-by: flagtree-bot <flagtree_ai@163.com> Co-authored-by: zhzhcookie <zhengyang@baai.ac.cn> Co-authored-by: Galaxy1458 <55453380+Galaxy1458@users.noreply.github.com>
1 parent 3c79ffd commit 1466c99

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

python/setup_tools/setup_helper.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,39 @@ def uninstall_triton():
438438
cache.store(files=("include", "so"), condition=("xpu" == flagtree_backend),
439439
copy_src_path=f"{cache.dir_path}/xpu/xre-Linux-x86_64", copy_dst_path="third_party/xpu/backend/xpu3")
440440

441+
# metax
442+
cache.store(
443+
file="llvm_release",
444+
condition=("metax" == flagtree_backend),
445+
url="https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/maca-llvm-metax20250708.521-x86_64.tar.xz",
446+
post_hock=set_llvm_env,
447+
)
448+
449+
cache.store(
450+
files=("mlir-opt", ),
451+
condition=("metax" == flagtree_backend),
452+
copy_src_path=f"{os.environ.get('LLVM_SYSPATH','')}/bin",
453+
copy_dst_path="third_party/metax/backend/bin",
454+
md5_digest="f14eafc2",
455+
)
456+
457+
cache.store(
458+
file="metaxTritonPlugin.so",
459+
condition=("metax" == flagtree_backend) and (not configs.flagtree_plugin),
460+
url=
461+
"https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/metaxTritonPlugin-cpython3.10-glibc2.39-glibcxx3.4.33-cxxabi1.3.15-linux-x86_64_v0.4.0.tar.gz",
462+
copy_dst_path=f"third_party/{flagtree_backend}",
463+
md5_digest="4abfd940",
464+
)
465+
466+
cache.store(
467+
file="ext_maca_mathlib.bc",
468+
condition=("metax" == flagtree_backend),
469+
url="https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/ext_maca_mathlib_bc_v0.4.0.tar.gz",
470+
copy_dst_path=f"third_party/{flagtree_backend}/backend/lib",
471+
md5_digest="95349890",
472+
)
473+
441474
# mthreads
442475
cache.store(
443476
file="mthreads-llvm19-glibc2.35-glibcxx3.4.30",

0 commit comments

Comments
 (0)