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
2 changes: 2 additions & 0 deletions graph_net/torch/test_reference_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
import types
import torch
from pathlib import Path

from graph_net_bench import path_utils
Expand Down Expand Up @@ -78,6 +79,7 @@ def main(args):
assert args.device in ["cuda", "cpu"]

eval_backend_perf.set_seed(args.seed)
torch.set_default_device(args.device)

ref_dump_dir = Path(args.reference_dir)
ref_dump_dir.mkdir(parents=True, exist_ok=True)
Expand Down
1 change: 1 addition & 0 deletions graph_net_bench/torch/eval_backend_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def measure_performance(model_call, args, compiler):
def eval_single_model_with_single_backend(args):
check_and_complete_args(args)
set_seed(args.seed)
torch.set_default_device(args.device)
os.makedirs(args.output_path, exist_ok=True)
log_path = utils.get_log_path(args.output_path, args.model_path)
output_dump_path = utils.get_output_path(args.output_path, args.model_path)
Expand Down
1 change: 1 addition & 0 deletions graph_net_bench/torch/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def main(args):

initalize_seed = 123
set_seed(random_seed=initalize_seed)
torch.set_default_device(args.device)

if path_utils.is_single_model_dir(args.model_path):
test_single_model(args)
Expand Down