Skip to content

Conversation

@hedaoyuan
Copy link
Contributor

@hedaoyuan hedaoyuan commented Jan 23, 2017

Add FunctionBase::ops() and FunctionBase::check()

实现ISSUE中的特性
#892 (comment)

Copy link
Contributor

@tianbingsz tianbingsz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Approve it to move fast.


check(inputs, outputs);
// ArgType check still on here,
// not sure whether it is better to put inside the check.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can move the CHECK of argType into check funciton.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得先放calc里面吧,API的参数可能跟ASSIGN_TO/ADD_TO有关,放这里会清楚一些。

// And some Functions have the same input and output shapes,
// so you may not need to enter the complete number of arguments.
// But entering the full arguments is always correct for this interface.
virtual size_t ops(const BufferArgs& inputs, const BufferArgs& outputs) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use timestamp to measure the running time of the operators?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,后续再考虑如何获取运行实现,这里先描述operators数。

@hedaoyuan hedaoyuan merged commit 5edbe32 into PaddlePaddle:develop Jan 29, 2017
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
lizexu123 pushed a commit to lizexu123/Paddle that referenced this pull request Feb 23, 2024
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.

2 participants