Support both f32 and s16 inputs