Repository navigation
Conversation
4 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RVV Float2Int8 currently converts with the caller's floating-point rounding mode. With the usual round-to-nearest-even mode,
0.5, -0.5, 2.5, -2.5become0, 0, 2, -2; the scalarroundfimplementation produces1, -1, 3, -3.Use the explicit RMM intrinsic in both the scalar-parameter and per-channel-parameter RVV paths. This matches roundf's ties-away-from-zero rule and preserves the caller's rounding mode. Packing, dispatch, affine arithmetic and saturation bounds are unchanged.
Validation
run_test.outcross-build/link with Clang 22.1.8, C++11,rv64gcv/lp64d, RVV on and transformer-fuse off. Changed lines checked with clang-format 17 andgit diff --check.frmmodes, all four scale/zero-point parameter modes, 0–129 C4 quads, saturation, output guards and restoration of the caller'sfrm.op/ConvInt8/depthwisetest pass at VLEN 128/512 with 1 and 4 threads. Av=falserun confirms scalar fallback and passes the same checks.A minimal reproducer uses
src={0.5f,-0.5f,2.5f,-2.5f},sizeQuad=1, unit scale, zero point 0, bounds [-127,127], scalar parameter mode andfrm=RNE: baseline output is{0,0,2,-2}, patched output is{1,-1,3,-3}.This change does not fix the separate per-channel template alignment bug exposed by legal non-maximal VL selection. That is handled independently in the companion PR #5024; combining both changes passes all 29,120 cases across four VLENs and both VL policies. No hardware performance claim is made. This remains a draft pending physical-board and pretrained-model validation.
Module
CPU / RISC-V RVV
Type
Checklist
[Module:Type] DescriptionformatShared iOS CI failure
The iOS job fails on a pre-existing Xcode project reference to the absent
express/module/MoEModule.cpp. The RVV changes do not modify that project or file. The independent build fix is #5026, which passes the same iOS framework build script locally on Xcode 26.6 / iPhoneOS SDK 26.5. The failed runs on this PR have not been marked as passing; they need a new build with the project fix included.