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 Tensor】Fix bugs related to converting unit tests of the old ir-trt into pir-trt #71083

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from

Conversation

PolaKuma
Copy link
Contributor

@PolaKuma PolaKuma commented Feb 11, 2025

PR Category

Inference

PR Types

Bug fixes

Description

card-71500

  • 解决了 share_data、unary 单测问题。见:【Paddle TensorRT】fix PaddleX pir-trt 1 #71163
  • 解决了 set_value、grid_sampler、index_select、einsum、index_put 单测问题,program_config尾插法导致pir_program组网与program_config的定义颠倒了,不改基类,直接改旧单测的inputs顺序
  • 解决了 instance_norm、clip、affine_channel 单测问题,去掉marker不该进的单测
  • 解决了 preln_residual_bias 单测问题,能跑通
  • 解决了 affine_channel、instance_norm 单测问题,marker没问题,只支持dims=4进入trt,去掉另外两种情况
  • 解决了 where 单测问题,旧ir单测dynamic_shape多传了condition_data_bool参数,直接去掉
  • 解决了 shuffle_channel、anchor_generator、group_norm 单测问题,定义中不支持fp16,所以用fp16IO会导致找不到定义,去掉set_input_type(fp16),详细见 Enable FP16 IO in TRT convert tests #58569
  • 解决了 gather、gather_nd、take_along_axis 单测问题,调换input组网顺序+Input类生成时候可能导致axis超界
  • 解决了 instance_norm 单测问题,去掉marker不该进的单测
  • 解决了 yolo_box 单测问题,组网构建反了+yolo_box不支持int32输入情况,因此需要修改auto_scan_test单测基类
  • 解决了 linear_interp_v2 单测问题,scale在trt下不是输入而是属性,构建有问题
  • 解决了 prelu 单测问题,trt.Weights用numpy()转换shape有问题,用paddle_op.operate[1].shape即可
  • 解决了 preln_residual_bias、leaky_relu 单测问题,修改后即可跑通,但是alpha在pd_op.h中叫negative_slope了
  • 解决了 embedding 单测问题,去掉生成动态shape的data+去掉program_config.set_input_type(np.float16)

Copy link

paddle-bot bot commented Feb 11, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

self.input_max_data = np.random.randint(
low, high, size=self.max_input_shape
).astype(self.input_data_type)
self.input_min_data = np.zeros(self.min_input_shape).astype(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

考虑到生成axis, index等int类型的input_data时候有范围限制,这里只生成zeros会保险一些

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.

1 participant