mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
cuda._is_in_bad_fork->_C._cuda_isInBadFork (#87317)
Former is always available, while later is only available if PyTorch compiled with CUDA And if it does, then ``` $ python -c "import torch;print(torch._C._cuda_isInBadFork == torch.cuda._is_in_bad_fork)" True ``` Fixes https://github.com/pytorch/torchdynamo/issues/1709 ( at least the symptom) cc @jansel @lezcano @fdrocha Pull Request resolved: https://github.com/pytorch/pytorch/pull/87317 Approved by: https://github.com/voznesenskym, https://github.com/albanD, https://github.com/soumith, https://github.com/jansel
This commit is contained in:
parent
56b150ac63
commit
c8889f4e10
|
|
@ -332,7 +332,7 @@ class TensorVariable(VariableTracker):
|
|||
)
|
||||
elif (
|
||||
proxy.node.target == torch._C._DisableFuncTorch
|
||||
or proxy.node.target == torch._C._cuda_isInBadFork
|
||||
or proxy.node.target == torch.cuda._is_in_bad_fork
|
||||
):
|
||||
from . import UserDefinedObjectVariable
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user