Closed C1rN09 closed 1 year ago
If you try running the temporary file that's throwing the error standalone, does it throw the error? python /tmp/torchinductor_zhaoqian/ch5cogc...py
. If it throws the error, can you please share this file?
No, it doesn't throw any error. Should I paste the content of the temporary file in this issue?
I paste the minifier_launcher.py
obtained through TORCHDYNAMO_REPRO_AFTER='aot'
below. However, running it via python
gives RuntimeError: Input graph did not fail the tester
And the temporary file is shown as below:
Hope these files can help.
Easy repro
import torch
import torch._inductor.config as config
def fn(x):
return x/3
opt_fn = torch.compile(fn)
x=torch.randn(4, device="cuda", requires_grad=True)
gO = torch.rand_like(x)
out = opt_fn(x)
out.backward(gO)
Can you try patching https://github.com/pytorch/pytorch/pull/92055?
Can you try patching pytorch/pytorch#92055?
Yes, the patch solves this issue :smile:
🐛 Describe the bug
Training MMCLS resnet-50 model with
inductor
backend gotRuntimeError: Triton Error [CUDA]: invalid device context
during backward.PyTorch version: 2.0.0.dev20230109+cu116
Error logs
Minified repro
Minifier failed to reproduce the problem. Have tried to locate the function and below are steps to reproduce.