From 65300610e2df35a2371f6cb5292a8f030fc409ea Mon Sep 17 00:00:00 2001 From: BODAPATIMAHESH <148746454+BODAPATIMAHESH@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:25:48 +0530 Subject: [PATCH] [PowerPC] Type casting the output operand of vec_xst. (#18057) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fix resolves the build error “error: invalid parameter combination for AltiVec intrinsic ‘__builtin_vec_vsx_st’” which is coming up with the commit dea425e7c140a7216727421c434a1c5. --- onnxruntime/core/mlas/lib/power/QuantizePower.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/mlas/lib/power/QuantizePower.cpp b/onnxruntime/core/mlas/lib/power/QuantizePower.cpp index 830a3a6a49..1fed8af21b 100644 --- a/onnxruntime/core/mlas/lib/power/QuantizePower.cpp +++ b/onnxruntime/core/mlas/lib/power/QuantizePower.cpp @@ -86,11 +86,11 @@ Return Value: if constexpr (std::is_same_v || std::is_same_v) { auto CharVector = vec_pack(ShortVector0, ShortVector1); - vec_xst(CharVector, 0, Output); + vec_xst(CharVector, 0, (int8_t *)Output); } else { static_assert(std::is_same_v || std::is_same_v); - vec_xst(ShortVector0, 0, Output); - vec_xst(ShortVector1, 0, &Output[8]); + vec_xst(ShortVector0, 0, (int16_t *)Output); + vec_xst(ShortVector1, 0, (int16_t *)&Output[8]); } Output += 16;