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

Need GPU support for aten::_foreach_mul_.Scalar operator #626

Open
rkanagy opened this issue Aug 14, 2024 · 0 comments
Open

Need GPU support for aten::_foreach_mul_.Scalar operator #626

rkanagy opened this issue Aug 14, 2024 · 0 comments

Comments

@rkanagy
Copy link

rkanagy commented Aug 14, 2024

I have code that uses the pytorch AdamW optimizer and almost immediately it returns the following error:

\cuda\Lib\site-packages\torch\optim\adamw.py:547: UserWarning: The operator 'aten::foreach_mul.Scalar' 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 C:__w\1\s\pytorch-directml-plugin\torch_directml\csrc\dml\dml_cpu_fallback.cpp:17.)
torch.foreach_mul(device_params, 1 - lr * weight_decay)

The training loop is taking much longer that it needs to since it switches back to CPU mode, instead of using the GPU.

It would be great if this operator can be implemented ASAP, so I can get my optimizer and training loop to run at optimal speed.

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