Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add random seed settings for BI100 #66

Merged
merged 5 commits into from
May 10, 2023
Merged
Changes from 1 commit
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
Next Next commit
ILUVATAR: set seed for iluvatar
  • Loading branch information
颜瑞 committed Apr 26, 2023
commit 7680826799f7b7afd8bea22ec0053acb599eb46a
7 changes: 7 additions & 0 deletions training/benchmarks/driver/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,15 @@ def set_seed(self, seed: int, vendor: str):
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
if lower_vendor == "iluvatar":
yan-rui marked this conversation as resolved.
Show resolved Hide resolved
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.benchmark = True
torch.backends.cudnn.deterministic = True
elif lower_vendor == "kunlunxin":
torch.manual_seed(seed)

yan-rui marked this conversation as resolved.
Show resolved Hide resolved
else:
# TODO 其他厂商设置seed,在此扩展
pass