Skip to content

Merge risc-v branch to develop #4472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
448fe1c
Test on PolarFire Soc.
xianyi Aug 24, 2022
bef4791
Initial version for riscv sifive x280
HellerZheng Nov 15, 2022
5d0d1c5
Remove redundant files
HellerZheng Nov 16, 2022
9702d57
Update Makefile.install
HellerZheng Nov 16, 2022
943372b
Merge branch 'develop' into develop
HellerZheng Nov 18, 2022
3918d85
nrm2 simple optimization
HellerZheng Nov 22, 2022
387e897
Fix merge problem; Update compiling COMMON_OPT per review comments.
HellerZheng Nov 29, 2022
e284c04
Merge branch 'develop' into risc-v
xianyi Dec 3, 2022
e5313f5
Merge branch 'develop' of https://github.com/HellerZheng/OpenBLAS_ris…
xianyi Dec 3, 2022
d9993e2
Refs #3825 Merge branch 'HellerZheng-develop' into risc-v
xianyi Dec 3, 2022
c19dff0
Fix T-Head RVV intrinsic API changes.
xianyi Jan 25, 2023
63cf4d0
add riscv level3 C,Z kernel functions.
HellerZheng Feb 2, 2023
2406958
* update intrinsics to match latest spec at https://github.com/riscv-…
sergei-lewis Feb 24, 2023
9b61be4
factoring riscv64/dot.c fix into separate PR as requested
sergei-lewis Mar 1, 2023
20511df
Merge pull request #3919 from sergei-lewis/risc-v-latest-rvv-intrinsics
xianyi Mar 15, 2023
19f17c8
Merge pull request #3893 from HellerZheng/develop
xianyi Mar 15, 2023
1374a2d
This PR adapts latest spec changes
HellerZheng Mar 20, 2023
6b74bee
Update TARGET=x280 description.
HellerZheng Mar 28, 2023
30222d0
Merge pull request #3971 from HellerZheng/risc-v
xianyi Apr 1, 2023
18d7afe
Add rvv support for zsymv and active rvv support for zhemv
sh-zheng May 19, 2023
d3bf5a5
Combine two reduction operations of zhe/symv into one, with tail undi…
sh-zheng May 22, 2023
0954746
remove argument unused during compilation.
HellerZheng Jun 5, 2023
5147831
Merge pull request #4074 from HellerZheng/risc-v
martin-frbg Jun 6, 2023
2a8bc38
Merge branch 'xianyi:risc-v' into risc-v
sh-zheng Jun 9, 2023
62f0f50
Merge pull request #4049 from sh-zheng/risc-v
martin-frbg Jun 9, 2023
e1958eb
Fixes RVV masked intrinsics for iamax/iamin/imax/imin kernels
OMaghiarIMG Jul 5, 2023
1e4a3a2
Fixes RVV masked intrinsics for izamax/izamin kernels
OMaghiarIMG Jul 12, 2023
8df0289
Adds tail undisturbed for RVV Level 1 operations
OMaghiarIMG Jul 20, 2023
826a9d5
Adds tail undisturbed for RVV Level 2 operations
OMaghiarIMG Jul 25, 2023
e4586e8
[RISC-V] Add RISC-V Vector 128-bit target
OMaghiarIMG Dec 4, 2023
4a12cf5
[RISC-V] Improve RVV kernel generator LMUL usage
OMaghiarIMG Dec 4, 2023
2d316c2
Merge pull request #4125 from OMaghiarIMG/risc-v
martin-frbg Dec 7, 2023
1332f8a
Merge pull request #4159 from OMaghiarIMG/risc-v-tail-policy
martin-frbg Dec 8, 2023
9edb805
fix builds with t-head toolchains that use old versions of the intrin…
sergei-lewis Jan 16, 2024
e3508d3
Merge pull request #4439 from sergei-lewis/risc-v
martin-frbg Jan 16, 2024
88e9941
Merge pull request #4354 from imaginationtech/img-rvv-kernel-generator
martin-frbg Jan 17, 2024
b193ea3
Fix BLAS and LAPACK tests for RVV 1.0 target, update to 0.12.0 intrin…
kseniyazaytseva Jan 18, 2024
ff41cf5
Fix BLAS, BLAS-like functions and Generic RISC-V kernels
kseniyazaytseva Mar 17, 2023
5b4df85
fix stray blank on continuation line
martin-frbg Mar 21, 2023
1c04df2
Re-enable overriding the LAPACK SYMV,SYR,SPMV and SPR implementations
martin-frbg Mar 20, 2023
5222b5f
Added axpby kernels for GENERIC RISC-V target
kseniyazaytseva Oct 12, 2023
f129161
restore C/Z SPMV, SPR, SYR,SYMV
martin-frbg Mar 21, 2023
85548e6
Fix build failures seen with the NO_LAPACK option - cspr/csymv/csyr b…
martin-frbg Mar 28, 2023
f7cf637
redo lost edit
martin-frbg Mar 28, 2023
f89e003
Fix LAPACK usage from BLAS
kseniyazaytseva Dec 20, 2023
deecfb1
Merge branch 'risc-v' into img-riscv64-zvl128b
OMaghiarIMG Jan 19, 2024
ccbc3f8
[RISC-V] Add RISCV64_ZVL128B target to common_riscv64.h
OMaghiarIMG Jan 19, 2024
10c22f4
Merge pull request #4355 from imaginationtech/img-riscv64-zvl128b
martin-frbg Jan 19, 2024
e1afb23
Fix BLAS and LAPACK tests for C910V and RISCV64_ZVL256B targets
kseniyazaytseva Apr 7, 2023
9c49a81
Resolve conflicts
AndreySokolovSC Jan 23, 2024
86943af
Fix x280 taget include riscv_vector.h
kseniyazaytseva Jan 24, 2024
73530b0
remove RISCV64_ZVL256B additional extentions
AndreySokolovSC Jan 24, 2024
a21b2fa
Merge pull request #4452 from kseniyazaytseva/riscv-generic
martin-frbg Jan 24, 2024
4e2a32f
Merge pull request #4454 from kseniyazaytseva/riscv-rvv07
martin-frbg Jan 26, 2024
889c5d0
Merge pull request #4456 from kseniyazaytseva/riscv-rvv10
martin-frbg Jan 26, 2024
1093def
Merge branch 'risc-v' into develop
sergei-lewis Jan 29, 2024
a3b0ef6
Restore riscv64 fixes from develop branch: dot product double precisi…
sergei-lewis Feb 1, 2024
3ffd686
Merge branch 'develop' into dev/slewis/merge-from-riscv
sergei-lewis Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Makefile.prebuild
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ ifeq ($(TARGET), CK860FV)
TARGET_FLAGS = -march=ck860v -mcpu=ck860fv -mfdivdu -mhard-float
endif

