Skip to content

Commit

Permalink
version | 0.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Yura52 committed Oct 10, 2023
1 parent ba88e5c commit d445999
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion delu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Deep Learning Utilities for PyTorch users."""
__version__ = '0.0.21.dev0'
__version__ = '0.0.21'

from . import cuda, data, hardware, nn, random, tools, utils
from ._stream import Stream
Expand Down
6 changes: 3 additions & 3 deletions delu/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ def generate_state(*args, **kwargs) -> np.ndarray:

np.random.seed(generate_state(4))

torch.manual_seed(generate_state(1, dtype=np.uint64)[0])
torch.manual_seed(int(generate_state(1, dtype=np.uint64)[0]))

if one_cuda_seed:
if not torch.cuda._is_in_bad_fork():
torch.cuda.manual_seed_all(generate_state(1, dtype=np.uint64)[0])
torch.cuda.manual_seed_all(int(generate_state(1, dtype=np.uint64)[0]))
else:
for i in range(torch.cuda.device_count()):
torch.cuda.default_generators[i].manual_seed(
generate_state(1, dtype=np.uint64)[0]
int(generate_state(1, dtype=np.uint64)[0])
)

return base_seed
Expand Down
2 changes: 1 addition & 1 deletion docs/version.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. this page is needed for themes without the version dropdown
v0.0.20
v0.0.21
============

- `development <https://yura52.github.io/delu/dev>`_
Expand Down

0 comments on commit d445999

Please sign in to comment.