Skip to content

Commit a03ca99

Browse files
authored
[ez] Use noquant to make dashboard logic easier (#1430)
Summary: A small fix for output json results for llama, sam, sam2 benchmarks to make the code easier for calculating geomean speedup of autoquant v.s. noquant Test Plan: local test Reviewers: Subscribers: Tasks: Tags:
1 parent a5a53a2 commit a03ca99

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

examples/sam2_amg_server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def main(checkpoint_path,
658658
headers = ["name", "dtype", "device", "arch", "metric", "actual", "target"]
659659
name = "sam2-" + model_type
660660
arch = get_arch_name()
661-
dtype = "autoquant" if use_autoquant else ("compile" if fast else "base")
661+
dtype = "autoquant" if use_autoquant else "noquant"
662662
avg_time_per_run, max_memory_allocated_bytes, max_memory_allocated_percentage = result
663663
memory_result = [name, dtype, device, arch, "memory(MiB)", max_memory_allocated_bytes, None]
664664
memory_percent_result = [name, dtype, device, arch, "memory(%)", max_memory_allocated_percentage, None]

torchao/_models/llama/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ def callback(x):
940940
headers = ["name", "dtype", "device", "arch", "metric", "actual", "target"]
941941
name = checkpoint_path.parent.name
942942
arch = get_arch_name()
943-
dtype = quantization or str(precision)
943+
dtype = quantization or "noquant"
944944
memory_result = [name, dtype, device, arch, "mem/s", bandwidth, None]
945945
performance_result = [name, dtype, device, arch, "tok/s", tokpersec, None]
946946
write_json_result = write_json_result_local if output_json_local else write_json_result_ossci

torchao/_models/sam/eval_combo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def mlp_only(mod, name):
467467
headers = ["name", "dtype", "device", "arch", "metric", "actual", "target"]
468468
name = sam_model_type
469469
arch = get_arch_name()
470-
dtype = compress or str(use_half) or "torch.float32"
470+
dtype = compress or "noquant"
471471
memory_result = [name, dtype, device, arch, "memory(MiB)", max_memory_allocated_bytes, None]
472472
performance_result = [name, dtype, device, arch, "img_s(avg)", img_s, None]
473473
write_json_result = write_json_result_local if output_json_local else write_json_result_ossci

torchao/_models/sam2/build_sam.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def build_sam2(
8787
"++model.sam_mask_decoder_extra_args.dynamic_multimask_stability_thresh=0.98",
8888
]
8989
# Read config and init model
90-
import os
91-
print("cur path:", os.getcwd())
9290
cfg = compose(config_name=config_file, overrides=hydra_overrides_extra)
9391
OmegaConf.resolve(cfg)
9492
model = instantiate(cfg.model, _recursive_=True)

0 commit comments

Comments
 (0)