Skip to content

Commit

Permalink
[tests] FA-2: fix indents
Browse files Browse the repository at this point in the history
[lint] FA-2 FP8 and GEMM
  • Loading branch information
Viviane Potocnik committed Jun 28, 2024
1 parent cec80a4 commit 577433d
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 56 deletions.
7 changes: 3 additions & 4 deletions sw/blas/gemm/src/gemm.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ typedef struct {
// distinct cores.
// TODO: beta (and alpha) should be of floating-point type (same precision as
// operands)
void sc_st_gemm(gemm_args_t* gemm_args, void* a, void* b,
uint32_t beta, void* c) {

void sc_st_gemm(gemm_args_t* gemm_args, void* a, void* b, uint32_t beta,
void* c) {
gemm_fp_t impl = (gemm_fp_t)gemm_args->gemm_fp;
precision_t prec = gemm_args->prec;
uint32_t setup_ssr = gemm_args->setup_ssr;
Expand All @@ -94,7 +93,7 @@ void sc_st_gemm(gemm_args_t* gemm_args, void* a, void* b,

uint32_t lda = k;
uint32_t ldb;
if(transb) {
if (transb) {
ldb = k;
} else {
ldb = n;
Expand Down
8 changes: 4 additions & 4 deletions sw/dnn/flashattention_2/src/flashattention_2_fp8.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ static inline float fp8_to_float(char val) {
asm volatile(
"fmv.b.x %[res], %[val]\n"
"fcvt.s.b %[res], %[res]\n"
: [res] "=f"(res)
: [val] "r"(val));
: [ res ] "=f"(res)
: [ val ] "r"(val));
return res;
}

Expand All @@ -20,8 +20,8 @@ static inline char float_to_fp8(float val) {
asm volatile(
"fcvt.b.s ft3, %[val]\n"
"fmv.x.b %[res], ft3\n"
: [res] "=r"(res)
: [val] "f"(val)
: [ res ] "=r"(res)
: [ val ] "f"(val)
: "ft3");
return res;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 64,
L: 1,
S: 64,
d: 128,
B_r: 1,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 64,
S: 64,
L: 64,
S: 64,
d: 128,
B_r: 32,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 32,
L: 1,
S: 32,
d: 256,
B_r: 1,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 32,
L: 32,
S: 32,
d: 256,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 64,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 80,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 64,
L: 1,
S: 64,
d: 128,
B_r: 1,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 64,
S: 64,
L: 64,
S: 64,
d: 128,
B_r: 32,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 32,
L: 1,
S: 32,
d: 256,
B_r: 1,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 32,
L: 32,
S: 32,
d: 256,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 64,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 80,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 64,
L: 1,
S: 64,
d: 128,
B_r: 1,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 64,
S: 64,
L: 64,
S: 64,
d: 128,
B_r: 32,
B_c: 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 1,
S: 32,
L: 1,
S: 32,
d: 256,
B_r: 1,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 32,
L: 32,
S: 32,
d: 256,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 64,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

{
L: 32,
S: 128,
L: 32,
S: 128,
d: 80,
B_r: 16,
B_c: 64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// SPDX-License-Identifier: SHL-0.51

{
L: 16,
S: 32,
L: 16,
S: 32,
d: 16,
B_r: 16,
B_c: 16,
Expand Down

0 comments on commit 577433d

Please sign in to comment.