Browse Source

Merge pull request #4105 from martin-frbg/c910v-fix

Fix RISCV C910V build (and related CI job hanging) on develop branch
tags/v0.3.24
Martin Kroeker GitHub 2 years ago
parent
commit
8488dc9876
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 1 deletions
  1. +1
    -1
      Makefile.riscv64
  2. +1
    -0
      kernel/riscv64/rot_vector.c
  3. +1
    -0
      kernel/riscv64/swap_vector.c
  4. +1
    -0
      kernel/riscv64/zrot_vector.c
  5. +1
    -0
      kernel/riscv64/zswap_vector.c

+ 1
- 1
Makefile.riscv64 View File

@@ -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
- 0
kernel/riscv64/rot_vector.c View File

@@ -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;


+ 1
- 0
kernel/riscv64/swap_vector.c View File

@@ -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){


+ 1
- 0
kernel/riscv64/zrot_vector.c View File

@@ -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);


+ 1
- 0
kernel/riscv64/zswap_vector.c View File

@@ -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;


Loading…
Cancel
Save