Skip to content

Commit

Permalink
Merge pull request #4105 from martin-frbg/c910v-fix
Browse files Browse the repository at this point in the history
Fix RISCV C910V build (and related CI job hanging) on develop branch
  • Loading branch information
martin-frbg authored Jun 25, 2023
2 parents f863895 + b137879 commit 8488dc9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.riscv64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ifeq ($(CORE), C910V)
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -O1
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
endif
1 change: 1 addition & 0 deletions kernel/riscv64/rot_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
}
}else{
gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
BLASLONG stride_x = inc_x * sizeof(FLOAT);
BLASLONG stride_y = inc_y * sizeof(FLOAT);
BLASLONG inc_xv = inc_x * gvl;
Expand Down
1 change: 1 addition & 0 deletions kernel/riscv64/swap_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT dummy3, FLOAT *x,
}
}else{
gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
stride_x = inc_x * sizeof(FLOAT);
stride_y = inc_y * sizeof(FLOAT);
if(gvl <= n/2){
Expand Down
1 change: 1 addition & 0 deletions kernel/riscv64/zrot_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
}

}else{
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
for(i=0,j=0; i < n/gvl; i++){
vx0 = VLSEV_FLOAT(&x[ix], stride_x, gvl);
vx1 = VLSEV_FLOAT(&x[ix+1], stride_x, gvl);
Expand Down
1 change: 1 addition & 0 deletions kernel/riscv64/zswap_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT dummy3, FLOAT dumm
}
}else{
gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
stride_x = inc_x * 2 * sizeof(FLOAT);
stride_y = inc_y * 2 * sizeof(FLOAT);
BLASLONG inc_xv = inc_x * gvl * 2;
Expand Down

0 comments on commit 8488dc9

Please sign in to comment.