-
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
Move slice to phi #40736
Move slice to phi #40736
Conversation
… move_slice_to_pten
… move_slice_to_pten
… move_slice_to_pten
… move_slice_to_pten
… move_slice_to_pten
… move_slice_to_pten
… move_slice_to_pten
…Paddle into move_slice_to_pten
你的PR提交成功,感谢你对开源项目的贡献! |
paddle/fluid/operators/slice_op.h
Outdated
} | ||
} | ||
|
||
private: |
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.
这里private下好像没代码,需要删掉吗
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.
done
// the third dimension do not need padding, set padding[2] zero | ||
reshaped_padding[2].first = reshaped_padding[2].second = 0; | ||
|
||
LOG(ERROR) << "run here"; |
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.
这个log建议删除了吧
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.
done
DenseTensor* input_grad) { | ||
auto* d_out = &out_grad; | ||
auto* d_input = input_grad; | ||
d_input->mutable_data<T>(ctx.GetPlace()); |
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.
mutable_data -> ctx.Alloc
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.
done
@@ -99,10 +99,11 @@ def config(self): | |||
self.infer_flags = [1, 1, 1] | |||
self.out = self.input[1, 0:3, 2:4, :] | |||
|
|||
def test_check_output(self): | |||
self.check_output() | |||
# def test_check_output(self): |
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.
done
|
||
def test_check_grad_normal(self): | ||
print(self.input.size) |
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.
done
… move_slice_to_phi
… move_slice_to_phi
… move_slice_to_phi
… move_slice_to_phi
… move_slice_to_phi
… move_slice_to_phi
… move_slice_to_phi
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.
细节后续直接PR完善下,后续LoDTensorArray的逻辑也需要迁移,可以参考留杰的stride_slice
place, d_in_t, d_out_t, paddings, static_cast<T>(0)); | ||
} | ||
} | ||
private: |
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.
这里还有一个多余的private
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.
这个好像没有push上来,我在另外一个pr改下
TODO 已记录 |
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 for op benchmark
… move_slice_to_phi
… move_slice_to_phi
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 for op-benchmark
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
Breaking changes
PR changes
OPs
Describe
move slice to phi