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.248、249】 Migrate CTCLoss/RNNTLossinto pir #58661

Merged
merged 15 commits into from
Nov 27, 2023
Merged

【PIR API adaptor No.248、249】 Migrate CTCLoss/RNNTLossinto pir #58661

merged 15 commits into from
Nov 27, 2023

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Nov 3, 2023

PR types

Others

PR changes

Others

Description

PIR API 推全升级

CTCLoss 单测通过率 5/7
test_warpctc_op TestWarpCTCOpError.test_errors 未开启
TestWarpCTCOp 未开启由于:

self.inputs = {
    "Logits": (logits, self.logits_lod),
    "Label": (labels, self.labels_lod),
}

有些继承自OpTest的单测,inputs配置类似上面的代码,比如Logits输入是一个tuple,第二个参数是lod参数。这类的单测在pir下还不支持,请先排查下这类单测,先不要打开pir测试,然后我们再看下是否还会有其他问题~

RNNTLoss 单测通过率 4/5: TestWarpRNNTOpError.test_errors 未开启

Copy link

paddle-bot bot commented Nov 3, 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 3, 2023
Copy link

paddle-ci-bot bot commented Nov 13, 2023

Sorry to inform you that cc75327's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@0x45f 0x45f left a comment

Choose a reason for hiding this comment

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

self.inputs = {
    "Logits": (logits, self.logits_lod),
    "Label": (labels, self.labels_lod),
}

有些继承自OpTest的单测,inputs配置类似上面的代码,比如Logits输入是一个tuple,第二个参数是lod参数。这类的单测在pir下还不支持,请先排查下这类单测,先不要打开pir测试,然后我们再看下是否还会有其他问题~

Copy link
Contributor

@0x45f 0x45f left a comment

Choose a reason for hiding this comment

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

看CI报错是test_check_grad会有精度问题,先把test_check_grad的check_pir设置为False吧,我找相关同学看下~

test/legacy_test/test_warpctc_op.py Outdated Show resolved Hide resolved
@DrRyanHuang
Copy link
Member Author

DrRyanHuang commented Nov 15, 2023

FAIL: test_eager_ctcloss (test_warpctc_op.TestCTCLossAPICase)

这个应该和 pir 关系不大,也出现了数值问题,可以帮忙看一下嘛🙏 @0x45f

2023-11-15 15:51:21 ======================================================================
2023-11-15 15:51:21 FAIL: test_eager_ctcloss (test_warpctc_op.TestCTCLossAPICase)
2023-11-15 15:51:21 ----------------------------------------------------------------------
2023-11-15 15:51:21 Traceback (most recent call last):
2023-11-15 15:51:21   File "C:\home\workspace\Paddle\build\test\legacy_test\test_warpctc_op.py", line 741, in test_eager_ctcloss
2023-11-15 15:51:21     test_functional_api()
2023-11-15 15:51:21   File "C:\home\workspace\Paddle\build\test\legacy_test\test_warpctc_op.py", line 737, in test_functional_api
2023-11-15 15:51:21     np.testing.assert_allclose(
2023-11-15 15:51:21   File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing\_private\utils.py", line 1504, in assert_allclose
2023-11-15 15:51:21     assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
2023-11-15 15:51:21   File "C:\Python39\lib\contextlib.py", line 79, in inner
2023-11-15 15:51:21     return func(*args, **kwds)
2023-11-15 15:51:21   File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing\_private\utils.py", line 797, in assert_array_compare
2023-11-15 15:51:21     raise AssertionError(msg)
2023-11-15 15:51:21 AssertionError: 
2023-11-15 15:51:21 Not equal to tolerance rtol=1e-05, atol=1
2023-11-15 15:51:21 Mismatched elements: 1 / 1 (100%)
2023-11-15 15:51:21 Max absolute difference: 1.0417404
2023-11-15 15:51:21 Max relative difference: 0.06375698
2023-11-15 15:51:21  x: array(17.380978, dtype=float32)
2023-11-15 15:51:21  y: array(16.339237, dtype=float32)
2023-11-15 15:51:21 ----------------------------------------------------------------------

@xiaoguoguo626807
Copy link
Contributor

#59189 反向问题修复

test/legacy_test/test_warpctc_op.py Outdated Show resolved Hide resolved
test/legacy_test/test_warprnnt_op.py Outdated Show resolved Hide resolved
test/legacy_test/test_warprnnt_op.py Outdated Show resolved Hide resolved
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

@0x45f 0x45f merged commit 32af85e into PaddlePaddle:develop Nov 27, 2023
@DrRyanHuang DrRyanHuang deleted the CTCRNN branch November 27, 2023 06:35
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.

4 participants