Skip to content

Commit cd35a68

Browse files
committed
address #171
1 parent 8cbdfb4 commit cd35a68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "vector-quantize-pytorch"
3-
version = "1.19.1"
3+
version = "1.19.2"
44
description = "Vector Quantization - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "[email protected]" }

vector_quantize_pytorch/residual_fsq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def round_up_multiple(num, mult):
3636
def is_distributed():
3737
return dist.is_initialized() and dist.get_world_size() > 1
3838

39-
def get_maybe_sync_seed(max_size = 10_000):
40-
rand_int = torch.randint(0, max_size, ())
39+
def get_maybe_sync_seed(device, max_size = 10_000):
40+
rand_int = torch.randint(0, max_size, (), device = device)
4141

4242
if is_distributed():
4343
dist.all_reduce(rand_int)

0 commit comments

Comments
 (0)