Skip to content

Commit

Permalink
Adds patch tags and workload for Runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
vulder committed Oct 5, 2023
1 parent 66ae93b commit bbceb1a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
9 changes: 8 additions & 1 deletion varats-core/varats/experiment/workload_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,18 @@ def filter_by_config(prj_cmd: ProjectCommand) -> bool:
return prj_cmd.command.can_be_executed_by(extra_options, patches)
return True

return [
workloads = [
cmd for cmd in project_cmds
if cmd.path.name == binary.name and filter_by_config(cmd)
]

if not workloads:
print(
f"Could not find any workloads for {project.name}."
f"Tags[{requested_workload_tags}]"
)
return workloads


def create_workload_specific_filename(
filename_base: str,
Expand Down
16 changes: 10 additions & 6 deletions varats/varats/experiments/vara/feature_perf_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ def setup_actions_for_vara_experiment(
)

patch_provider = PatchProvider.get_provider_for_project(project)
patches = patch_provider.get_patches_for_revision(
ShortCommitHash(project.version_of_primary)
)
patches = [
p for p in patch_provider.
get_patches_for_revision(ShortCommitHash(project.version_of_primary))
if 'perf_prec' in p.tags

Check failure on line 408 in varats/varats/experiments/vara/feature_perf_precision.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/experiments/vara/feature_perf_precision.py#L408

error: Unsupported right operand type for in ("Optional[set[str]]") [operator]
Raw output
varats/varats/experiments/vara/feature_perf_precision.py:408:12: error: Unsupported right operand type for in ("Optional[set[str]]")  [operator]
]
print(f"{patches=}")

patch_steps = []
Expand Down Expand Up @@ -643,9 +645,11 @@ def actions_for_project(
)

patch_provider = PatchProvider.get_provider_for_project(project)
patches = patch_provider.get_patches_for_revision(
ShortCommitHash(project.version_of_primary)
)
patches = [
p for p in patch_provider.get_patches_for_revision(
ShortCommitHash(project.version_of_primary)
) if 'perf_prec' in p.tags

Check failure on line 651 in varats/varats/experiments/vara/feature_perf_precision.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/experiments/vara/feature_perf_precision.py#L651

error: Unsupported right operand type for in ("Optional[set[str]]") [operator]
Raw output
varats/varats/experiments/vara/feature_perf_precision.py:651:18: error: Unsupported right operand type for in ("Optional[set[str]]")  [operator]
]
print(f"{patches=}")

patch_steps = []
Expand Down
13 changes: 13 additions & 0 deletions varats/varats/projects/perf_tests/feature_perf_cs_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,19 @@ class SynthIPRuntime(VProject):
]

WORKLOADS = {
WorkloadSet(WorkloadCategory.EXAMPLE): [
VCommand(
SourceRoot("SynthIPRuntime") / RSBinary("Runtime"),
"-c",
"<",
"geo-maps/countries-land-1km.geo.json",
">",
"geo-maps/countries-land-1km.geo.json.compressed",
label="countries-land-1km",
creates=["geo-maps/countries-land-1km.geo.json.compressed"],
requires_all_args={"-c"}
)
],
WorkloadSet(WorkloadCategory.SMALL): [
VCommand(
SourceRoot("SynthIPRuntime") / RSBinary("Runtime"),
Expand Down

0 comments on commit bbceb1a

Please sign in to comment.