Skip to content
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
17 changes: 15 additions & 2 deletions app/src/html/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,24 @@
<v-layout>
<v-container fluid>
<v-card tile>
<v-card-title>Experiment: {{ data.runName }}</v-card-title>
<v-card-title>Experiment: {{ data.experiment }}</v-card-title>
</v-card>
<v-card tile>
<v-card-title>Data Path: {{ data.data_path }}</v-card-title>
<v-card-title>Data path: {{ data.data_path }}</v-card-title>
</v-card>
<v-card tile>
<v-card-title>.callflow save path: {{ data.save_path }}</v-card-title>
</v-card>
<v-card tile>
<v-card-title>Filter by attribute: {{ data.filter_by }}</v-card-title>
</v-card>
<v-card tile>
<v-card-title>Filter percentage: {{ data.filter_perc }}</v-card-title>
</v-card>
<v-card tile>
<v-card-title>Group by attribute: {{ data.group_by }}</v-card-title>
</v-card>

<v-card tile>
<v-card-title>Runtime Information</v-card-title>
<v-data-table
Expand Down
14 changes: 3 additions & 11 deletions callflow/callflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,12 @@ def _process_single(self, dataset):
supergraph.filter_gf(mode="single")

# Group by module.
supergraph.group_gf(group_by="module")
supergraph.group_gf(group_by=self.config["group_by"])

# Store the graphframe.
supergraph.write_gf("entire")

supergraph.single_auxiliary(
dataset=dataset, binCount=20, process=True # _name,
)
supergraph.single_auxiliary(dataset=dataset, binCount=20, process=True)

def _process_ensemble(self, datasets):
"""
Expand Down Expand Up @@ -157,17 +155,11 @@ def _process_ensemble(self, datasets):
self.config, "ensemble", mode="process", supergraphs=single_supergraphs
)

# Write the graphframe to file.
# ensemble_supergraph.write_gf("entire")

# Filter the ensemble graphframe.
ensemble_supergraph.filter_gf(mode="ensemble")

# Write the filtered graphframe.
# ensemble_supergraph.write_gf("filter")

# Group by module.
ensemble_supergraph.group_gf(group_by="module")
ensemble_supergraph.group_gf(group_by=self.config["group_by"])

# Write the grouped graphframe.
ensemble_supergraph.write_gf("group")
Expand Down
22 changes: 19 additions & 3 deletions callflow/operations/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
},
}

_SUPPORTED_PROFILE_FORMATS = ["hpctoolkit", "caliper_json", "caliper"]


class ArgParser:
"""
Expand Down Expand Up @@ -192,6 +194,7 @@ def _read_config(args: argparse.Namespace):
json["runs"]
)
elif "runs" not in json and "profile_format" in json:
assert json["profile_format"] in _SUPPORTED_PROFILE_FORMATS
scheme["properties"] = _SCHEME_PROFILE_FORMAT_MAPPER[
json["profile_format"]
](json["runs"])
Expand All @@ -202,10 +205,21 @@ def _read_config(args: argparse.Namespace):
scheme["callsite_module_map"] = ArgParser._process_module_map(
scheme["module_callsite_map"]
)
scheme["filter_perc"] = json["scheme"]["filter_perc"]
scheme["filter_by"] = json["scheme"]["filter_by"]
scheme["group_by"] = json["scheme"]["group_by"]

if args.filter_by:
scheme["filter_by"] = args.filter_by
else:
scheme["filter_by"] = json["scheme"]["filter_by"]

if args.filter_perc:
scheme["filter_perc"] = args.filter_perc
else:
scheme["filter_perc"] = json["scheme"]["filter_perc"]

if args.group_by:
scheme["group_by"] = args.group_by
else:
scheme["group_by"] = json["scheme"]["group_by"]
return scheme

@staticmethod
Expand All @@ -227,6 +241,8 @@ def _scheme_dataset_map_default(run_props: dict):
if "profile_format" not in data:
raise Exception(f"Profile format not specified for the dataset: {name}")

assert data["profile_format"] in _SUPPORTED_PROFILE_FORMATS

scheme["profile_format"][name] = data["profile_format"]
return scheme

Expand Down