Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

special config for xalanc; skip minor simpoints #3

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions checkpoint_scripts/dump_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ def profiling_instrs(profiling_log, spec_app, using_new_script=False):

if using_new_script:
path = new_path
else:
assert os.path.exists(new_path)
elif os.path.exists(old_path):
path = old_path
elif os.path.exists(new_path):
path = new_path
else:
print("Either {} or {} does not exist".format(old_path, new_path))
raise

with open(path, "r", encoding="utf-8") as f:
for i in f.readlines():
Expand All @@ -64,7 +70,8 @@ def cluster_weight(cluster_path, spec_app):
with open(simpoints_path, "r") as f:
for line in f.readlines():
a, b = line.split()
points.update({a: weights.get(b)})
if float(weights[b]) > 1e-4: # ignore small simpoints
points.update({a: weights.get(b)})

return points

Expand Down
5 changes: 3 additions & 2 deletions checkpoint_scripts/generate_bbl.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def __generate_run_scripts(self, spec, copies, redirect_output, using_cpu2017, w
lines.append(f"md5sum /spec{i}/{spec_bin}")

output_redirect = (" ").join([">", "out.log", "2>", "err.log"]) if redirect_output else ""
force_output_redirect = (" ").join([">", "out.log", "2>", "err.log"])

taskN = []
for i in range(0, int(copies)):
Expand All @@ -183,8 +184,8 @@ def __generate_run_scripts(self, spec, copies, redirect_output, using_cpu2017, w
if with_nemu_trap:
taskN.append("/spec_common/before_workload")

if spec_bin == "perlbench":
taskN.append(f'cd /spec{i} && ./{spec_bin} {spec_cmd} {output_redirect} ')
if spec_bin in ['xalancbmk']:
taskN.append(f'cd /spec{i} && ./{spec_bin} {spec_cmd} {force_output_redirect} ')
else:
taskN.append(f'cd /spec{i} && ./{spec_bin} {spec_cmd} {output_redirect} ')

Expand Down
3 changes: 2 additions & 1 deletion checkpoint_scripts/take_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def cluster_command(config, is_resume_from):
seedproj = random.randint(100000, 999999)
mkdir(os.path.split(os.path.join(config["utils"]["buffer"], config["cluster"]["config"], config["utils"]["workload"], "simpoints0"))[0])
bbv_path = os.path.join(config["utils"]["buffer"], config["profiling"]["config"], config["utils"]["workload"], "simpoint_bbv.gz")
maxK = 100 if config["utils"]["workload"] in ['xalancbmk'] else 30
if is_resume_from:
# make sure bbv.gz has been generated
assert os.path.exists(bbv_path)
Expand All @@ -260,7 +261,7 @@ def cluster_command(config, is_resume_from):
"-saveSimpoints", os.path.join(config["utils"]["buffer"], config["cluster"]["config"], config["utils"]["workload"], "simpoints0"),
"-saveSimpointWeights", os.path.join(config["utils"]["buffer"], config["cluster"]["config"], config["utils"]["workload"], "weights0"),
"-inputVectorsGzipped",
"-maxK", "30",
"-maxK", str(maxK),
"-numInitSeeds", "2",
"-iters", "1000",
"-seedkm", f"{seedkm}", "-seedproj", f"{seedproj}"
Expand Down
Loading