-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support sharding #40637
Support sharding #40637
Conversation
Thanks for your contribution! |
… support_sharding
… support_sharding
… support_sharding
setattr(core.eager.Tensor, "cpu", cpu) | ||
setattr(core.eager.Tensor, "cuda", cuda) | ||
setattr(core.eager.Tensor, "_slice", _slice) | ||
setattr(core.eager.Tensor, "_numel", _numel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些在老动态图下不需要patch吗?为啥pybind.cc里会添加_slice和_numel的接口
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不需要的 这几个接口在老动态下是在imperative.cc实现的
} | ||
VLOG(6) << "Tensor copy gradient from: " << src.name(); | ||
auto* p_grad = egr::EagerUtils::mutable_grad(self->tensor); | ||
if (p_grad) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果为null就不需要拷贝了吗?不需要给用户提示吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个目前先对其了老动态图的功能,以及这个是个隐藏接口,只会给分布式使用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
This PR support
cpu
,cuda
,_clear
,_slice
,_numel
,_copy_gradient_from
for sharding in eager mode