Skip to content

[RVV] more rvv fp16 unary kernels + f32-vcopysign#9693

Open
ken-unger wants to merge 4 commits intogoogle:masterfrom
ken-unger:unary-rvv
Open

[RVV] more rvv fp16 unary kernels + f32-vcopysign#9693
ken-unger wants to merge 4 commits intogoogle:masterfrom
ken-unger:unary-rvv

Conversation

@ken-unger
Copy link
Copy Markdown
Contributor

Added rvv support for additional f16 unary kernels, which are a trivial port from their f32 versions.

  • f16-vhswish
  • f16-vlrelu
  • f16-vrnd
  • f16-vrsqrt
  • f16-vsqrt

Added rvv support for f32-vcopysign

Tested on BPI-F3.

Changes to src/configs/binary-elementwise-config.c and src/configs/unary-elementwise-config.c are the most important to review although all RISCV specific.

@@ -0,0 +1,36 @@
// Copyright 2024 Imagination Technologies, Inc.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2026

@@ -0,0 +1,75 @@
// Copyright 2024 Imagination Technologies, inc.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2026

Copy link
Copy Markdown
Collaborator

@fbarchard fbarchard left a comment

Choose a reason for hiding this comment

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

note that f16 tests are crashing on emulator with is a known issue with our emulator at least.
test on real hardware if you can, and we'll likely need to add a build flag to enable/disable fp16.

@ken-unger
Copy link
Copy Markdown
Contributor Author

@dsharletg could you review and merge when you have some free moments this week. Thank you.

Are the rvv fp16 tests now running in the CT environment? Wondering if the qemu update helped there. I haven't seen those issues in my testing.

copybara-service bot pushed a commit that referenced this pull request Apr 1, 2026
--
4a29295 by Ken Unger <ken.j.unger@gmail.com>:

add rvv support for f16-vhswish, f16-vlrelu, f16-vrnd, f16-vrsqrt, f16-vsqrt, f32-vcopysign

--
99f32de by Ken Unger <ken.j.unger@gmail.com>:

updated copyright per review comments

FUTURE_COPYBARA_INTEGRATE_REVIEW=#9693 from ken-unger:unary-rvv 72587b2
PiperOrigin-RevId: 892124176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants