Skip to content

[Good First Issue] [RISCV64]: Implement CPU plugin just-in-time emitter for Floor operation #30230

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

Closed
a-sidorova opened this issue Apr 21, 2025 · 3 comments · Fixed by #30420
Closed
Assignees
Labels
category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: risc-v OpenVINO on RISC-V
Milestone

Comments

@a-sidorova
Copy link
Contributor

Context

JIT Emitters are part of code generation feature (a.k.a. tensor compiler) that automatically produces highly-efficient optimized fused subgraph binary code. Each emitter implements specific operation from low level OpenVINO dialect.

Prerequisites

Due to limited resources, cross compilation is preferred option now for building OpenVINO targeting RISC-V development boards. Please see the documentation "Cross compile OpenVINO™ Runtime for RISCV64 systems" for more details. For this work, you need to build xuantie-gnu-toolchain or riscv-gnu-toolchain with QEMU support for emulation. So you don't need to have RISC-V development board even to contribute to OpenVINO for these platforms 😃

What needs to be done?

Before emitter implementation, please, modify tests to be sure that developed functionality is covered by test:

Tests

Tests are disabled in default build, so ensure to add -DENABLE_TESTS=ON into cmake command during the project configuration.

GoogleTest is used for testing. CPU functional test target is ov_cpu_func_tests. You can use GoogleTest filter:

# If you use xuantie-gnu-toolchain:
<xuantie_install_path>/bin/qemu-riscv64 -cpu rv64,x-v=true,vext_spec=v1.0 ./bin/[platform]/[build_type]/ov_cpu_func_tests --gtest_filter="*smoke*Activation*Floor*"

# If you use riscv-gnu-toolchain:
<riscv_install_path>/bin/qemu-riscv64 -cpu rv64,v=true,vext_spec=v1.0 ./bin/[platform]/[build_type]/ov_cpu_func_tests --gtest_filter="*smoke*Activation*Floor*"

Example Pull Requests

Resources

Contact points

@a-sidorova

@a-sidorova a-sidorova added category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: risc-v OpenVINO on RISC-V labels Apr 21, 2025
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Apr 21, 2025
@arunthakur009
Copy link
Contributor

Hi @a-sidorova,

I’m starting work on implementing the JIT emitter for fp32 Floor on RISCV64 (RVV1.0) as part of this issue. I will begin by modifying the test suite to ensure the Floor operation fails initially when run with JIT for RISCV64. Once that’s done, I’ll proceed with implementing the emitter logic using RVV vector instructions and integrate it into the JIT execution pipeline.

I’ll keep you updated on my progress and will let you know if I encounter any challenges.

Thanks in advance for your guidance!

@a-sidorova a-sidorova moved this from Contributors Needed to Assigned in Good first issues Apr 22, 2025
@a-sidorova
Copy link
Contributor Author

@arunthakur009 great! If you have any questions, please feel free to ask them. I'd be glad to help you 😊

Good luck!

@arunthakur009
Copy link
Contributor

Hi @a-sidorova,

I’ve completed the implementation of the fp32 Floor JIT emitter for RISC-V64 (RVV1.0) as discussed.
The emitter uses RVV intrinsics, is integrated into the JIT kernel executor, and passes all relevant tests (ov_cpu_func_tests) when cross-compiled and executed using QEMU with the correct sysroot.

I've attached a screenshot of the test output and will now proceed to open a PR for review.
Please let me know if there’s anything specific you'd like me to adjust or include.

Thanks again for your guidance throughout this!

Best regards,

Image

@a-sidorova a-sidorova linked a pull request May 5, 2025 that will close this issue
@a-sidorova a-sidorova moved this from Assigned to In Review in Good first issues May 16, 2025
@github-project-automation github-project-automation bot moved this from In Review to Closed in Good first issues May 20, 2025
@mlukasze mlukasze added this to the 2025.2 milestone May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin good first issue Good for newcomers platform: risc-v OpenVINO on RISC-V
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants