Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aten::native_group_norm_backward is not currently supported on the DML backend and will fall back to run on the CPU #678

Open
Inokinoki opened this issue Dec 30, 2024 · 0 comments

Comments

@Inokinoki
Copy link

Got user warning but trainning failed:

/***/venv/lib/python3.10/site-packages/torch/autograd/graph.py:769: UserWarning: The operator 'aten::native_group_norm_backward' is not currently supported on the DML backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /__w/1/s/pytorch-directml-plugin/torch_directml/csrc/dml/dml_cpu_fallback.cpp:15.)
  return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
Traceback (most recent call last):
  File "/***/sd-scripts/train_network.py", line 1246, in <module>
    trainer.train(args)
  File "/***/sd-scripts/train_network.py", line 1009, in train
    accelerator.backward(loss)
  File "/***/venv/lib/python3.10/site-packages/accelerate/accelerator.py", line 1905, in backward
    loss.backward(**kwargs)
  File "/***/venv/lib/python3.10/site-packages/torch/_tensor.py", line 521, in backward
    torch.autograd.backward(
  File "/***/venv/lib/python3.10/site-packages/torch/autograd/__init__.py", line 289, in backward
    _engine_run_backward(
  File "/***/venv/lib/python3.10/site-packages/torch/autograd/graph.py", line 769, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: Unknown error -2005270523

Then it failed.

I checked that there is already aten::native_group_norm implementation in DirectML:

202 aten::native_group_norm [torch.float16, torch.float32]

But not backward

@Inokinoki Inokinoki changed the title `aten::native_group_norm_backward' is not currently supported on the DML backend and will fall back to run on the CPU aten::native_group_norm_backward is not currently supported on the DML backend and will fall back to run on the CPU Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant