From b30bfb8c43053b0e070e7cd3e725341ce1128124 Mon Sep 17 00:00:00 2001 From: Nick Dingle Date: Wed, 22 Apr 2026 11:06:05 +0100 Subject: [PATCH] Fix failing ArmPL SCAL tests The BLAS SCAL function returns immediately if INCX<=0. The reference USM calls pass in ABS(INCX) but the ArmPL calls were just passing in INCX. We were therefore comparing functions called with two different inputs, and the tests were failing. The fix is to pass ABS(INCX) into the ArmPL calls as well, in common with other ArmPL calls to BLAS functions in this file (e.g. compare the ArmPL and USM nrm2 calls). --- src/blas/backends/armpl/armpl_level1.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blas/backends/armpl/armpl_level1.cxx b/src/blas/backends/armpl/armpl_level1.cxx index febdbe3a1..88be0cd04 100644 --- a/src/blas/backends/armpl/armpl_level1.cxx +++ b/src/blas/backends/armpl/armpl_level1.cxx @@ -347,7 +347,8 @@ void scal(sycl::queue& queue, int64_t n, T alpha, sycl::buffer& x, int64_t queue.submit([&](sycl::handler& cgh) { auto accessor_x = x.template get_access(cgh); host_task(cgh, [=]() { - cblas_func(n, cast_to_void_if_complex(alpha), accessor_x.GET_MULTI_PTR, incx); + cblas_func(n, cast_to_void_if_complex(alpha), accessor_x.GET_MULTI_PTR, + (const int)std::abs(incx)); }); }); }