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

Paddle frontend #25

Merged

Conversation

wjj19950828
Copy link

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

Do follow Contributes

1、Add ops:any、floor_divide、less_than、max、mean、min、mod、not_equal、pow、topk、sum、prod、logsumexp

inputs = paddle.cast(inputs, "bool")
inputs = paddle.all(inputs)
return paddle.cast(inputs, "int32")
def test_forward_pow():
Copy link
Owner

Choose a reason for hiding this comment

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

单测加入对输入为tensor的处理情况

Copy link
Author

Choose a reason for hiding this comment

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

Done.

out = get_relay_op("logsumexp")(input_x, axis=axis, keepdims=keepdims)
if not axis and not keepdims:
out = _op.expand_dims(out, axis=0)
g.add_node(op.output("Out")[0], out)
Copy link
Owner

Choose a reason for hiding this comment

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

此代码与reduce重复,看下是否可以合在一起

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@@ -744,6 +746,15 @@ def convert_leaky_relu(g, op, block):
g.add_node(op.output("Out")[0], out)


def convert_less_than(g, op, block):
Copy link
Owner

Choose a reason for hiding this comment

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

看下是否可以放到elementwise里去

@@ -921,6 +946,15 @@ def convert_mul(g, op, block):
g.add_node(op.output("Out")[0], out)


def convert_not_equal(g, op, block):
Copy link
Owner

Choose a reason for hiding this comment

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

同上

@jiangjiajun jiangjiajun merged commit 986914f into jiangjiajun:paddle_frontend Sep 9, 2021
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