hw: fix WMMA fp16/bf16 RTL output handling - #359
Conversation
ff0fbc4 to
ce6d361
Compare
|
Correcting my earlier review on this PR — I had the premise backwards. WMMA destination-format narrowing is not a supported feature of the Tensor Core Unit by That means this PR is a feature proposal, not a bug fix, and my earlier comment was wrong on What still stands from the review, as feature feedback rather than bug feedback:
If narrow output formats are something you want to pursue, it is worth raising as a design |
|
Closing: as corrected above, WMMA destination-format narrowing is not a supported TCU feature by Thank you for the work regardless. If narrow output formats are something you would like Vortex to |
Issue
WMMA fp16->fp16 and bf16->bf16 did not follow
fmt_d. The RTL always treated the accumulator input/output path as FP32.Root Cause
VX_tcu_fedp_bhfwas missing destination-format handling. Whenfmt_dselected fp16 or bf16, the RTL still produced FP32-formatted bits instead of the expected 16-bit fp16/bf16 result in the low halfword.Proposal
Add
fmt_dhandling in the BHF TCU datapath so fp16 and bf16 WMMA outputs are rounded and packed in the expected destination format. Extend the SGEMM TCU regression coverage to include fp16->fp16 and bf16->bf16 cases, with ULP checks in the native 16-bit encoding space.This fix passes the synthesis testing.