Skip to content

Commit a0ada4b

Browse files
authored
Merge pull request #98 from xianyi/develop
rebase
2 parents c164300 + 602a0c7 commit a0ada4b

File tree

13 files changed

+57
-42
lines changed

13 files changed

+57
-42
lines changed

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,23 @@ matrix:
104104
# for matrix annotation only
105105
- TARGET_BOX=PPC64LE_LINUX_P9
106106

107+
- os: linux
108+
arch: ppc64le
109+
dist: bionic
110+
compiler: gcc
111+
before_script:
112+
- sudo add-apt-repository 'ppa:ubuntu-toolchain-r/test' -y
113+
- sudo apt-get update
114+
- sudo apt-get install gcc-9 gfortran-9 -y
115+
script:
116+
- make QUIET_MAKE=1 BUILD_BFLOAT16=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
117+
- make -C test $COMMON_FLAGS $BTYPE
118+
- make -C ctest $COMMON_FLAGS $BTYPE
119+
- make -C utest $COMMON_FLAGS $BTYPE
120+
env:
121+
# for matrix annotation only
122+
- TARGET_BOX=PPC64LE_LINUX_P9
123+
107124
- os: linux
108125
compiler: gcc
109126
addons:

Makefile.tail

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
SHBLASOBJS_P = $(SHBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
1+
SBBLASOBJS_P = $(SBBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
22
SBLASOBJS_P = $(SBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
33
DBLASOBJS_P = $(DBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
44
QBLASOBJS_P = $(QBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
55
CBLASOBJS_P = $(CBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
66
ZBLASOBJS_P = $(ZBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
77
XBLASOBJS_P = $(XBLASOBJS:.$(SUFFIX)=.$(PSUFFIX))
8-
SHEXTOBJS_P = $(SHEXTOBJS:.$(SUFFIX)=.$(PSUFFIX))
8+
SBEXTOBJS_P = $(SBEXTOBJS:.$(SUFFIX)=.$(PSUFFIX))
99

1010
COMMONOBJS_P = $(COMMONOBJS:.$(SUFFIX)=.$(PSUFFIX))
1111

1212
HPLOBJS_P = $(HPLOBJS:.$(SUFFIX)=.$(PSUFFIX))
1313

14-
BLASOBJS = $(SHEXTOBJS) $(SHBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
15-
BLASOBJS_P = $(SHEXTOBJS_P) $(SHBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
14+
BLASOBJS = $(SBEXTOBJS) $(SBBLASOBJS) $(SBLASOBJS) $(DBLASOBJS) $(CBLASOBJS) $(ZBLASOBJS) $(CBAUXOBJS)
15+
BLASOBJS_P = $(SBEXTOBJS_P) $(SBBLASOBJS_P) $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P) $(CBAUXOBJS_P)
1616

1717
ifdef EXPRECISION
1818
BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
@@ -24,23 +24,23 @@ BLASOBJS += $(QBLASOBJS) $(XBLASOBJS)
2424
BLASOBJS_P += $(QBLASOBJS_P) $(XBLASOBJS_P)
2525
endif
2626

27-
$(SHBLASOBJS) $(SHBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
27+
$(SBBLASOBJS) $(SBBLASOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
2828
$(SBLASOBJS) $(SBLASOBJS_P) : override CFLAGS += -UDOUBLE -UCOMPLEX
2929
$(DBLASOBJS) $(DBLASOBJS_P) : override CFLAGS += -DDOUBLE -UCOMPLEX
3030
$(QBLASOBJS) $(QBLASOBJS_P) : override CFLAGS += -DXDOUBLE -UCOMPLEX
3131
$(CBLASOBJS) $(CBLASOBJS_P) : override CFLAGS += -UDOUBLE -DCOMPLEX
3232
$(ZBLASOBJS) $(ZBLASOBJS_P) : override CFLAGS += -DDOUBLE -DCOMPLEX
3333
$(XBLASOBJS) $(XBLASOBJS_P) : override CFLAGS += -DXDOUBLE -DCOMPLEX
34-
$(SHEXTOBJS) $(SHEXTOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
34+
$(SBEXTOBJS) $(SBEXTOBJS_P) : override CFLAGS += -DBFLOAT16 -UDOUBLE -UCOMPLEX
3535

36-
$(SHBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
36+
$(SBBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
3737
$(SBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
3838
$(DBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
3939
$(QBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
4040
$(CBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
4141
$(ZBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
4242
$(XBLASOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
43-
$(SHEXTOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
43+
$(SBEXTOBJS_P) : override CFLAGS += -DPROFILE $(COMMON_PROF)
4444

4545
libs :: $(BLASOBJS) $(COMMONOBJS)
4646
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^

cblas.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ void cblas_zgeadd(OPENBLAS_CONST enum CBLAS_ORDER CORDER,OPENBLAS_CONST blasint
384384

385385
/*** BFLOAT16 and INT8 extensions ***/
386386
/* convert float array to BFLOAT16 array by rounding */
387-
void cblas_shstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
387+
void cblas_sbstobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
388388
/* convert double array to BFLOAT16 array by rounding */
389-
void cblas_shdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
389+
void cblas_sbdtobf16(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *in, OPENBLAS_CONST blasint incin, bfloat16 *out, OPENBLAS_CONST blasint incout);
390390
/* convert BFLOAT16 array to float array */
391391
void cblas_sbf16tos(OPENBLAS_CONST blasint n, OPENBLAS_CONST bfloat16 *in, OPENBLAS_CONST blasint incin, float *out, OPENBLAS_CONST blasint incout);
392392
/* convert BFLOAT16 array to double array */

common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ typedef long BLASLONG;
257257
typedef unsigned long BLASULONG;
258258
#endif
259259

260-
#ifndef BFLOAT16
260+
#ifndef bfloat16
261261
#include <stdint.h>
262262
typedef uint16_t bfloat16;
263263
#define BFLOAT16CONVERSION 1

common_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ double BLASFUNC(ddot) (blasint *, double *, blasint *, double *, blasint *);
5555
xdouble BLASFUNC(qdot) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
5656

5757
float BLASFUNC(sbdot) (blasint *, bfloat16 *, blasint *, bfloat16 *, blasint *);
58-
void BLASFUNC(shstobf16) (blasint *, float *, blasint *, bfloat16 *, blasint *);
59-
void BLASFUNC(shdtobf16) (blasint *, double *, blasint *, bfloat16 *, blasint *);
58+
void BLASFUNC(sbstobf16) (blasint *, float *, blasint *, bfloat16 *, blasint *);
59+
void BLASFUNC(sbdtobf16) (blasint *, double *, blasint *, bfloat16 *, blasint *);
6060
void BLASFUNC(sbf16tos) (blasint *, bfloat16 *, blasint *, float *, blasint *);
6161
void BLASFUNC(dbf16tod) (blasint *, bfloat16 *, blasint *, double *, blasint *);
6262

common_level1.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ double ddot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
4848
xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
4949
float sbdot_k(BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
5050

51-
void shstobf16_k(BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
52-
void shdtobf16_k(BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
51+
void sbstobf16_k(BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
52+
void sbdtobf16_k(BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
5353
void sbf16tos_k (BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
5454
void dbf16tod_k (BLASLONG, bfloat16 *, BLASLONG, double *, BLASLONG);
5555

common_macro.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,9 @@
646646

647647
#elif defined(BFLOAT16)
648648

649-
#define D_TO_BF16_K SHDTOBF16_K
649+
#define D_TO_BF16_K SBDTOBF16_K
650650
#define D_BF16_TO_K DBF16TOD_K
651-
#define S_TO_BF16_K SHSTOBF16_K
651+
#define S_TO_BF16_K SBSTOBF16_K
652652
#define S_BF16_TO_K SBF16TOS_K
653653

654654
#define AMAX_K SAMAX_K

driver/level3/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ USE_GEMM3M = 1
2020
endif
2121

2222
ifeq ($(BUILD_BFLOAT16),1)
23-
SHBLASOBJS += sbgemm_nn.$(SUFFIX) sbgemm_nt.$(SUFFIX) sbgemm_tn.$(SUFFIX) sbgemm_tt.$(SUFFIX)
23+
SBBLASOBJS += sbgemm_nn.$(SUFFIX) sbgemm_nt.$(SUFFIX) sbgemm_tn.$(SUFFIX) sbgemm_tt.$(SUFFIX)
2424
endif
2525

2626
SBLASOBJS += \
@@ -208,7 +208,7 @@ COMMONOBJS += syrk_thread.$(SUFFIX)
208208

209209
ifndef USE_SIMPLE_THREADED_LEVEL3
210210
ifeq ($(BUILD_BFLOAT16),1)
211-
SHBLASOBJS += sbgemm_thread_nn.$(SUFFIX) sbgemm_thread_nt.$(SUFFIX) sbgemm_thread_tn.$(SUFFIX) sbgemm_thread_tt.$(SUFFIX)
211+
SBBLASOBJS += sbgemm_thread_nn.$(SUFFIX) sbgemm_thread_nt.$(SUFFIX) sbgemm_thread_tn.$(SUFFIX) sbgemm_thread_tt.$(SUFFIX)
212212
endif
213213
SBLASOBJS += sgemm_thread_nn.$(SUFFIX) sgemm_thread_nt.$(SUFFIX) sgemm_thread_tn.$(SUFFIX) sgemm_thread_tt.$(SUFFIX)
214214
DBLASOBJS += dgemm_thread_nn.$(SUFFIX) dgemm_thread_nt.$(SUFFIX) dgemm_thread_tn.$(SUFFIX) dgemm_thread_tt.$(SUFFIX)

exports/gensymbol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
zgeadd, dzsum);
5252

5353
@cblasobjs = (lsame, xerbla);
54-
@halfblasobjs = (sbgemm, sbdot, shstobf16, shdtobf16, sbf16tos, dbf16tod);
54+
@halfblasobjs = (sbgemm, sbdot, sbstobf16, sbdtobf16, sbf16tos, dbf16tod);
5555
@cblasobjsc = (
5656
cblas_caxpy, cblas_ccopy, cblas_cdotc, cblas_cdotu, cblas_cgbmv, cblas_cgemm, cblas_cgemv,
5757
cblas_cgerc, cblas_cgeru, cblas_chbmv, cblas_chemm, cblas_chemv, cblas_cher2, cblas_cher2k,
@@ -94,7 +94,7 @@
9494

9595
@cblasobjs = ( cblas_xerbla );
9696

97-
@halfcblasobjs = (cblas_sbgemm, cblas_sbdot, cblas_shstobf16, cblas_shdtobf16, cblas_sbf16tos, cblas_dbf16tod);
97+
@halfcblasobjs = (cblas_sbgemm, cblas_sbdot, cblas_sbstobf16, cblas_sbdtobf16, cblas_sbf16tos, cblas_dbf16tod);
9898

9999
@exblasobjs = (
100100
qamax,qamin,qasum,qaxpy,qcabs1,qcopy,qdot,qgbmv,qgemm,

interface/Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ CSBLAS3OBJS = \
283283
cblas_sgeadd.$(SUFFIX)
284284

285285
ifeq ($(BUILD_BFLOAT16),1)
286-
CBHBLAS1OBJS = cblas_sbdot.$(SUFFIX)
287-
CBHBLAS3OBJS = cblas_sbgemm.$(SUFFIX)
288-
CBHEXTOBJS = cblas_sbstobf16.$(SUFFIX) cblas_sbdtobf16.$(SUFFIX) cblas_sbf16tos.$(SUFFIX) cblas_dbf16tod.$(SUFFIX)
286+
CSBBLAS1OBJS = cblas_sbdot.$(SUFFIX)
287+
CSBBLAS3OBJS = cblas_sbgemm.$(SUFFIX)
288+
CSBEXTOBJS = cblas_sbstobf16.$(SUFFIX) cblas_sbdtobf16.$(SUFFIX) cblas_sbf16tos.$(SUFFIX) cblas_dbf16tod.$(SUFFIX)
289289
endif
290290

291291
CDBLAS1OBJS = \
@@ -535,19 +535,19 @@ endif
535535
clean ::
536536
@rm -f functable.h
537537

538-
level1 : $(BEXTOBJS) $(SHBLAS1OBJS) $(SBLAS1OBJS) $(DBLAS1OBJS) $(QBLAS1OBJS) $(CBLAS1OBJS) $(ZBLAS1OBJS) $(XBLAS1OBJS)
538+
level1 : $(SBEXTOBJS) $(SBBLAS1OBJS) $(SBLAS1OBJS) $(DBLAS1OBJS) $(QBLAS1OBJS) $(CBLAS1OBJS) $(ZBLAS1OBJS) $(XBLAS1OBJS)
539539
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
540540

541541
level2 : $(SBLAS2OBJS) $(DBLAS2OBJS) $(QBLAS2OBJS) $(CBLAS2OBJS) $(ZBLAS2OBJS) $(XBLAS2OBJS)
542542
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
543543

544-
level3 : $(SHBLAS3OBJS) $(SBLAS3OBJS) $(DBLAS3OBJS) $(QBLAS3OBJS) $(CBLAS3OBJS) $(ZBLAS3OBJS) $(XBLAS3OBJS)
544+
level3 : $(SBBLAS3OBJS) $(SBLAS3OBJS) $(DBLAS3OBJS) $(QBLAS3OBJS) $(CBLAS3OBJS) $(ZBLAS3OBJS) $(XBLAS3OBJS)
545545
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
546546

547547
aux : $(CBAUXOBJS)
548548
$(AR) $(ARFLAGS) -ru $(TOPDIR)/$(LIBNAME) $^
549549

550-
$(CSHBLASOBJS) $(CSHBLASOBJS_P) $(CSBLASOBJS) $(CSBLASOBJS_P) $(CDBLASOBJS) $(CDBLASOBJS_P) $(CQBLASOBJS) $(CQBLASOBJS_P) \
550+
$(CSBBLASOBJS) $(CSBBLASOBJS_P) $(CSBLASOBJS) $(CSBLASOBJS_P) $(CDBLASOBJS) $(CDBLASOBJS_P) $(CQBLASOBJS) $(CQBLASOBJS_P) \
551551
$(CCBLASOBJS) $(CCBLASOBJS_P) $(CZBLASOBJS) $(CZBLASOBJS_P) $(CXBLASOBJS) $(CXBLASOBJS_P) $(CBAUXOBJS_P) : override CFLAGS += -DCBLAS
552552

553553
srot.$(SUFFIX) srot.$(PSUFFIX) : rot.c
@@ -775,9 +775,9 @@ dsdot.$(SUFFIX) dsdot.$(PSUFFIX) : dsdot.c
775775
ifeq ($(BUILD_BFLOAT16),1)
776776
sbdot.$(SUFFIX) sbdot.$(PSUFFIX) : bf16dot.c
777777
$(CC) $(CFLAGS) -c $< -o $(@F)
778-
shstobf16.$(SUFFIX) shstobf16.$(PSUFFIX) : tobf16.c
778+
sbstobf16.$(SUFFIX) sbstobf16.$(PSUFFIX) : tobf16.c
779779
$(CC) $(CFLAGS) -DSINGLE_PREC -UDOUBLE_PREC -c $< -o $(@F)
780-
shdtobf16.$(SUFFIX) shdtobf16.$(PSUFFIX) : tobf16.c
780+
sbdtobf16.$(SUFFIX) sbdtobf16.$(PSUFFIX) : tobf16.c
781781
$(CC) $(CFLAGS) -USINGLE_PREC -DDOUBLE_PREC -c $< -o $(@F)
782782
sbf16tos.$(SUFFIX) sbf16tos.$(PSUFFIX) : bf16to.c
783783
$(CC) $(CFLAGS) -DSINGLE_PREC -UDOUBLE_PREC -c $< -o $(@F)
@@ -1526,9 +1526,9 @@ cblas_dsdot.$(SUFFIX) cblas_dsdot.$(PSUFFIX) : dsdot.c
15261526
ifeq ($(BUILD_BFLOAT16),1)
15271527
cblas_sbdot.$(SUFFIX) cblas_sbdot.$(PSUFFIX) : bf16dot.c
15281528
$(CC) $(CFLAGS) -DCBLAS -c $< -o $(@F)
1529-
cblas_shstobf16.$(SUFFIX) cblas_shstobf16.$(PSUFFIX) : tobf16.c
1529+
cblas_sbstobf16.$(SUFFIX) cblas_sbstobf16.$(PSUFFIX) : tobf16.c
15301530
$(CC) $(CFLAGS) -DCBLAS -DSINGLE_PREC -UDOUBLE_PREC -c $< -o $(@F)
1531-
cblas_shdtobf16.$(SUFFIX) cblas_shdtobf16.$(PSUFFIX) : tobf16.c
1531+
cblas_sbdtobf16.$(SUFFIX) cblas_sbdtobf16.$(PSUFFIX) : tobf16.c
15321532
$(CC) $(CFLAGS) -DCBLAS -USINGLE_PREC -DDOUBLE_PREC -c $< -o $(@F)
15331533
cblas_sbf16tos.$(SUFFIX) cblas_sbf16tos.$(PSUFFIX) : bf16to.c
15341534
$(CC) $(CFLAGS) -DCBLAS -DSINGLE_PREC -UDOUBLE_PREC -c $< -o $(@F)

0 commit comments

Comments
 (0)