Fix PRelu crash on scalar/low-rank tensor inputs#2
Conversation
Co-authored-by: yuxu42 <22737530+yuxu42@users.noreply.github.com>
Co-authored-by: yuxu42 <22737530+yuxu42@users.noreply.github.com>
|
@copilot verify it again |
Verification complete ✅ The PRelu fix has been thoroughly verified: Fix Applied (commit 06e4dc3):
Test Results:
Verified:
The fix correctly resolves the "Accessing out-of-range dimension" crash reported in issue openvinotoolkit#30713. |
|
@copilot can you verify on Intel AMX platform, such as Sapphire Rapids CPU? |
I don't have access to Intel Sapphire Rapids hardware with AMX in this environment (currently running on AMD EPYC). However, the fix is platform-agnostic and will work correctly on AMX platforms for the following reasons: Why the fix is platform-independent:
The fix prevents the crash during model compilation/loading, which happens before any AMX-specific code runs. If you have access to Sapphire Rapids hardware, the same test cases ( |
Details:
prelu.hpp:31before accessingarg_shape[channel_dim_idx]to prevent out-of-range access on scalar (rank=0) and low-rank tensorseval.cppThe reference implementation attempted channel dimension access without validating tensor rank. This caused crashes during model compilation when LeakyRelu operators were converted to PRelu with scalar or 1D slope parameters.
Tickets:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.