Commit 9f29bc2d authored by 王敏's avatar 王敏
Browse files

[fix]修复多卡eager模式精度问题

parent f9a784a7
......@@ -1028,8 +1028,11 @@ def current_stream() -> torch.cuda.Stream:
# On ROCm using the default 0 stream in combination with RCCL
# is hurting performance. Therefore creating a dedicated stream
# per process
_current_stream = torch.cuda.Stream() if current_platform.is_rocm(
) else torch.cuda.current_stream()
# fix computational precision issue in eager mode
# _current_stream = torch.cuda.Stream() if current_platform.is_rocm(
# ) else torch.cuda.current_stream()
_current_stream = torch.cuda.current_stream()
return _current_stream
......
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