Skip to content

Commit

Permalink
__vector fix for AIX
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjitshs committed Jun 6, 2024
1 parent 3fcebf7 commit d56d697
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions onnxruntime/core/mlas/lib/power/qgemm_kernel_power10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,18 @@ MlasQgemmStoreVectorMMA
{
size_t RowCount;
__vector signed int vsum0, vsum1, vsum2, vsum3;
#if defined(_AIX) && defined(__clang__)
__vector signed int columnsum = *reinterpret_cast<const __vector int *>(&ColumnSumBuffer[pos]);
#else
__vector signed int columnsum = *reinterpret_cast<const __vector int32_t *>(&ColumnSumBuffer[pos]);
#endif
C += VectorCount;
if (ZeroPointB != nullptr) {
#if defined(_AIX) && defined(__clang__)
__vector signed int zeropoint = *reinterpret_cast<const __vector int *>(&ZeroPointB[pos]);
#else
__vector signed int zeropoint = *reinterpret_cast<const __vector int32_t *>(&ZeroPointB[pos]);
#endif
if (ZeroMode) {
for (RowCount = 0; RowCount + 4 <= row; RowCount += 4, C += ldc*4) {
vsum0 = vec_splats(RowSumBuffer[RowCount + 0]) * zeropoint + columnsum;
Expand Down

0 comments on commit d56d697

Please sign in to comment.