Skip to content

Commit 509f63d

Browse files
authored
Merge pull request #1185 from linsword13/mlc
Add an optional hugepage config exec in intel-mlc
2 parents 22b13f6 + 3934837 commit 509f63d

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

var/ramble/repos/builtin/applications/intel-mlc/application.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,29 @@ class IntelMlc(ExecutableApplication):
2626
pkg_spec="intel-mlc",
2727
)
2828

29+
variant(
30+
"configure_hugepage",
31+
default=False,
32+
values=[False, True],
33+
description="When true, configure hugepage setting",
34+
)
35+
36+
executable(
37+
"configure_hugepage",
38+
template=[
39+
"sudo sysctl -w vm.nr_hugepages={nr_hugepages}",
40+
"sudo sysctl -p",
41+
],
42+
use_mpi=False,
43+
when=["+configure_hugepage"],
44+
)
45+
2946
executable(
3047
"execute_bw",
3148
"{mlc_exec_path} --max_bandwidth {isa_flag} -k{cpu_list} -b{buffer_size} {additional_args}",
3249
)
3350

34-
workload("max_bandwidth", executables=["execute_bw"])
51+
workload("max_bandwidth", executables=["configure_hugepage", "execute_bw"])
3552

3653
workload_group("all_workloads", workloads=["max_bandwidth"])
3754

@@ -101,6 +118,13 @@ class IntelMlc(ExecutableApplication):
101118
workload_group="all_workloads",
102119
)
103120

121+
workload_variable(
122+
"nr_hugepages",
123+
default="4000",
124+
description="Number of hugepages to configure",
125+
workload_group="all_workloads",
126+
)
127+
104128
register_validator(
105129
name="single_node",
106130
predicate="{n_nodes} == 1",

0 commit comments

Comments
 (0)