Skip to content

Commit bab3a1b

Browse files
committed
Added no-runtimes variation for install,rocm
1 parent f530635 commit bab3a1b

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

script/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MLCommons Automation Scripts
22

3-
*Last updated: 2026-04-23 19:51:36*
3+
*Last updated: 2026-04-24 00:55:14*
44

55
This directory contains automation scripts for MLPerf benchmarks, AI/ML workflows, and development operations.
66

script/install-rocm/customize.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,32 @@ def preprocess(i):
4040
env['MLC_ROCM_INSTALL_PREFIX'] = build_install_prefix
4141

4242
targets = 'AMDGPU;X86'
43-
projects = 'clang;lld;compiler-rt;clang-tools-extra'
44-
runtimes = 'libcxx;libcxxabi;openmp'
43+
projects = 'clang;lld;clang-tools-extra'
4544

4645
q = "'"
46+
47+
# Runtimes: libc++ and openmp if requested
48+
if env.get('MLC_ROCM_SRC_WITH_RUNTIMES', '') == 'yes':
49+
runtimes = 'libcxx;libcxxabi;openmp'
50+
runtime_flags = (
51+
f' -DLLVM_ENABLE_RUNTIMES={q}{runtimes}{q}'
52+
f' -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu'
53+
f' -DLIBCXXABI_USE_LLVM_UNWINDER=OFF'
54+
)
55+
else:
56+
runtime_flags = f' -DLLVM_ENABLE_RUNTIMES={q}{q}'
57+
4758
cmake_cmd = (
4859
f'cmake {os.path.join(src_path, "llvm")} -GNinja'
4960
f' -DCMAKE_BUILD_TYPE=Release'
5061
f' -DCMAKE_INSTALL_PREFIX={build_install_prefix}'
5162
f' -DLLVM_ENABLE_PROJECTS={q}{projects}{q}'
52-
f' -DLLVM_ENABLE_RUNTIMES={q}{runtimes}{q}'
5363
f' -DLLVM_TARGETS_TO_BUILD={q}{targets}{q}'
5464
f' -DLLVM_ENABLE_RTTI=ON'
5565
f' -DLLVM_INSTALL_UTILS=ON'
5666
f' -DLLVM_ENABLE_ASSERTIONS=OFF'
5767
f' -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF'
68+
+ runtime_flags
5869
)
5970
env['MLC_ROCM_CMAKE_CMD'] = cmake_cmd
6071
i['run_script_input']['script_name'] = 'run-src'

script/install-rocm/meta.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ variations:
5555
- MLC_GIT_CHECKOUT_TAG
5656
_repo.:
5757
- MLC_GIT_URL
58+
with-runtimes:
59+
default: true
60+
group: runtimes
61+
env:
62+
MLC_ROCM_SRC_WITH_RUNTIMES: 'yes'
63+
no-runtimes:
64+
group: runtimes
65+
env:
66+
MLC_ROCM_SRC_WITH_RUNTIMES: 'no'
5867
default_version: 7.2.2
5968
versions:
6069
7.2.2: {}

0 commit comments

Comments
 (0)