ifeq ($(TARGET), x280)
TARGET_FLAGS = -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d
endif

ifeq ($(TARGET), RISCV64_ZVL256B)
TARGET_FLAGS = -march=rv64imafdcv -mabi=lp64d
endif

ifeq ($(TARGET), RISCV64_ZVL128B)
TARGET_FLAGS = -march=rv64imafdcv -mabi=lp64d
endif

ifeq ($(TARGET), RISCV64_GENERIC)
TARGET_FLAGS = -march=rv64imafdc -mabi=lp64d
endif

all: getarch_2nd
./getarch_2nd 0 >> $(TARGET_MAKE)
./getarch_2nd 1 >> $(TARGET_CONF)
Expand Down
16 changes: 16 additions & 0 deletions Makefile.riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@ ifeq ($(CORE), C910V)
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
endif
ifeq ($(CORE), x280)
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d -ffast-math
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
endif
ifeq ($(CORE), RISCV64_ZVL256B)
CCOMMON_OPT += -march=rv64imafdcv_zvl256b -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d -static
endif
ifeq ($(CORE), RISCV64_ZVL128B)
CCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdcv -mabi=lp64d -static
endif
ifeq ($(CORE), RISCV64_GENERIC)
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d -static
endif
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ Please read `GotoBLAS_01Readme.txt` for older CPU models already supported by th
```
(also known to work on C906 as long as you use only single-precision functions - its instruction set support appears to be incomplete in double precision)

- **x280**: Level-3 BLAS and Level-1,2 are optimized by RISC-V Vector extension 1.0.
```sh
make HOSTCC=gcc TARGET=x280 NUM_THREADS=8 CC=riscv64-unknown-linux-gnu-clang FC=riscv64-unknown-linux-gnu-gfortran
```

### Support for multiple targets in a single library

OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying `DYNAMIC_ARCH=1` in Makefile.rule, on the gmake command line or as `-DDYNAMIC_ARCH=TRUE` in cmake.
Expand Down
5 changes: 4 additions & 1 deletion TargetList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ Z13
Z14

10.RISC-V 64:
RISCV64_GENERIC
RISCV64_GENERIC (e.g. PolarFire Soc/SiFive U54)
RISCV64_ZVL128B
C910V
x280
RISCV64_ZVL256B

11.LOONGARCH64:
LOONGSONGENERIC
Expand Down
36 changes: 21 additions & 15 deletions benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ ESSL=/opt/ibm/lib
#LIBESSL = -lesslsmp $(ESSL)/libxlomp_ser.so.1 $(ESSL)/libxlf90_r.so.1 $(ESSL)/libxlfmath.so.1 $(ESSL)/libxlsmp.so.1 /opt/ibm/xlC/13.1.3/lib/libxl.a
LIBESSL = -lesslsmp $(ESSL)/libxlf90_r.so.1 $(ESSL)/libxlfmath.so.1 $(ESSL)/libxlsmp.so.1 /opt/ibm/xlC/13.1.3/lib/libxl.a

# x280 temporary workaround for gfortran
ifeq ($(TARGET), x280)
CCOMMON_OPT:=$(filter-out -mllvm --riscv-v-vector-bits-min=512,$(CCOMMON_OPT))
endif


ifneq ($(NO_LAPACK), 1)
GOTO_LAPACK_TARGETS=slinpack.goto dlinpack.goto clinpack.goto zlinpack.goto \
scholesky.goto dcholesky.goto ccholesky.goto zcholesky.goto \
Expand Down Expand Up @@ -265,9 +271,9 @@ goto :: sgemm.goto dgemm.goto cgemm.goto zgemm.goto \
ismax.goto idmax.goto \
isamin.goto idamin.goto icamin.goto izamin.goto \
ismin.goto idmin.goto \
samax.goto damax.goto scamax.goto dzamax.goto \
samax.goto damax.goto camax.goto zamax.goto \
smax.goto dmax.goto \
samin.goto damin.goto scamin.goto dzamin.goto \
samin.goto damin.goto camin.goto zamin.goto \
smin.goto dmin.goto \
saxpby.goto daxpby.goto caxpby.goto zaxpby.goto \
snrm2.goto dnrm2.goto scnrm2.goto dznrm2.goto $(GOTO_LAPACK_TARGETS) $(GOTO_HALF_TARGETS)
Expand Down Expand Up @@ -2832,12 +2838,12 @@ samax.goto : samax.$(SUFFIX) ../$(LIBNAME)
damax.goto : damax.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## SCAMAX ##############################################
scamax.goto : scamax.$(SUFFIX) ../$(LIBNAME)
############################################## CAMAX ##############################################
camax.goto : camax.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## DZAMAX ##############################################
dzamax.goto : dzamax.$(SUFFIX) ../$(LIBNAME)
############################################## ZAMAX ##############################################
zamax.goto : zamax.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## SMAX ##############################################
Expand All @@ -2856,12 +2862,12 @@ samin.goto : samin.$(SUFFIX) ../$(LIBNAME)
damin.goto : damin.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## SCAMIN ##############################################
scamin.goto : scamin.$(SUFFIX) ../$(LIBNAME)
############################################## CAMIN ##############################################
camin.goto : camin.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## DZAMIN ##############################################
dzamin.goto : dzamin.$(SUFFIX) ../$(LIBNAME)
############################################## ZAMIN ##############################################
zamin.goto : zamin.$(SUFFIX) ../$(LIBNAME)
$(CC) $(CFLAGS) -o $(@F) $^ $(CEXTRALIB) $(EXTRALIB) $(FEXTRALIB) -lm

############################################## SMIN ##############################################
Expand Down Expand Up @@ -3383,10 +3389,10 @@ samax.$(SUFFIX) : amax.c
damax.$(SUFFIX) : amax.c
$(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^

scamax.$(SUFFIX) : amax.c
camax.$(SUFFIX) : amax.c
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^

dzamax.$(SUFFIX) : amax.c
zamax.$(SUFFIX) : amax.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^


Expand All @@ -3403,10 +3409,10 @@ samin.$(SUFFIX) : amin.c
damin.$(SUFFIX) : amin.c
$(CC) $(CFLAGS) -c -UCOMPLEX -DDOUBLE -o $(@F) $^

scamin.$(SUFFIX) : amin.c
camin.$(SUFFIX) : amin.c
$(CC) $(CFLAGS) -c -DCOMPLEX -UDOUBLE -o $(@F) $^

dzamin.$(SUFFIX) : amin.c
zamin.$(SUFFIX) : amin.c
$(CC) $(CFLAGS) -c -DCOMPLEX -DDOUBLE -o $(@F) $^


Expand Down Expand Up @@ -3436,4 +3442,4 @@ smallscaling: smallscaling.c ../$(LIBNAME)
clean ::
@rm -f *.goto *.mkl *.acml *.atlas *.veclib *.essl smallscaling

include $(TOPDIR)/Makefile.tail
include $(TOPDIR)/Makefile.tail
9 changes: 9 additions & 0 deletions cblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ void cblas_zgemm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLA
void cblas_zgemm3m(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);

void cblas_sgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);
void cblas_cgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);
void cblas_zgemmt(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransB, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint K,
OPENBLAS_CONST void *alpha, OPENBLAS_CONST void *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST void *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST void *beta, void *C, OPENBLAS_CONST blasint ldc);

void cblas_ssymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dsymm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N,
Expand Down
9 changes: 9 additions & 0 deletions common_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,15 @@ void BLASFUNC(zgemm3m)(char *, char *, blasint *, blasint *, blasint *, double *
void BLASFUNC(xgemm3m)(char *, char *, blasint *, blasint *, blasint *, xdouble *,
xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *, blasint *);

void BLASFUNC(sgemmt)(char*, char *, char *, blasint *, blasint *, float *,
float *, blasint *, float *, blasint *, float *, float *, blasint *);
void BLASFUNC(dgemmt)(char*, char *, char *, blasint *, blasint *, double *,
double *, blasint *, double *, blasint *, double *, double *, blasint *);
void BLASFUNC(cgemmt)(char*, char *, char *, blasint *, blasint *, float *,
float *, blasint *, float *, blasint *, float *, float *, blasint *);
void BLASFUNC(zgemmt)(char*, char *, char *, blasint *, blasint *, double *,
double *, blasint *, double *, blasint *, double *, double *, blasint *);

int BLASFUNC(sge2mm)(char *, char *, char *, blasint *, blasint *,
float *, float *, blasint *, float *, blasint *,
float *, float *, blasint *);
Expand Down
22 changes: 20 additions & 2 deletions common_riscv64.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,26 @@ static inline int blas_quickdivide(blasint x, blasint y){
#define BUFFER_SIZE ( 32 << 20)
#define SEEK_ADDRESS

#if defined(C910V)
#include <riscv_vector.h>
#if defined(C910V) || (defined(RISCV64_ZVL256B) && (defined(__clang__) || defined(RVV_COMPATIBLE_GCC))) || defined(RISCV64_ZVL128B) || defined(x280)
# include <riscv_vector.h>
#endif

#if defined( __riscv_xtheadc ) && defined( __riscv_v ) && ( __riscv_v <= 7000 )
// t-head toolchain uses obsolete rvv intrinsics, can't build for C910V without this
#define RISCV_0p10_INTRINSICS
#define RISCV_RVV(x) x
#else
#define RISCV_RVV(x) __riscv_ ## x
#endif

#if defined(C910V) || defined(RISCV64_ZVL256B)
# if !defined(DOUBLE)
# define EXTRACT_FLOAT(v) RISCV_RVV(vfmv_f_s_f32m1_f32)(v)
# else
# define EXTRACT_FLOAT(v) RISCV_RVV(vfmv_f_s_f64m1_f64)(v)
# endif
#else
# define EXTRACT_FLOAT(v) (v[0])
#endif

#endif
12 changes: 9 additions & 3 deletions cpuid_riscv64.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,18 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/

#define CPU_GENERIC 0
#define CPU_C910V 1
#define CPU_GENERIC 0
#define CPU_C910V 1
#define CPU_x280 2
#define CPU_RISCV64_ZVL256B 3
#define CPU_RISCV64_ZVL128B 4

static char *cpuname[] = {
"RISCV64_GENERIC",
"C910V"
"C910V",
"x280",
"CPU_RISCV64_ZVL256B",
"CPU_RISCV64_ZVL128B"
};

int detect(void){
Expand Down
10 changes: 5 additions & 5 deletions ctest/c_cblat1.f
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SUBROUTINE CHECK1(SFAC)
INTEGER ICAMAXTEST
EXTERNAL SCASUMTEST, SCNRM2TEST, ICAMAXTEST
* .. External Subroutines ..
EXTERNAL CSCAL, CSSCALTEST, CTEST, ITEST1, STEST1
EXTERNAL CSCALTEST, CSSCALTEST, CTEST, ITEST1, STEST1
* .. Intrinsic Functions ..
INTRINSIC MAX
* .. Common blocks ..
Expand Down Expand Up @@ -214,8 +214,8 @@ SUBROUTINE CHECK1(SFAC)
CALL STEST1(SCASUMTEST(N,CX,INCX),STRUE4(NP1),
+ STRUE4(NP1),SFAC)
ELSE IF (ICASE.EQ.8) THEN
* .. CSCAL ..
CALL CSCAL(N,CA,CX,INCX)
* .. CSCALTEST ..
CALL CSCALTEST(N,CA,CX,INCX)
CALL CTEST(LEN,CX,CTRUE5(1,NP1,INCX),CTRUE5(1,NP1,INCX),
+ SFAC)
ELSE IF (ICASE.EQ.9) THEN
Expand All @@ -236,14 +236,14 @@ SUBROUTINE CHECK1(SFAC)
*
INCX = 1
IF (ICASE.EQ.8) THEN
* CSCAL
* CSCALTEST
* Add a test for alpha equal to zero.
CA = (0.0E0,0.0E0)
DO 80 I = 1, 5
MWPCT(I) = (0.0E0,0.0E0)
MWPCS(I) = (1.0E0,1.0E0)
80 CONTINUE
CALL CSCAL(5,CA,CX,INCX)
CALL CSCALTEST(5,CA,CX,INCX)
CALL CTEST(5,CX,MWPCT,MWPCS,SFAC)
ELSE IF (ICASE.EQ.9) THEN
* CSSCALTEST
Expand Down
5 changes: 3 additions & 2 deletions ctest/c_cblat1c.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ static real c_b43 = (float)1.;
extern /* Subroutine */ int ctest_(integer*, complex*, complex*, complex*, real*);
static complex mwpcs[5], mwpct[5];
extern /* Subroutine */ int itest1_(integer*, integer*), stest1_(real*,real*,real*,real*);
extern /* Subroutine */ int cscaltest_(), itest1_(), stest1_();
static complex cx[8];
extern real scnrm2test_(integer*, complex*, integer*);
static integer np1;
Expand Down Expand Up @@ -481,7 +482,7 @@ static real c_b43 = (float)1.;
stest1_(&r__1, &strue4[np1 - 1], &strue4[np1 - 1], sfac);
} else if (combla_1.icase == 8) {
/* .. CSCAL .. */
cscal_(&combla_1.n, &ca, cx, &combla_1.incx);
cscaltest_(&combla_1.n, &ca, cx, &combla_1.incx);
ctest_(&len, cx, &ctrue5[(np1 + combla_1.incx * 5 << 3) - 48],
&ctrue5[(np1 + combla_1.incx * 5 << 3) - 48], sfac);
} else if (combla_1.icase == 9) {
Expand Down Expand Up @@ -515,7 +516,7 @@ static real c_b43 = (float)1.;
mwpcs[i__1].r = (float)1., mwpcs[i__1].i = (float)1.;
/* L80: */
}
cscal_(&c__5, &ca, cx, &combla_1.incx);
cscaltest_(&c__5, &ca, cx, &combla_1.incx);
ctest_(&c__5, cx, mwpct, mwpcs, sfac);
} else if (combla_1.icase == 9) {
/* CSSCALTEST */
Expand Down
37 changes: 37 additions & 0 deletions getarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,9 +1679,46 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define LIBNAME "c910v"
#define CORENAME "C910V"
#endif
#endif
#ifdef FORCE_x280
#define FORCE
#define ARCHITECTURE "RISCV64"
#define SUBARCHITECTURE "x280"
#define SUBDIRNAME "riscv64"
#define ARCHCONFIG "-Dx280 " \
"-DL1_DATA_SIZE=64536 -DL1_DATA_LINESIZE=32 " \
"-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
#define LIBNAME "x280"
#define CORENAME "x280"
#else
#endif

#ifdef FORCE_RISCV64_ZVL256B
#define FORCE
#define ARCHITECTURE "RISCV64"
#define SUBARCHITECTURE "RISCV64_ZVL256B"
#define SUBDIRNAME "riscv64"
#define ARCHCONFIG "-DRISCV64_ZVL256B " \
"-DL1_DATA_SIZE=64536 -DL1_DATA_LINESIZE=32 " \
"-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
#define LIBNAME "riscv64_zvl256b"
#define CORENAME "RISCV64_ZVL256B"
#endif

#ifdef FORCE_RISCV64_ZVL128B
#define FORCE
#define ARCHITECTURE "RISCV64"
#define SUBARCHITECTURE "RISCV64_ZVL128B"
#define SUBDIRNAME "riscv64"
#define ARCHCONFIG "-DRISCV64_ZVL128B " \
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
#define LIBNAME "riscv64_zvl128b"
#define CORENAME "RISCV64_ZVL128B"
#endif

#if defined(FORCE_E2K) || defined(__e2k__)
#define FORCE
Expand Down
Loading