Skip to content

Commit d4944b5

Browse files
farquetAndrija Kolic
authored andcommitted
Add core pinning to polybench benchmarks on exclusive hardware
1 parent ce4d970 commit d4944b5

File tree

4 files changed

+6
-46
lines changed

4 files changed

+6
-46
lines changed

graal-common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"README": "This file contains definitions that are useful for the jsonnet CI files of the graal and graal-enterprise repositories.",
33
"ci": {
4-
"overlay": "49f8376ffc0773e2069aea7be211e06eafc1088b"
4+
"overlay": "aecf4e4409bde4bfcc1009e5b8c895e150500dfa"
55
}
66
}

truffle/src/org.graalvm.polybench/src/org/graalvm/polybench/Config.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ private void parseBenchSpecificSummary(Value benchmark) throws InvalidObjectExce
119119
Value lowerThresholdValue = summaryGetMethod.execute("lower-threshold");
120120
Value upperThresholdValue = summaryGetMethod.execute("upper-threshold");
121121
if (!lowerThresholdValue.fitsInDouble() || !upperThresholdValue.fitsInDouble()) {
122-
String msg = "Failed at parsing 'summary' benchmark member with name of '" + summaryClassName + "' due to it missing either a 'lower-threshold' or an 'upper-threshold' member!";
122+
String msg = "Failed at parsing 'summary' benchmark member with name of '" + summaryClassName + "'";
123+
msg += " because 'lower-threshold' or 'upper-threshold' is not present, or does not fit into a double!";
123124
throw new InvalidObjectException(msg);
124125
}
125126
summary = new OutlierRemovalAverageSummary(lowerThresholdValue.asDouble(), upperThresholdValue.asDouble());

vm/ci/ci_common/common-bench.jsonnet

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,14 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
6969
# Extends the provided polybench command with common arguments used in CI. We want the command at the call site
7070
# to be simple (i.e., a flat array of string literals) so it can be easily copied and run locally; using this
7171
# wrapper allows us to inject CI-specific fields without specifying them in the command.
72+
hwloc_command_prefix:: if std.length(std.find('bench', self.targets)) > 0 then ["hwloc-bind", "--cpubind", "node:0", "--membind", "node:0", "--"] else [],
7273
polybench_wrap(command)::
7374
assert command[0] == 'mx' : "polybench command should start with 'mx'";
7475
// Dynamically import /truffle-enterprise when running on enterprise.
7576
local extra_imports = if is_enterprise then ['--dy', '/truffle-enterprise'] else [];
76-
['mx'] + extra_imports + command[1:] + ['--mx-benchmark-args', '--results-file', self.result_file] +
77+
self.hwloc_command_prefix + ['mx'] + extra_imports + command[1:] + ['--mx-benchmark-args', '--results-file', self.result_file] +
7778
(if (fail_fast) then ['--fail-fast'] else []),
78-
notify_groups:: ['polybench'],
79+
notify_groups:: ['polybench']
7980
},
8081

8182
polybench_vm_hpc_common: self.polybench_vm_common('linux', 'amd64', skip_machine=true) + self.polybench_hpc_linux_common(shape='e4_8_64') + {
@@ -104,40 +105,6 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
104105
['mx', '--dy', 'polybenchmarks', 'build', '--dependencies', 'POLYBENCHMARKS_BENCHMARKS']
105106
],
106107

107-
polybench_vm_post_merge(os, arch, language, vm_config, name = null): vm_common.vm_base(os, arch, 'post-merge', bench=true) + self.polybench_vm_common(os, arch) + vm.vm_java_Latest + {
108-
name: utils.hyphenize(['post-merge-bench-vm', vm.vm_setup.short_name, 'polybench', language, name, vm_config, utils.jdk_and_hardware(self)]),
109-
setup+: [
110-
['mx', '--dy', 'graalpython', 'build']
111-
],
112-
local benchmarks = ['interpreter/sieve.py', 'interpreter/fibonacci.py', 'interpreter/deltablue.py', 'interpreter/richards.py'],
113-
run+: [
114-
['grep', '-q', '-E', 'polybench:' + benchmark + ' ([a-z0-9]|-)+: FAILURE', 'split-run.txt'] +
115-
['||'] +
116-
['hwloc-bind', '--cpubind', 'node:0.core:0-3.pu:0', '--membind', 'node:0', '--'] +
117-
['mx', '--env', '${VM_ENV}', '--dy', '/truffle-enterprise', '--dy', 'graalpython', '--kill-with-sigquit'] +
118-
['--java-home', '${POLYBENCH_JVM}'] +
119-
['benchmark', 'polybench:' + benchmark, '--results-file=' + self.result_file, '--append-results'] +
120-
['--', '--jvm=native-image-java-home', '--jvm-config=' + vm_config] +
121-
['-Dnative-image.benchmark.extra-image-build-argument=-R:MaxHeapSize=500m'] +
122-
['-Dnative-image.benchmark.extra-image-build-argument=-J-Xmx24g'] +
123-
['-Dnative-image.benchmark.benchmark-output-dir=mxbuild'] +
124-
['--split-run', 'split-run.txt'] +
125-
['--', '--experimental-options', '--engine.Compilation=false'] +
126-
['||'] +
127-
['echo', 'polybench:' + benchmark + ' general: FAILURE', '>>', 'split-run.txt']
128-
for benchmark in benchmarks
129-
] + [
130-
['set-export', 'BENCH_EXIT_STATUS', '1'],
131-
['cat', 'split-run.txt'],
132-
['grep', '-q', 'FAILURE', 'split-run.txt', '||', 'set-export', 'BENCH_EXIT_STATUS', '0'],
133-
['exit', '$BENCH_EXIT_STATUS']
134-
],
135-
teardown: [self.upload],
136-
notify_groups +: ['python'],
137-
notify_emails+: ['[email protected]'],
138-
timelimit: '4:00:00',
139-
},
140-
141108
js_bench_compilation_throughput(pgo): self.vm_bench_common + common.heap.default + {
142109
local mx_libgraal = ["mx", "--env", repo_config.vm.mx_env.libgraal],
143110

@@ -309,10 +276,6 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
309276
],
310277
notify_groups +: ['python'],
311278
}
312-
] + [
313-
# PR-bench Python Interpreter mx benchmark polybench jobs
314-
self.polybench_vm_post_merge('linux', 'amd64', 'python', vm_config, 'interpreter')
315-
for vm_config in ['default', 'g1gc']
316279
] + [
317280
# NFI polybench jobs
318281
self.polybench_vm_gate('linux', 'amd64', 'nfi') + {

vm/mx.vm/suite.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@
6565
},
6666
{
6767
"name": "graalpython",
68-
<<<<<<< HEAD
6968
"version": "b283db0979c0d24da6f2ddd55879ab6f93c0fcbd",
70-
=======
71-
"version": "2315bc2d2e070546bf3a356c2ca6e4ba2455c7c8",
72-
>>>>>>> 3aa5450d718 (Introduce Summary interface and implementations to Polybench harness.)
7369
"dynamic": True,
7470
"urls": [
7571
{"url": "https://github.com/graalvm/graalpython.git", "kind": "git"},

0 commit comments

Comments
 (0)