Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/paddle/jit/sot/utils/paddle_api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def is_directly_run_api(api):
paddle.base.libpaddle.is_compiled_with_ipu,
paddle.base.libpaddle.is_compiled_with_xpu,
paddle.base.libpaddle.is_compiled_with_mkldnn,
paddle.base.libpaddle.is_compiled_with_onednn,
paddle.base.libpaddle.is_compiled_with_nccl,
paddle.base.libpaddle.is_compiled_with_mpi,
paddle.base.libpaddle.is_compiled_with_mpi_aware,
Expand Down
6 changes: 5 additions & 1 deletion test/sot/test_builtin_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,10 @@ def test_native_code_function():
res5 = paddle.base.libpaddle.is_compiled_with_custom_device("npu")
res6 = paddle.base.libpaddle.is_compiled_with_ipu()
res7 = paddle.base.libpaddle.is_compiled_with_xpu()
res8 = paddle.base.libpaddle.is_compiled_with_mkldnn()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PaddlePaddle 3.3 会移除 is_compiled_with_mkldnn 么?如果只是弃用而不是移除,这里的测试需要保留,同时添加 is_compiled_with_onednn 的测试,否则会影响下游用户的使用,如果确定是移除,那么这里可以替换

以及需要单独在 python/paddle/jit/sot/utils/paddle_api_config.py 添加 is_compiled_with_onednn 才可能跑通这里的单测

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PaddlePaddle 3.3是弃用,PaddlePaddle 4.0移除,已增加 is_compiled_with_onednn 和 配置

res8_deprecated = (
paddle.base.libpaddle.is_compiled_with_mkldnn()
) # Paddle 3.3 deprecated
res8 = paddle.base.libpaddle.is_compiled_with_onednn()
res9 = paddle.base.libpaddle.is_compiled_with_nccl()
res10 = paddle.base.libpaddle.is_compiled_with_mpi()
res11 = paddle.base.libpaddle.is_compiled_with_mpi_aware()
Expand All @@ -474,6 +477,7 @@ def test_native_code_function():
res5,
res6,
res7,
res8_deprecated,
res8,
res9,
res10,
Expand Down