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

【PIR API adaptor No.184、185】Migrate paddle.roi_align & roi_pool into pir #58685

Merged
merged 6 commits into from
Nov 13, 2023
Merged

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Nov 4, 2023

PR types

Others

PR changes

APIs

Description

PIR API 推全升级
将 paddle.roi_align /roi_pool 迁移升级至 pir,并更新单测

test_ops_roi_align 全部通过
test_ops_roi_pool 全部通过

test_roi_pool_op 中单测覆盖率为 0/4
test_roi_align_op 中单测覆盖率为 0/6
image
image

报错栈:

2023-11-04 17:39:47 ======================================================================
2023-11-04 17:39:47 ERROR: test_check_output (test_roi_pool_op.TestROIPoolOp)
2023-11-04 17:39:47 ----------------------------------------------------------------------
2023-11-04 17:39:47 Traceback (most recent call last):
2023-11-04 17:39:47   File "/workspace/Paddle/build/test/legacy_test/test_roi_pool_op.py", line 173, in test_check_output
2023-11-04 17:39:47     self.check_output(check_pir=True)
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 2676, in check_output
2023-11-04 17:39:47     res = self.check_output_with_place(
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 2550, in check_output_with_place
2023-11-04 17:39:47     new_ir_checker.check()
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 2151, in check
2023-11-04 17:39:47     self.calculate_output()
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 2337, in calculate_output
2023-11-04 17:39:47     new_ir_outs = self.op_test._calc_new_ir_output(place)
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 1332, in _calc_new_ir_output
2023-11-04 17:39:47     ) = self.get_ir_input_attr_dict_and_feed(stop_gradient=True)
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 1267, in get_ir_input_attr_dict_and_feed
2023-11-04 17:39:47     if OpTestUtils.is_bfloat16_type(tup[1].dtype)
2023-11-04 17:39:47 IndexError: list index out of range

2023-11-04 17:39:47 ======================================================================
2023-11-04 17:39:47 ERROR: test_check_grad (test_roi_pool_op.TestROIPoolOp)
2023-11-04 17:39:47 ----------------------------------------------------------------------
2023-11-04 17:39:47 Traceback (most recent call last):
2023-11-04 17:39:47   File "/workspace/Paddle/build/test/legacy_test/test_roi_pool_op.py", line 176, in test_check_grad
2023-11-04 17:39:47     self.check_grad(['X'], 'Out', check_pir=True)
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 2880, in check_grad
2023-11-04 17:39:47     self.check_grad_with_place(
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 3137, in check_grad_with_place
2023-11-04 17:39:47     new_ir_grad = self._get_ir_gradient(
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 3565, in _get_ir_gradient
2023-11-04 17:39:47     ) = self.get_ir_input_attr_dict_and_feed(stop_gradient=False)
2023-11-04 17:39:47   File "/workspace/Paddle/build/python/op_test.py", line 1267, in get_ir_input_attr_dict_and_feed
2023-11-04 17:39:47     if OpTestUtils.is_bfloat16_type(tup[1].dtype)
2023-11-04 17:39:47 IndexError: list index out of range
2023-11-04 17:39:47 

Copy link

paddle-bot bot commented Nov 4, 2023

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Nov 4, 2023
@DrRyanHuang
Copy link
Member Author

DrRyanHuang commented Nov 4, 2023

所有单测都报这个

Traceback (most recent call last):
  File "/workspace/Paddle/build/test/legacy_test/test_roi_align_op.py", line 239, in test_check_grad
    self.check_grad(['X'], 'Out', check_pir=True)
  File "/workspace/Paddle/build/python/op_test.py", line 2880, in check_grad
    self.check_grad_with_place(
  File "/workspace/Paddle/build/python/op_test.py", line 3137, in check_grad_with_place
    new_ir_grad = self._get_ir_gradient(
  File "/workspace/Paddle/build/python/op_test.py", line 3565, in _get_ir_gradient
    ) = self.get_ir_input_attr_dict_and_feed(stop_gradient=False)
  File "/workspace/Paddle/build/python/op_test.py", line 1267, in get_ir_input_attr_dict_and_feed
    if OpTestUtils.is_bfloat16_type(tup[1].dtype)
IndexError: list index out of range

@MarioLulab
Copy link
Contributor

先把 check_grad 的单测不打开 check_pir 开关吧,然后在 pr 描述里描述具体问题,然后这个 pr 先合入。之后再提 pr 修复

Copy link
Contributor

@MarioLulab MarioLulab left a comment

Choose a reason for hiding this comment

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

LGTM
遗漏和出现问题的单测可以后续提 pr fix

test/legacy_test/test_ops_roi_align.py Outdated Show resolved Hide resolved
test/legacy_test/test_ops_roi_align.py Outdated Show resolved Hide resolved
test/legacy_test/test_ops_roi_pool.py Outdated Show resolved Hide resolved
test/legacy_test/test_ops_roi_pool.py Outdated Show resolved Hide resolved
@0x45f 0x45f merged commit 8ac6b96 into PaddlePaddle:develop Nov 13, 2023
28 checks passed
@DrRyanHuang DrRyanHuang deleted the Xavier branch November 14, 2023 06:59
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants