-
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
[AutoParallel] Set value phi yaml #58893
[AutoParallel] Set value phi yaml #58893
Conversation
… set_value_phi_yaml
… set_value_phi_yaml
@@ -1573,10 +1573,10 @@ def test_forward_version(self): | |||
self.assertEqual(var.inplace_version, 1) | |||
|
|||
inplace_var[0] = 2 | |||
self.assertEqual(var.inplace_version, 1) | |||
self.assertEqual(var.inplace_version, 2) | |||
|
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.
这里的修改是因为原来对set_value的inplace处理是错的,而单测“迎合”了错误的处理逻辑。这里给修改掉
@@ -829,7 +829,6 @@ def test_setitem(self): | |||
np.testing.assert_allclose(out[1, 2, 3, 4], np.array(10)) | |||
self.assertEqual(x.grad.shape, [2, 3, 4, 5]) | |||
x_grad_expected = np.ones((2, 3, 4, 5)) * 2 | |||
x_grad_expected[1, 2, 3, 4] = 0 |
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.
这里之所以删掉是因为,原来中间态set_value的反向,不管有没有ValueTensor都调set_value_grad。但按着Maker的表述,如果有ValueTensor调set_value_grad,否则调assign。单测这里迎合了中间态的产品形态。
@@ -829,7 +829,6 @@ def test_setitem(self): | |||
np.testing.assert_allclose(out[1, 2, 3, 4], np.array(10)) | |||
self.assertEqual(x.grad.shape, [2, 3, 4, 5]) | |||
x_grad_expected = np.ones((2, 3, 4, 5)) * 2 | |||
x_grad_expected[1, 2, 3, 4] = 0 |
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.
这里之所以删掉是因为,原来中间态set_value的反向,不管有没有ValueTensor都调set_value_grad。但按着Maker的表述,如果有ValueTensor调set_value_grad,否则调assign。单测这里迎合了中间态的产品形态。
* set value to phi
* set value to phi
PR types
Others
PR changes
Others
Description
将set value迁移至PHI yaml。动态图走最终态。并支持AutoParallel
Pcard-73145