Unverified Commit 9e9679c0 authored by Huazhong Ji's avatar Huazhong Ji Committed by GitHub
Browse files

fix: `str` should be used not `int` when setting env variables (#31272)

parent 9ef93fcc
...@@ -72,8 +72,8 @@ def enable_full_determinism(seed: int, warn_only: bool = False): ...@@ -72,8 +72,8 @@ def enable_full_determinism(seed: int, warn_only: bool = False):
os.environ["CUDA_LAUNCH_BLOCKING"] = "1" os.environ["CUDA_LAUNCH_BLOCKING"] = "1"
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":16:8" os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":16:8"
# The environment variable required to enable deterministic mode on Ascend NPUs. # The environment variable required to enable deterministic mode on Ascend NPUs.
os.environ["ASCEND_LAUNCH_BLOCKING"] = 1 os.environ["ASCEND_LAUNCH_BLOCKING"] = "1"
os.environ["HCCL_DETERMINISTIC"] = 1 os.environ["HCCL_DETERMINISTIC"] = "1"
torch.use_deterministic_algorithms(True, warn_only=warn_only) torch.use_deterministic_algorithms(True, warn_only=warn_only)
# Enable CUDNN deterministic mode # Enable CUDNN deterministic mode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment