Skip to content
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

Implement some basic op kernel #2971

Merged
merged 9 commits into from
Jul 21, 2017

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Jul 19, 2017

No description provided.

@jacquesqiao
Copy link
Member

可以加一些python的单测

Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

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

LGTM


namespace paddle {
namespace operators {

template <typename Place>
template <typename Place, typename T>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we have paddle::kernel::Mul instead of paddle::operators::MulKernel?

Copy link
Member Author

@QiJune QiJune Jul 21, 2017

Choose a reason for hiding this comment

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

I am thinking on it, and haven't get a conclusion yet. And I will have a discussion with colleagues.

Copy link
Member

Choose a reason for hiding this comment

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

个人感觉我们的op和kernel关系比较紧密,经常需要结合着一起看,和tf还是有点区别。另外tf分开放感觉也不是非常方便。

@QiJune
Copy link
Member Author

QiJune commented Jul 21, 2017

@jacquesqiao 已经加上单测了
目前numpy.dot和eigen的乘法有一些diff,我在op_test_util.py里面做了一些修改

# TODO(qijun) The default decimal is 7, but numpy.dot and eigen.mul
# has some diff, and could not pass unittest. So I set decimal 3 here.
# And I will check this in future.
numpy.testing.assert_almost_equal(actual, expect, decimal=3)

Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM after add Python unit test

@QiJune QiJune merged commit e2880f1 into PaddlePaddle:develop Jul 21, 2017
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.

3 participants