openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
6.12k stars 2.04k forks source link

Implement CPU plugin just-in-time emitter for Mod operation #24574

Closed awayzjj closed 1 week ago

awayzjj commented 2 weeks ago

Closes https://github.com/openvinotoolkit/openvino/issues/24061

Details:

Tickets:

eshoguli commented 1 week ago

@awayzjj, thanks for contribution. Looks like you are close to finishing. Please, rebase onto the latest remote master. The branch has to be rebased before CI builds will be started.

ilya-lavrenov commented 1 week ago

build_jenkins

awayzjj commented 1 week ago

@eshoguli Hi, I have merged the master branch master into my branch.

But three CI checks( ie_tests_cpu_spr_ubuntu20_release, ie_tests_cpu_debian_9_arm_release, build_win_vs2019_release) failed.

Could you please show me some logs of failed test cases or give me some suggestions? Thank you very much!

ilya-lavrenov commented 1 week ago

build_jenkins

awayzjj commented 1 week ago

@eshoguli @a-sidorova Hi, 2 CI checks(ie_tests_cpu_debian_9_arm_release, ci/jenkins) failed, but I could not see any logs.

Could you please show me some logs of failed test cases or give me some suggestions? Thank you very much!

a-sidorova commented 1 week ago

@eshoguli @a-sidorova Hi, 2 CI checks(ie_tests_cpu_debian_9_arm_release, ci/jenkins) failed, but I could not see any logs.

Could you please show me some logs of failed test cases or give me some suggestions? Thank you very much!

There are 38 failed tests smoke_CompareWithRefs_(4|5)D_MemOrder.*eltwise_op_type=Mod_.* with the same exception:

../../../../../../../repos/openvino/src/plugins/intel_cpu/tests/functional/utils/cpu_test_utils.cpp:220 Value of: primTypeCheck(primType) Actual: false Expected: true primType is unexpected : ref_f32 Expected : acl_f32

dmitry-gorokhov commented 1 week ago

@awayzjj Have you tried to run related tests locally? The issue description contains details what tests should be run to check the implementation. I expect that running these tests on ARM machine will show the same error CI is showing. image

awayzjj commented 1 week ago

@a-sidorova @dmitry-gorokhov Thank you for your reply! I failed to reproduce the failed test cases on my ARM server with ubuntu18.04 as the following results shows.

(base) root@ecs-7714:/mnt/data/openvino# cat /proc/version
Linux version 4.15.0-70-generic (buildd@bos02-arm64-021) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #79-Ubuntu SMP Tue Nov 12 10:36:10 UTC 2019
./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke_CompareWithRefs_4D_MemOrder*eltwise_op_type=Mod_*" --gtest_break_on_failure
截屏2024-05-22 22 15 23 截屏2024-05-22 22 15 35
./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke_CompareWithRefs_5D_MemOrder*eltwise_op_type=Mod_*" --gtest_break_on_failure
截屏2024-05-22 22 23 18 截屏2024-05-22 22 23 25
nohup ./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke*Eltwise*" &
截屏2024-05-22 22 28 18

Do I have to switch to debian 9 since the ie_tests_cpu_debian_9_arm_release job failed but ie_tests_cpu_ubuntu20_arm64_release job succeed? But it is hard for me to find such a ARM machine with debian 9 :)

dmitry-gorokhov commented 1 week ago

@a-sidorova @dmitry-gorokhov Thank you for your reply! I failed to reproduce the failed test cases on my ARM server with ubuntu18.04 as the following results shows.

(base) root@ecs-7714:/mnt/data/openvino# cat /proc/version
Linux version 4.15.0-70-generic (buildd@bos02-arm64-021) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #79-Ubuntu SMP Tue Nov 12 10:36:10 UTC 2019
./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke_CompareWithRefs_4D_MemOrder*eltwise_op_type=Mod_*" --gtest_break_on_failure

截屏2024-05-22 22 15 23 截屏2024-05-22 22 15 35

./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke_CompareWithRefs_5D_MemOrder*eltwise_op_type=Mod_*" --gtest_break_on_failure

截屏2024-05-22 22 23 18 截屏2024-05-22 22 23 25

nohup ./bin/aarch64/Debug/ov_cpu_func_tests --gtest_filter="*smoke*Eltwise*" &
截屏2024-05-22 22 28 18

Do I have to switch to debian 9 since the ie_tests_cpu_debian_9_arm_release job failed but ie_tests_cpu_ubuntu20_arm64_release job succeed? But it is hard for me to find such a ARM machine with debian 9 :)

Thanks! The root-cause is clear now. Failed build was actually launched on 32bit ARM, while JIT emitter you implemented is enabled for 64bit ARM platforms. So this is expected behavior that reference kernel is used on ARM32. To fix the CI you need to return "ref" instead of "acl" for MOD operation: https://github.com/openvinotoolkit/openvino/pull/24574/files#diff-21f2c1bfca1192c4f235897aeff3fc17362616a730bb77b46070448bf7500731L264

awayzjj commented 1 week ago

@dmitry-gorokhov Thank you very much! I have incorporated your suggestions. Could you please review the PR?

dmitry-gorokhov commented 1 week ago

build_jenkins

awayzjj commented 1 week ago

@dmitry-gorokhov The ie_tests_cpu_debian_9_arm_release job passed!

But the ie_tests_ie_python_api_arm_ubuntu20_arm64_release failed, could you please show me the failed test cases?

dmitry-gorokhov commented 1 week ago

@dmitry-gorokhov The ie_tests_cpu_debian_9_arm_release job passed!

But the ie_tests_ie_python_api_arm_ubuntu20_arm64_release failed, could you please show me the failed test cases?

The fails seem to be not related to your changes. I restarted the jobs to check CI instability.

dmitry-gorokhov commented 1 week ago

@awayzjj The PR is merged. Thanks for the contribution!