Skip to content

Commit

Permalink
seed_everything function doesn't handle HPU (#384)
Browse files Browse the repository at this point in the history
This PR adds manual seed setting for HPU in the function
`seed_everything`.

Previously the torch.manual_seed was getting set to the given seed,
which got removed in the following PR
6ffa3f3
  • Loading branch information
SanjuCSudhakaran authored Oct 14, 2024
1 parent 6cd4694 commit d8f2aa7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ def seed_everything(seed: int) -> None:
if is_xpu():
torch.xpu.manual_seed_all(seed)

if current_platform.is_hpu():
torch.hpu.manual_seed_all(seed)


def random_uuid() -> str:
return str(uuid.uuid4().hex)
Expand Down

0 comments on commit d8f2aa7

Please sign in to comment.