[CustomOp] Register RotaryEmbedding instead of overwrite forward (#2385)

### What this PR does / why we need it?
Register RotaryEmbedding instead of overwrite forward

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
CI passed with new added/existing test.

- vLLM version: v0.10.0
- vLLM main:
808d2e9aa0

---------

Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
This commit is contained in:
Icey
2025-08-25 09:32:35 +08:00
committed by GitHub
parent 950c4b219a
commit f796e6280b
6 changed files with 426 additions and 381 deletions

View File

@@ -356,13 +356,13 @@ class TestUtils(TestBase):
# ascend custom op is not registered
utils.register_ascend_customop()
# should call register_oot three
self.assertEqual(mock_customop.register_oot.call_count, 6)
self.assertEqual(mock_customop.register_oot.call_count, 8)
self.assertTrue(utils._ASCEND_CUSTOMOP_IS_REIGISTERED)
# ascend custom op is already registered
utils.register_ascend_customop()
# should not register_oot again, thus only called three in this ut
self.assertEqual(mock_customop.register_oot.call_count, 6)
self.assertEqual(mock_customop.register_oot.call_count, 8)
class TestProfileExecuteDuration(TestBase):