mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Rllib] Torch Backwards Compatibility (#16813)
This commit is contained in:
parent
521a05834d
commit
33f31f53c8
1 changed files with 7 additions and 2 deletions
|
@ -516,8 +516,13 @@ class RolloutWorker(ParallelIteratorWorker):
|
|||
torch.version.cuda) >= 10.2:
|
||||
os.environ["CUBLAS_WORKSPACE_CONFIG"] = "4096:8"
|
||||
else:
|
||||
# Not all Operations support this.
|
||||
torch.use_deterministic_algorithms(True)
|
||||
from distutils.version import LooseVersion
|
||||
if LooseVersion(
|
||||
torch.__version__) >= LooseVersion("1.8.0"):
|
||||
# Not all Operations support this.
|
||||
torch.use_deterministic_algorithms(True)
|
||||
else:
|
||||
torch.set_determinstic(True)
|
||||
# This is only for Convolution no problem.
|
||||
torch.backends.cudnn.deterministic = True
|
||||
# Tf2.x.
|
||||
|
|
Loading…
Add table
Reference in a new issue