Skip to content

Commit

Permalink
Fix a bug in group_bench userbenchmark
Browse files Browse the repository at this point in the history
Summary: Fix a bug to log the CUDA device environment.

Reviewed By: aaronenyeshi

Differential Revision: D53362754

fbshipit-source-id: 890f5953b4feabe0b1b5fe2f969e108f2bcced60
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Feb 6, 2024
1 parent ab07f16 commit 71cc87a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userbenchmark/group_bench/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ def run(args: List[str]):
except KeyboardInterrupt:
print("User keyboard interrupted!")
result = get_output_json(BM_NAME, results)
if group_config.baseline_config.device == 'cuda':
if group_config.baseline_configs[0].device == 'cuda':
import torch
result["environ"]["device"] = torch.cuda.get_device_name()
print(json.dumps(result))
with open(args.output, 'w') as f:
json.dump(result, f, indent=4)
print(json.dumps(result))

0 comments on commit 71cc87a

Please sign in to comment.