Skip to content

Commit

Permalink
Fix zp in u8 unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnov-alexey committed Aug 29, 2024
1 parent 8cf9414 commit edf6e80
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugins/intel_npu/src/plugin/npuw/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ void unpack_u8f16_asymm_zp(const ov::SoPtr<ov::ITensor>& from,

uint8_t const* pSrcLocal = pSrc + 32 * elementsPerScaleVectorized * sindex * stride;
int8_t const* pSclLocal = pScl + scale_elem_type.size() * sindex * stride;
uint8_t const* pZerLocal = pZer + zerop_elem_type.size() * sindex * stride / 2;
uint8_t const* pZerLocal = pZer + zerop_elem_type.size() * sindex * stride;
int16_t* pDstLocal = const_cast<int16_t*>(pDst) + 64 * elementsPerScaleVectorized * sindex * stride;

// if it is last iteration current stride can be smaller - lets check that
Expand Down Expand Up @@ -1160,9 +1160,7 @@ void unpack_u8f16_asymm_zp(const ov::SoPtr<ov::ITensor>& from,
pDstLocal += 64; // note pDst is int16_t, so 64 x f16 -> 64 elements
} // for(index)
pSclLocal += scale_elem_type.size();
if (sindex % 2 == 1) {
pZerLocal += zerop_elem_type.size();
}
pZerLocal += zerop_elem_type.size();
} // for(sindex)
};

Expand Down

0 comments on commit edf6e80

Please sign in to comment.