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

#Issue 27715: Implement RegPrints Class for ARM64 SIMD Platforms #27829

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

amanmogal
Copy link

@amanmogal amanmogal commented Nov 29, 2024

Details:

New File: src/plugins/intel_cpu/src/emitters/plugin/aarch64/debug_capabilities.hpp
Class: RegPrints

Methods:

print_gp_registers: Prints the contents of general-purpose registers.

print_vector_registers: Prints the contents of vector registers.

usage_description: Provides a detailed explanation of how to use the RegPrints class for debugging.

Helper Methods:

print_gp_register: Helper function to print a single general-purpose register.

print_vector_register: Helper function to print a single vector register.

Functionality:

The RegPrints class includes methods to print the contents of both general-purpose and vector registers.

This enables developers to debug the state of registers during JIT kernel execution on ARM64 SIMD platforms.

The class includes a description of its usage for better understanding and implementation.

Tickets:

Issue #27715

@amanmogal amanmogal requested review from a team as code owners November 29, 2024 13:22
@amanmogal amanmogal requested review from ilya-lavrenov and removed request for a team November 29, 2024 13:22
@github-actions github-actions bot added category: CPU OpenVINO CPU plugin no-match-files labels Nov 29, 2024
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Nov 29, 2024
@dmitry-gorokhov dmitry-gorokhov added the platform: arm OpenVINO on ARM / ARM64 label Dec 4, 2024
@amanmogal amanmogal changed the title issue #27715: Implement RegPrints Class for ARM64 SIMD Platforms # Issue 27829: Implement RegPrints Class for ARM64 SIMD Platforms Dec 6, 2024
@amanmogal amanmogal changed the title # Issue 27829: Implement RegPrints Class for ARM64 SIMD Platforms #Issue 27715: Implement RegPrints Class for ARM64 SIMD Platforms Dec 9, 2024
// Emit JIT code to print general-purpose register during runtime
gen.mov(gen.rdi, reg_value); // Move register value into rdi
gen.mov(gen.rsi, reinterpret_cast<uint64_t>(reg_name)); // Pass register name as argument
gen.call(reinterpret_cast<void(*)(const char*, uint64_t)>(print_runtime_gpr)); // Call runtime function
Copy link
Contributor

Choose a reason for hiding this comment

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

The instruction call is missed on aarch64. Please take a look at the instruction blr. It calls a subroutine at an address in a register.

The registers rdi and rsi are also missed on aarch64. This naming is used on x64 platforms.

Also, as mentioned in the issue, the perfect example for this task is the implementation of jit_power_static_emitter which generates code to call std::powf in runtime. Please take a look at this impl.

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, could you please share the output of test of some Eltwise op with RegPrints using?
For example, you can launch tests for Add op: ./bin/[platform]/[build_type]/ov_cpu_func_tests --gtest_filter="*smoke*Eltwise*Add*"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin ExternalPR External contributor platform: arm OpenVINO on ARM / ARM64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue] [ARM] [Debug Caps] : Implement register prints in just-in-time Kernels
5 participants