From 20a7057704632d448ef920a50101eaff0ce18794 Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 8 Apr 2024 16:38:05 +0100 Subject: [PATCH] Clang-foramt --- src/blas/backends/portblas/CMakeLists.txt | 2 +- src/blas/function_table.hpp | 32 ++++++++----------- .../blas/batch/gemm_batch_stride.cpp | 6 ++-- .../blas/batch/gemm_batch_stride_usm.cpp | 6 ++-- .../unit_tests/blas/batch/gemm_batch_usm.cpp | 6 ++-- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/blas/backends/portblas/CMakeLists.txt b/src/blas/backends/portblas/CMakeLists.txt index e1ad6862c..3133497bb 100644 --- a/src/blas/backends/portblas/CMakeLists.txt +++ b/src/blas/backends/portblas/CMakeLists.txt @@ -147,7 +147,7 @@ if (NOT PORTBLAS_FOUND) FetchContent_Declare( portBLAS GIT_REPOSITORY https://github.com/codeplaysoftware/portBLAS - GIT_TAG master + GIT_TAG 861b310df6833059dc7ca6eb6eb81d4741049085 ) FetchContent_MakeAvailable(portBLAS) message(STATUS "Looking for portBLAS - downloaded") diff --git a/src/blas/function_table.hpp b/src/blas/function_table.hpp index 2e28661e7..a242fd0c0 100644 --- a/src/blas/function_table.hpp +++ b/src/blas/function_table.hpp @@ -3331,24 +3331,20 @@ typedef struct { std::int64_t lda, std::int64_t stride_a, sycl::buffer &b, std::int64_t ldb, std::int64_t stride_b, float beta, sycl::buffer &c, std::int64_t ldc, std::int64_t stride_c, std::int64_t batch_size); - void (*row_major_gemm_s8s8f32_batch_strided_sycl)(sycl::queue &queue, oneapi::mkl::transpose transa, - oneapi::mkl::transpose transb, std::int64_t m, - std::int64_t n, std::int64_t k, float alpha, - sycl::buffer &a, std::int64_t lda, - std::int64_t stride_a, - sycl::buffer &b, std::int64_t ldb, - std::int64_t stride_b, float beta, - sycl::buffer &c, std::int64_t ldc, - std::int64_t stride_c, std::int64_t batch_size); - void (*row_major_gemm_s8s8s32_batch_strided_sycl)(sycl::queue &queue, oneapi::mkl::transpose transa, - oneapi::mkl::transpose transb, std::int64_t m, - std::int64_t n, std::int64_t k, float alpha, - sycl::buffer &a, std::int64_t lda, - std::int64_t stride_a, - sycl::buffer &b, std::int64_t ldb, - std::int64_t stride_b, float beta, - sycl::buffer &c, std::int64_t ldc, - std::int64_t stride_c, std::int64_t batch_size); + void (*row_major_gemm_s8s8f32_batch_strided_sycl)( + sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, + std::int64_t m, std::int64_t n, std::int64_t k, float alpha, + sycl::buffer &a, std::int64_t lda, std::int64_t stride_a, + sycl::buffer &b, std::int64_t ldb, std::int64_t stride_b, float beta, + sycl::buffer &c, std::int64_t ldc, std::int64_t stride_c, + std::int64_t batch_size); + void (*row_major_gemm_s8s8s32_batch_strided_sycl)( + sycl::queue &queue, oneapi::mkl::transpose transa, oneapi::mkl::transpose transb, + std::int64_t m, std::int64_t n, std::int64_t k, float alpha, + sycl::buffer &a, std::int64_t lda, std::int64_t stride_a, + sycl::buffer &b, std::int64_t ldb, std::int64_t stride_b, float beta, + sycl::buffer &c, std::int64_t ldc, std::int64_t stride_c, + std::int64_t batch_size); void (*row_major_strsm_batch_strided_sycl)( sycl::queue &queue, oneapi::mkl::side left_right, oneapi::mkl::uplo upper_lower, oneapi::mkl::transpose trans, oneapi::mkl::diag unit_diag, std::int64_t m, std::int64_t n, diff --git a/tests/unit_tests/blas/batch/gemm_batch_stride.cpp b/tests/unit_tests/blas/batch/gemm_batch_stride.cpp index cac90a0b3..5982c88bf 100644 --- a/tests/unit_tests/blas/batch/gemm_batch_stride.cpp +++ b/tests/unit_tests/blas/batch/gemm_batch_stride.cpp @@ -66,7 +66,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t batch_size) { alpha = rand_scalar(); beta = rand_scalar(); - if ((std::is_same>::value) || (std::is_same>::value)) { + if ((std::is_same>::value) || + (std::is_same>::value)) { tmp = std::rand() % 3; if (tmp == 2) transa = oneapi::mkl::transpose::conjtrans; @@ -77,7 +78,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t batch_size) { transb = oneapi::mkl::transpose::conjtrans; else transb = (oneapi::mkl::transpose)tmp; - } else { + } + else { transa = (oneapi::mkl::transpose)(std::rand() % 2); transb = (oneapi::mkl::transpose)(std::rand() % 2); } diff --git a/tests/unit_tests/blas/batch/gemm_batch_stride_usm.cpp b/tests/unit_tests/blas/batch/gemm_batch_stride_usm.cpp index 9436146d2..7329fa09f 100644 --- a/tests/unit_tests/blas/batch/gemm_batch_stride_usm.cpp +++ b/tests/unit_tests/blas/batch/gemm_batch_stride_usm.cpp @@ -85,7 +85,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t batch_size) { ldc = std::max(m, n); alpha = rand_scalar(); beta = rand_scalar(); - if ((std::is_same>::value) || (std::is_same>::value)) { + if ((std::is_same>::value) || + (std::is_same>::value)) { tmp = std::rand() % 3; if (tmp == 2) transa = oneapi::mkl::transpose::conjtrans; @@ -96,7 +97,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t batch_size) { transb = oneapi::mkl::transpose::conjtrans; else transb = (oneapi::mkl::transpose)tmp; - } else { + } + else { transa = (oneapi::mkl::transpose)(std::rand() % 2); transb = (oneapi::mkl::transpose)(std::rand() % 2); } diff --git a/tests/unit_tests/blas/batch/gemm_batch_usm.cpp b/tests/unit_tests/blas/batch/gemm_batch_usm.cpp index b6e2ad5e0..fb694a37c 100644 --- a/tests/unit_tests/blas/batch/gemm_batch_usm.cpp +++ b/tests/unit_tests/blas/batch/gemm_batch_usm.cpp @@ -106,7 +106,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t group_count) { ldc[i] = std::max(m[i], n[i]); alpha[i] = rand_scalar(); beta[i] = rand_scalar(); - if ((std::is_same>::value) || (std::is_same>::value)) { + if ((std::is_same>::value) || + (std::is_same>::value)) { tmp = std::rand() % 3; if (tmp == 2) transa[i] = oneapi::mkl::transpose::conjtrans; @@ -117,7 +118,8 @@ int test(device *dev, oneapi::mkl::layout layout, int64_t group_count) { transb[i] = oneapi::mkl::transpose::conjtrans; else transb[i] = (oneapi::mkl::transpose)tmp; - } else { + } + else { transa[i] = (oneapi::mkl::transpose)(std::rand() % 2); transb[i] = (oneapi::mkl::transpose)(std::rand() % 2); }