+
Skip to content

Conversation

coreylowman
Copy link
Owner

This is a refactor of the Gradients object to remove the need for the existing generic argument on it. The presence of it meant that you had to specify the device on Optimizers, since they heavily use Gradients as a store of extra buffers.

Turns out, since gradients stores Box<Any>, it can just depend on getting the device from the type parameter passed into its methods, like it does with Shape & Dtype.

@coreylowman coreylowman merged commit 513470e into main Jan 26, 2023
@coreylowman coreylowman deleted the remove-device-from-optims branch January 26, 2023 15:46
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

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载