Skip to content
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

Various fixes for the new Z14 target #1993

Merged
merged 8 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions TargetList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ THUNDERX2T99
9.System Z:
ZARCH_GENERIC
Z13
Z14
7 changes: 7 additions & 0 deletions cpuid_zarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ void get_cpuconfig(void)
break;
case CPU_Z14:
printf("#define Z14\n");
printf("#define L1_DATA_SIZE 131072\n");
printf("#define L1_DATA_LINESIZE 256\n");
printf("#define L1_DATA_ASSOCIATIVE 8\n");
printf("#define L2_SIZE 4194304\n");
printf("#define L2_LINESIZE 256\n");
printf("#define L2_ASSOCIATIVE 8\n");
printf("#define DTB_DEFAULT_ENTRIES 64\n");
printf("#define DTB_SIZE 4096\n");
break;
}
}
10 changes: 10 additions & 0 deletions getarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,16 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CORENAME "Z13"
#endif

#ifdef FORCE_Z14
#define FORCE
#define ARCHITECTURE "ZARCH"
#define SUBARCHITECTURE "Z14"
#define ARCHCONFIG "-DZ14 " \
"-DDTB_DEFAULT_ENTRIES=64"
#define LIBNAME "z14"
#define CORENAME "Z14"
#endif

#ifndef FORCE

#ifdef USER_TARGET
Expand Down
4 changes: 4 additions & 0 deletions kernel/Makefile.L3
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ ifeq ($(ARCH), zarch)
USE_TRMM = 1
endif

ifeq ($(CORE), Z14)
USE_TRMM = 1
endif




Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/damax.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static FLOAT damax_kernel_32(BLASLONG n, FLOAT *x)

"vfmaxdb %%v16,%%v16,%%v17,8 \n\t"

"vfmaxdb %%v0,%%v0,%%16,8 \n\t"
"vfmaxdb %%v0,%%v0,%%v16,8 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/damin.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static FLOAT damin_kernel_32(BLASLONG n, FLOAT *x)

"vfmindb %%v16,%%v16,%%v17,8 \n\t"

"vfmindb %%v0,%%v0,%%16,8 \n\t"
"vfmindb %%v0,%%v0,%%v16,8 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/dmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static FLOAT dmax_kernel_32(BLASLONG n, FLOAT *x)

"vfmaxdb %%v16,%%v16,%%v17,0 \n\t"

"vfmaxdb %%v0,%%v0,%%16,0 \n\t"
"vfmaxdb %%v0,%%v0,%%v16,0 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/dmin.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static FLOAT dmin_kernel_32(BLASLONG n, FLOAT *x)

"vfmindb %%v16,%%v16,%%v17,0 \n\t"

"vfmindb %%v0,%%v0,%%16,0 \n\t"
"vfmindb %%v0,%%v0,%%v16,0 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
7 changes: 4 additions & 3 deletions kernel/zarch/dsdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ double CNAME(BLASLONG n,FLOAT *x,BLASLONG inc_x,FLOAT *y,BLASLONG inc_y)
while(i < n)
{

dot += y[i] * x[i] ;
dot += (double) y[i] * (double) x[i] ;
i++ ;

}
Expand All @@ -146,7 +146,8 @@ double CNAME(BLASLONG n,FLOAT *x,BLASLONG inc_x,FLOAT *y,BLASLONG inc_y)
while(i < n1)
{

dot += y[iy] * x[ix] + y[iy+inc_y] * x[ix+inc_x];
dot += (double) y[iy] * (double) x[ix];
dot += (double) y[iy+inc_y] * (double) x[ix+inc_x];
ix += inc_x*2 ;
iy += inc_y*2 ;
i+=2 ;
Expand All @@ -156,7 +157,7 @@ double CNAME(BLASLONG n,FLOAT *x,BLASLONG inc_x,FLOAT *y,BLASLONG inc_y)
while(i < n)
{

dot += y[iy] * x[ix] ;
dot += (double) y[iy] * (double) x[ix] ;
ix += inc_x ;
iy += inc_y ;
i++ ;
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/samax.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static FLOAT samax_kernel_64(BLASLONG n, FLOAT *x)

"vfmaxsb %%v16,%%v16,%%v17,8 \n\t"

"vfmaxsb %%v0,%%v0,%%16,8 \n\t"
"vfmaxsb %%v0,%%v0,%%v16,8 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/samin.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static FLOAT samin_kernel_64(BLASLONG n, FLOAT *x)

"vfminsb %%v16,%%v16,%%v17,8 \n\t"

"vfminsb %%v0,%%v0,%%16,8 \n\t"
"vfminsb %%v0,%%v0,%%v16,8 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/smax.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static FLOAT smax_kernel_64(BLASLONG n, FLOAT *x)

"vfmaxsb %%v16,%%v16,%%v17,0 \n\t"

"vfmaxsb %%v0,%%v0,%%16,0 \n\t"
"vfmaxsb %%v0,%%v0,%%v16,0 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
2 changes: 1 addition & 1 deletion kernel/zarch/smin.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static FLOAT smin_kernel_64(BLASLONG n, FLOAT *x)

"vfminsb %%v16,%%v16,%%v17,0 \n\t"

"vfminsb %%v0,%%v0,%%16,0 \n\t"
"vfminsb %%v0,%%v0,%%v16,0 \n\t"

"agfi %%r1, 256 \n\t"
"brctg %%r0, 0b \n\t"
Expand Down
40 changes: 40 additions & 0 deletions param.h
Original file line number Diff line number Diff line change
Expand Up @@ -2915,6 +2915,46 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif


#if defined(Z14)
#define SNUMOPT 2
#define DNUMOPT 2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 8
#define SGEMM_DEFAULT_UNROLL_N 4

#define DGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_N 4

#define CGEMM_DEFAULT_UNROLL_M 4
#define CGEMM_DEFAULT_UNROLL_N 4

#define ZGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_N 4

#define SGEMM_DEFAULT_P 456
#define DGEMM_DEFAULT_P 320
#define CGEMM_DEFAULT_P 480
#define ZGEMM_DEFAULT_P 224

#define SGEMM_DEFAULT_Q 488
#define DGEMM_DEFAULT_Q 384
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 352

#define SGEMM_DEFAULT_R 8192
#define DGEMM_DEFAULT_R 4096
#define CGEMM_DEFAULT_R 4096
#define ZGEMM_DEFAULT_R 2048


#define SYMV_P 16
#endif



#ifdef GENERIC

Expand Down
Loading