【PIR API adaptor No.260、274-278、292】 Migrate some ops into pir #60172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
任务 issue: #58067
PIR API 推全升级
paddle.nn.Mish迁移升级至 pir,并更新单测,单测覆盖率(3/4)paddle.audio.features.MFCC迁移升级至 pir,单测覆盖率(0/0)paddle.audio.features.MelSpectrogram迁移升级至 pir,单测覆盖率(0/0)将
paddle.audio.functional.mel_to_hz迁移升级至 pir,并更新单测,单测覆盖率(1/1)将
paddle.audio.functional.hz_to_mel迁移升级至 pir,并更新单测,单测覆盖率(1/1)将
paddle.audio.functional.mel_frequencies迁移升级至 pir,并更新单测,单测覆盖率(0/1)发现问题: test_audio_function_mel_static 单测加上
@test_with_pir_api后出现精度问题,旧ir静态图未出现精度问题,此问题后续提 pr 去 fix,先取消 pir 模式的单测。报错栈Mismatched elements: 11 / 256 (4.3%) Max absolute difference: 0.00182431 Max relative difference: 1.82431386e-07 x: array([5.000e-01, 1.318e+01, 2.585e+01, 3.853e+01, 5.120e+01, 6.388e+01, 7.655e+01, 8.923e+01, 1.019e+02, 1.146e+02, 1.273e+02, 1.399e+02, 1.526e+02, 1.653e+02, 1.780e+02, 1.906e+02, 2.033e+02, 2.160e+02,... y: array([5.000e-01, 1.318e+01, 2.585e+01, 3.853e+01, 5.120e+01, 6.388e+01, 7.655e+01, 8.923e+01, 1.019e+02, 1.146e+02, 1.273e+02, 1.399e+02, 1.526e+02, 1.653e+02, 1.780e+02, 1.906e+02, 2.033e+02, 2.160e+02,... ====================================================================== FAIL: test_audio_function_mel_static_32 (__main__.TestAudioFuncitons) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/parameterized/parameterized.py", line 620, in standalone_func return func(*(a + p.args), **p.kwargs, **kw) File "/luq/docker/paddle-docker/Paddle/build/python/paddle/pir_utils.py", line 115, in impl func(*args, **kwargs) File "test_audio_functions.py", line 179, in test_audio_function_mel_static np.testing.assert_almost_equal( File "/usr/local/lib/python3.8/dist-packages/numpy/testing/_private/utils.py", line 583, in assert_almost_equal return assert_array_almost_equal(actual, desired, decimal, err_msg) File "/usr/local/lib/python3.8/dist-packages/numpy/testing/_private/utils.py", line 1046, in assert_array_almost_equal assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose, File "/usr/local/lib/python3.8/dist-packages/numpy/testing/_private/utils.py", line 844, in assert_array_compare raise AssertionError(msg) AssertionError: Arrays are not almost equal to 3 decimals Mismatched elements: 11 / 256 (4.3%) Max absolute difference: 0.00182431 Max relative difference: 1.82431386e-07 x: array([1.000e+00, 1.367e+01, 2.635e+01, 3.902e+01, 5.169e+01, 6.437e+01, 7.704e+01, 8.971e+01, 1.024e+02, 1.151e+02, 1.277e+02, 1.404e+02, 1.531e+02, 1.658e+02, 1.784e+02, 1.911e+02, 2.038e+02, 2.165e+02,... y: array([1.000e+00, 1.367e+01, 2.635e+01, 3.902e+01, 5.169e+01, 6.437e+01, 7.704e+01, 8.971e+01, 1.024e+02, 1.151e+02, 1.277e+02, 1.404e+02, 1.531e+02, 1.658e+02, 1.784e+02, 1.911e+02, 2.038e+02, 2.165e+02,...paddle.audio.functional.power_to_db迁移升级至 pir,并更新单测,单测覆盖率(1/1)