From 7c3b1f7f9acb977679d819a5fd30df578569a2e3 Mon Sep 17 00:00:00 2001 From: Matheus Cavalcante Date: Tue, 5 Dec 2023 09:31:07 -0800 Subject: [PATCH 1/2] :art: sw: Fix formatting issues --- sw/spatzBenchmarks/dp-faxpy/main.c | 3 ++- sw/spatzBenchmarks/dp-fconv2d/main.c | 3 ++- sw/spatzBenchmarks/dp-fdotp/main.c | 3 ++- sw/spatzBenchmarks/dp-fft/main.c | 3 ++- sw/spatzBenchmarks/dp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/hp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/sdotp-bp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/sdotp-hp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/sp-fft/main.c | 3 ++- sw/spatzBenchmarks/sp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/widening-bp-fmatmul/main.c | 3 ++- sw/spatzBenchmarks/widening-hp-fmatmul/main.c | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/sw/spatzBenchmarks/dp-faxpy/main.c b/sw/spatzBenchmarks/dp-faxpy/main.c index 00ea189d..d25532f4 100644 --- a/sw/spatzBenchmarks/dp-faxpy/main.c +++ b/sw/spatzBenchmarks/dp-faxpy/main.c @@ -98,7 +98,8 @@ int main() { // Check and display results if (cid == 0) { long unsigned int performance = 1000 * 2 * dim / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE); printf("\n----- (%d) axpy -----\n", dim); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/dp-fconv2d/main.c b/sw/spatzBenchmarks/dp-fconv2d/main.c index c054eeab..86490760 100644 --- a/sw/spatzBenchmarks/dp-fconv2d/main.c +++ b/sw/spatzBenchmarks/dp-fconv2d/main.c @@ -122,7 +122,8 @@ int main() { // Check and display results if (cid == 0) { long unsigned int performance = 1000 * 2 * f * f * r * c / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE); printf("\n----- (%dx%d) dp fconv2d -----\n", r, c); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/dp-fdotp/main.c b/sw/spatzBenchmarks/dp-fdotp/main.c index aab0e11f..974bb782 100644 --- a/sw/spatzBenchmarks/dp-fdotp/main.c +++ b/sw/spatzBenchmarks/dp-fdotp/main.c @@ -108,7 +108,8 @@ int main() { // Check and display results if (cid == 0) { long unsigned int performance = 1000 * 2 * dotp_l.M / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE); printf("\n----- (%d) dp fdotp -----\n", dotp_l.M); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/dp-fft/main.c b/sw/spatzBenchmarks/dp-fft/main.c index f4a93bb3..ae72a059 100644 --- a/sw/spatzBenchmarks/dp-fft/main.c +++ b/sw/spatzBenchmarks/dp-fft/main.c @@ -115,7 +115,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 10 * NFFT * log2_nfft * 6 / 5 / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE); printf("\n----- fft on %d samples -----\n", NFFT); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/dp-fmatmul/main.c b/sw/spatzBenchmarks/dp-fmatmul/main.c index 98fae43d..1e941002 100644 --- a/sw/spatzBenchmarks/dp-fmatmul/main.c +++ b/sw/spatzBenchmarks/dp-fmatmul/main.c @@ -131,7 +131,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE); printf("\n----- (%dx%d) dp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/hp-fmatmul/main.c b/sw/spatzBenchmarks/hp-fmatmul/main.c index 891b931a..0b5de6fd 100644 --- a/sw/spatzBenchmarks/hp-fmatmul/main.c +++ b/sw/spatzBenchmarks/hp-fmatmul/main.c @@ -147,7 +147,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); printf("\n----- (%dx%d) hp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/sdotp-bp-fmatmul/main.c b/sw/spatzBenchmarks/sdotp-bp-fmatmul/main.c index fda65614..a906f507 100644 --- a/sw/spatzBenchmarks/sdotp-bp-fmatmul/main.c +++ b/sw/spatzBenchmarks/sdotp-bp-fmatmul/main.c @@ -127,7 +127,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 8); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 8); printf("\n----- (%dx%d) sdotp bp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/sdotp-hp-fmatmul/main.c b/sw/spatzBenchmarks/sdotp-hp-fmatmul/main.c index 210210b6..e4977293 100644 --- a/sw/spatzBenchmarks/sdotp-hp-fmatmul/main.c +++ b/sw/spatzBenchmarks/sdotp-hp-fmatmul/main.c @@ -151,7 +151,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); printf("\n----- (%dx%d) sdotp hp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/sp-fft/main.c b/sw/spatzBenchmarks/sp-fft/main.c index 8f340aed..d5abd407 100644 --- a/sw/spatzBenchmarks/sp-fft/main.c +++ b/sw/spatzBenchmarks/sp-fft/main.c @@ -114,7 +114,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 10 * NFFT * log2_nfft * 6 / 5 / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); printf("\n----- fft on %d samples -----\n", NFFT); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/sp-fmatmul/main.c b/sw/spatzBenchmarks/sp-fmatmul/main.c index a172685c..e9260ccb 100644 --- a/sw/spatzBenchmarks/sp-fmatmul/main.c +++ b/sw/spatzBenchmarks/sp-fmatmul/main.c @@ -131,7 +131,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); printf("\n----- (%dx%d) sp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/widening-bp-fmatmul/main.c b/sw/spatzBenchmarks/widening-bp-fmatmul/main.c index 554a5ede..6a2c44f0 100644 --- a/sw/spatzBenchmarks/widening-bp-fmatmul/main.c +++ b/sw/spatzBenchmarks/widening-bp-fmatmul/main.c @@ -115,7 +115,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 4); printf("\n----- (%dx%d) widening bp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); diff --git a/sw/spatzBenchmarks/widening-hp-fmatmul/main.c b/sw/spatzBenchmarks/widening-hp-fmatmul/main.c index 3298f910..851b839a 100644 --- a/sw/spatzBenchmarks/widening-hp-fmatmul/main.c +++ b/sw/spatzBenchmarks/widening-hp-fmatmul/main.c @@ -139,7 +139,8 @@ int main() { if (cid == 0) { long unsigned int performance = 1000 * 2 * gemm_l.M * gemm_l.N * gemm_l.K / timer; - long unsigned int utilization = performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); + long unsigned int utilization = + performance / (2 * num_cores * SNRT_NFPU_PER_CORE * 2); printf("\n----- (%dx%d) widening hp fmatmul -----\n", gemm_l.M, gemm_l.N); printf("The execution took %u cycles.\n", timer); From d7153f4847cfe6800cafeb01984ee0a3f7297e1e Mon Sep 17 00:00:00 2001 From: Matheus Cavalcante Date: Tue, 5 Dec 2023 09:35:16 -0800 Subject: [PATCH 2/2] ci: Call clang-format task with python3 --- util/vendor/run_clang_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vendor/run_clang_format.py b/util/vendor/run_clang_format.py index 89eddf10..23af31f2 100755 --- a/util/vendor/run_clang_format.py +++ b/util/vendor/run_clang_format.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # MIT License