Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Attia Radwan committed Aug 26, 2022
1 parent 4c21738 commit 19f0a28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -341,12 +341,12 @@ jobs:
- run_nvidia_smi
- benchmark_layers_integration_test:
device: "cuda"
layers: "groupnorm gsm_groupnorm instancenorm gsm_instancenorm layernorm gsm_layernorm"
layers: "groupnorm gsm_groupnorm instancenorm gsm_instancenorm layernorm gsm_layernorm dpmha"
runtime_ratio_threshold: "2.5"
memory_ratio_threshold: "1.6"
- benchmark_layers_integration_test:
device: "cuda"
layers: linear gsm_linear
layers: "linear gsm_linear"
runtime_ratio_threshold: "3.6"
memory_ratio_threshold: "13.0"
- benchmark_layers_integration_test:
Expand Down
13 changes: 7 additions & 6 deletions benchmarks/utils.py
Expand Up @@ -220,12 +220,13 @@ def generate_report(path_to_results: str, save_path: str, format: str) -> None:
)

def add_ratio(df, metric, variant):
if variant in df.columns.get_level_values("variant"):
df[(metric, f"{variant}/control")] = (
df.loc[:, (metric, variant)] / df.loc[:, (metric, "control")]
)
else:
df[(metric, f"{variant}/control")] = np.nan
if variant not in df.columns.get_level_values("variant"):
for ametric in df.columns.get_level_values(0):
df[(ametric, variant)] = np.nan

df[(metric, f"{variant}/control")] = (
df.loc[:, (metric, variant)] / df.loc[:, (metric, "control")]
)

if "control" in results["variant"].tolist():
add_ratio(pivot, "runtime", "dp")
Expand Down

0 comments on commit 19f0a28

Please sign in to comment.