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

Fixed Tensor and Dynamic input #24

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、支持expand以及crop op当shape为Tensor,以及fill_constant_batch_size_like动态shape的情况
2、修复Matmul动态shape bug
3、当shape_dict确定时使用fold_constant,不确定时不使用

input_offsets = op.input("Offsets")
if input_shape:
shape = g.get_node(input_shape[0])
shape = infer_value(shape, g.get_params()).numpy().tolist()
Copy link
Owner

Choose a reason for hiding this comment

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

这里没有支持动态

Copy link
Author

Choose a reason for hiding this comment

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

Done.


if input_offsets:
offsets = g.get_node(input_offsets[0])
offsets = infer_value(offsets, g.get_params()).numpy().tolist()
Copy link
Owner

Choose a reason for hiding this comment

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

同上

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 = x
if op.input("Shape"):
sizes = g.get_node(op.input("Shape")[0])
sizes = infer_value(sizes, g.get_params()).numpy().tolist()
Copy link
Owner

Choose a reason for hiding this comment

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

同上

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@jiangjiajun jiangjiajun merged commit 904f1eb into jiangjiajun:paddle_frontend Sep 8, 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