Skip to content

feat(sl): Add FP6/FP4 pack/unpack in C++ and Python

Yuvaraj Venkatesh requested to merge serlib-pack-unpack-mxfp into main
  • Added ConvertFPtoU8 and ConvertU8toFP functions for FP6/FP4 pack/unpack support in C++.
  • Implemented pack/unpack functions for 6bit and 4bit in Python.
  • Added corresponding unit tests in both C++ and Python.
  • Updated fp8 type names to fp8_e4m3 / fp8_e5m2 for consistency with cfloat naming.
  • Moved readFromNpyFile and writeToNpyFile implementations to numpy_utils.cpp and added explicit template specializations to call the new converters.
  • Reason: prevents header-level circular include/linkage issues between numpy_utils and tosa_serialization_handler.

Signed-off-by: Yuvaraj Venkatesh yuvaraj.venkatesh@arm.com

Edited by Yuvaraj Venkatesh

Merge request reports

Loading