Skip to content

Commit

Permalink
Merge pull request #66 from yan-rui/main
Browse files Browse the repository at this point in the history
add random seed settings for BI100
  • Loading branch information
upvenly authored May 10, 2023
2 parents a3b19b8 + c4340c0 commit eee35cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions training/benchmarks/driver/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def set_seed(self, seed: int, vendor: str):
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
elif lower_vendor == "iluvatar":
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
elif lower_vendor == "kunlunxin":
torch.manual_seed(seed)
else:
Expand Down

0 comments on commit eee35cd

Please sign in to comment.