|
|
698a2e |
From 14e717c4367c04570863220c3faf5ce41dabbf05 Mon Sep 17 00:00:00 2001
|
|
|
698a2e |
From: Andreas Arnez <arnez@linux.ibm.com>
|
|
|
698a2e |
Date: Wed, 29 May 2019 17:51:34 +0200
|
|
|
698a2e |
Subject: [PATCH 7/8] Enable "cross-compile"
|
|
|
698a2e |
|
|
|
698a2e |
This adds support for building ATLAS without running any target code. In
|
|
|
698a2e |
order for this to work, the archdefs must contain some additional files
|
|
|
698a2e |
that would otherwise be built during various tuning steps; see the new
|
|
|
698a2e |
targets extra_get and extra_put in "CONFIG/ARCHS/Makefile".
|
|
|
698a2e |
|
|
|
698a2e |
Even if the archdefs contain these additional files, cross compilation
|
|
|
698a2e |
is *not* automatically enabled. To activate it and disable tuning at
|
|
|
698a2e |
build time, add the option "-Si archdef 2" when running "configure".
|
|
|
698a2e |
---
|
|
|
698a2e |
CONFIG/ARCHS/Makefile | 24 ++++++++++++++++++++++++
|
|
|
698a2e |
bin/atlas_install.c | 2 ++
|
|
|
698a2e |
makes/Make.aux | 10 +++++-----
|
|
|
698a2e |
makes/Make.bin | 22 ++++++++++++++++++++++
|
|
|
698a2e |
makes/Make.l3tune | 6 ++++++
|
|
|
698a2e |
makes/Make.sysinfo | 8 +++++++-
|
|
|
698a2e |
6 files changed, 66 insertions(+), 6 deletions(-)
|
|
|
698a2e |
|
|
|
698a2e |
diff --git a/CONFIG/ARCHS/Makefile b/CONFIG/ARCHS/Makefile
|
|
|
698a2e |
index 321e05c..e61b5a0 100644
|
|
|
698a2e |
--- a/CONFIG/ARCHS/Makefile
|
|
|
698a2e |
+++ b/CONFIG/ARCHS/Makefile
|
|
|
698a2e |
@@ -211,3 +211,27 @@ ArchNew : $(mach) xnegflt
|
|
|
698a2e |
- cp $(BLDdir)/bin/INSTALL_LOG/?PerfSumm.txt $(adefd)/.
|
|
|
698a2e |
rm -f xnegflt
|
|
|
698a2e |
archput : sys_put kern_put gemm_put la_put
|
|
|
698a2e |
+
|
|
|
698a2e |
+ifdef ATL_NOTUNE
|
|
|
698a2e |
+
|
|
|
698a2e |
+# To avoid tuning, some extra files are needed.
|
|
|
698a2e |
+
|
|
|
698a2e |
+extra_get :
|
|
|
698a2e |
+ - cp $(INCAdir)/atlas_type.h $(adefd)/kern/
|
|
|
698a2e |
+ - cp $(INCAdir)/atlas_[sdcz]sysinfo.h $(adefd)/kern/
|
|
|
698a2e |
+ - cp $(INCAdir)/atlas_[sd]lamch.h $(adefd)/kern/
|
|
|
698a2e |
+ - cp $(INCAdir)/atlas_[sdcz]trsmXover.h $(adefd)/kern/
|
|
|
698a2e |
+ - cp $(INCAdir)/atlas_[sdcz]syr*NX.h $(adefd)/kern/
|
|
|
698a2e |
+
|
|
|
698a2e |
+extra_put :
|
|
|
698a2e |
+ - cp $(adefd)/kern/atlas_type.h $(INCAdir)/.
|
|
|
698a2e |
+ - cp $(adefd)/kern/atlas_[sdcz]sysinfo.h $(INCAdir)/.
|
|
|
698a2e |
+ - cp $(adefd)/kern/atlas_[sd]lamch.h $(INCAdir)/.
|
|
|
698a2e |
+ - cp $(adefd)/kern/atlas_[sdcz]trsmXover.h $(INCAdir)/.
|
|
|
698a2e |
+ - cp $(adefd)/kern/atlas_[sdcz]syr*NX.h $(INCAdir)/.
|
|
|
698a2e |
+
|
|
|
698a2e |
+ArchNew : extra_get
|
|
|
698a2e |
+
|
|
|
698a2e |
+archput : extra_put
|
|
|
698a2e |
+
|
|
|
698a2e |
+endif
|
|
|
698a2e |
diff --git a/bin/atlas_install.c b/bin/atlas_install.c
|
|
|
698a2e |
index de3eb3a..3c811e6 100644
|
|
|
698a2e |
--- a/bin/atlas_install.c
|
|
|
698a2e |
+++ b/bin/atlas_install.c
|
|
|
698a2e |
@@ -697,6 +697,8 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA)
|
|
|
698a2e |
ATL_Cassert(system("make IBozoL1.grd\n")==0,
|
|
|
698a2e |
"USING BOZO L1 DEFAULTS", NULL);
|
|
|
698a2e |
}
|
|
|
698a2e |
+ if (ARCHDEF >= 2)
|
|
|
698a2e |
+ setenv("ATL_NOTUNE", "1", 1);
|
|
|
698a2e |
if (ARCHDEF)
|
|
|
698a2e |
DefInstall = !system("make IArchDef.grd\n");
|
|
|
698a2e |
|
|
|
698a2e |
diff --git a/makes/Make.aux b/makes/Make.aux
|
|
|
698a2e |
index 1f769c8..c793028 100644
|
|
|
698a2e |
--- a/makes/Make.aux
|
|
|
698a2e |
+++ b/makes/Make.aux
|
|
|
698a2e |
@@ -113,23 +113,23 @@ clean :
|
|
|
698a2e |
|
|
|
698a2e |
$(ATLFWAIT) :
|
|
|
698a2e |
cd $(BINdir) ; $(MAKE) xatlas_waitfile
|
|
|
698a2e |
-$(INCAdir)/atlas_type.h : $(ATLFWAIT)
|
|
|
698a2e |
+$(INCAdir)/atlas_type.h : | $(ATLFWAIT)
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) $(INCAdir)/atlas_type.h
|
|
|
698a2e |
$(ATLFWAIT) -f $(INCAdir)/atlas_type.h
|
|
|
698a2e |
sINCdep = $(INCAdir)/atlas_ssysinfo.h $(INCAdir)/atlas_type.h
|
|
|
698a2e |
-$(INCAdir)/atlas_ssysinfo.h : $(ATLFWAIT)
|
|
|
698a2e |
+$(INCAdir)/atlas_ssysinfo.h : | $(ATLFWAIT)
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) $(INCAdir)/atlas_ssysinfo.h
|
|
|
698a2e |
$(ATLFWAIT) -f $(INCAdir)/atlas_ssysinfo.h
|
|
|
698a2e |
dINCdep = $(INCAdir)/atlas_dsysinfo.h $(INCAdir)/atlas_type.h
|
|
|
698a2e |
-$(INCAdir)/atlas_dsysinfo.h : $(ATLFWAIT)
|
|
|
698a2e |
+$(INCAdir)/atlas_dsysinfo.h : | $(ATLFWAIT)
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) $(INCAdir)/atlas_dsysinfo.h
|
|
|
698a2e |
$(ATLFWAIT) -f $(INCAdir)/atlas_dsysinfo.h
|
|
|
698a2e |
cINCdep = $(INCAdir)/atlas_csysinfo.h $(INCAdir)/atlas_type.h
|
|
|
698a2e |
-$(INCAdir)/atlas_csysinfo.h : $(ATLFWAIT)
|
|
|
698a2e |
+$(INCAdir)/atlas_csysinfo.h : | $(ATLFWAIT)
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) $(INCAdir)/atlas_csysinfo.h
|
|
|
698a2e |
$(ATLFWAIT) -f $(INCAdir)/atlas_csysinfo.h
|
|
|
698a2e |
zINCdep = $(INCAdir)/atlas_zsysinfo.h $(INCAdir)/atlas_type.h
|
|
|
698a2e |
-$(INCAdir)/atlas_zsysinfo.h : $(ATLFWAIT)
|
|
|
698a2e |
+$(INCAdir)/atlas_zsysinfo.h : | $(ATLFWAIT)
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) $(INCAdir)/atlas_zsysinfo.h
|
|
|
698a2e |
$(ATLFWAIT) -f $(INCAdir)/atlas_zsysinfo.h
|
|
|
698a2e |
|
|
|
698a2e |
diff --git a/makes/Make.bin b/makes/Make.bin
|
|
|
698a2e |
index 1035cb9..acad578 100644
|
|
|
698a2e |
--- a/makes/Make.bin
|
|
|
698a2e |
+++ b/makes/Make.bin
|
|
|
698a2e |
@@ -163,7 +163,9 @@ IRunMADef :
|
|
|
698a2e |
cd $(SYSdir) ; $(MAKE) RunMADef pre=$(pre)
|
|
|
698a2e |
|
|
|
698a2e |
IRunMMDef :
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
cd $(MMTdir) ; $(MAKE) RunMMDef pre=$(pre)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
cd $(MMTdir) ; ./xemit_mm -p $(pre) -R -2
|
|
|
698a2e |
cd $(MMTdir) ; $(MAKE) install pre=$(pre)
|
|
|
698a2e |
IKillL1 : force_build
|
|
|
698a2e |
@@ -303,22 +305,42 @@ INSTALL_LOG/$(pre)bestTT_$(nb)x$(nb)x$(nb) : \
|
|
|
698a2e |
cp $(MMTdir)/res/$(pre)bestTT_$(nb)x$(nb)x$(nb) INSTALL_LOG/.
|
|
|
698a2e |
|
|
|
698a2e |
$(R1Tdir)/res/$(pre)R2K.sum : $(R1Tdir)/res/$(pre)R1K.sum force_build
|
|
|
698a2e |
+ifdef ATL_NOTUNE
|
|
|
698a2e |
+ cd $(R1Tdir) ; $(MAKE) $(pre)r2install
|
|
|
698a2e |
+else
|
|
|
698a2e |
cd $(R1Tdir) ; $(MAKE) res/$(pre)R2K.sum pre=$(pre)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
$(R1Tdir)/res/$(pre)R1K.sum : force_build
|
|
|
698a2e |
+ifdef ATL_NOTUNE
|
|
|
698a2e |
+ cd $(R1Tdir) ; $(MAKE) $(pre)r1install
|
|
|
698a2e |
+else
|
|
|
698a2e |
cd $(R1Tdir) ; $(MAKE) res/$(pre)R1K.sum pre=$(pre)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
INSTALL_LOG/$(pre)R1K.sum : $(R1Tdir)/res/$(pre)R1K.sum
|
|
|
698a2e |
cp $(R1Tdir)/res/$(pre)R1K.sum INSTALL_LOG/.
|
|
|
698a2e |
INSTALL_LOG/$(pre)R2K.sum : INSTALL_LOG/$(pre)R1K.sum \
|
|
|
698a2e |
$(R1Tdir)/res/$(pre)R2K.sum
|
|
|
698a2e |
cp $(R1Tdir)/res/$(pre)R2K.sum INSTALL_LOG/.
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
cd $(R1Tdir) ; $(MAKE) $(pre)nxtune
|
|
|
698a2e |
+else
|
|
|
698a2e |
+ cd $(BLDdir)/src/blas/reference/level2 ; make $(pre)lib
|
|
|
698a2e |
+endif
|
|
|
698a2e |
|
|
|
698a2e |
$(MVTdir)/res/$(pre)MVNK.sum : force_build
|
|
|
698a2e |
+ifdef ATL_NOTUNE
|
|
|
698a2e |
+ cd $(MVTdir) ; $(MAKE) $(pre)mvninstall
|
|
|
698a2e |
+else
|
|
|
698a2e |
cd $(MVTdir) ; $(MAKE) res/$(pre)MVNK.sum pre=$(pre)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
INSTALL_LOG/$(pre)MVNK.sum : $(MVTdir)/res/$(pre)MVNK.sum
|
|
|
698a2e |
cp $(MVTdir)/res/$(pre)MVNK.sum INSTALL_LOG/.
|
|
|
698a2e |
$(MVTdir)/res/$(pre)MVTK.sum : force_build
|
|
|
698a2e |
+ifdef ATL_NOTUNE
|
|
|
698a2e |
+ cd $(MVTdir) ; $(MAKE) $(pre)mvtinstall
|
|
|
698a2e |
+else
|
|
|
698a2e |
cd $(MVTdir) ; $(MAKE) res/$(pre)MVTK.sum pre=$(pre)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
INSTALL_LOG/$(pre)MVTK.sum : $(MVTdir)/res/$(pre)MVTK.sum
|
|
|
698a2e |
cp $(MVTdir)/res/$(pre)MVTK.sum INSTALL_LOG/.
|
|
|
698a2e |
|
|
|
698a2e |
diff --git a/makes/Make.l3tune b/makes/Make.l3tune
|
|
|
698a2e |
index eaf7d7d..cd7f5f1 100644
|
|
|
698a2e |
--- a/makes/Make.l3tune
|
|
|
698a2e |
+++ b/makes/Make.l3tune
|
|
|
698a2e |
@@ -118,6 +118,7 @@ res/atlas_strsmXover.h :
|
|
|
698a2e |
cp $(strsmXover) res/.
|
|
|
698a2e |
|
|
|
698a2e |
stsmfc :
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
rm -f $(strsmXover)
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) slib
|
|
|
698a2e |
$(MAKE) xstsmfc2 pre=s typ=SREAL side=$(side) uplo=Upper_ \
|
|
|
698a2e |
@@ -128,6 +129,7 @@ stsmfc :
|
|
|
698a2e |
tran=NoTranspose_ diag=$(diag)
|
|
|
698a2e |
$(MAKE) xstsmfc2 pre=s typ=SREAL side=$(side) uplo=Lower_ \
|
|
|
698a2e |
tran=Transpose_ diag=$(diag)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) slib
|
|
|
698a2e |
dtrsmXover = $(INCAdir)/atlas_dtrsmXover.h
|
|
|
698a2e |
|
|
|
698a2e |
@@ -138,6 +140,7 @@ res/atlas_dtrsmXover.h :
|
|
|
698a2e |
cp $(dtrsmXover) res/.
|
|
|
698a2e |
|
|
|
698a2e |
dtsmfc :
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
rm -f $(dtrsmXover)
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) dlib
|
|
|
698a2e |
$(MAKE) xdtsmfc2 pre=d typ=DREAL side=$(side) uplo=Upper_ \
|
|
|
698a2e |
@@ -148,6 +151,7 @@ dtsmfc :
|
|
|
698a2e |
tran=NoTranspose_ diag=$(diag)
|
|
|
698a2e |
$(MAKE) xdtsmfc2 pre=d typ=DREAL side=$(side) uplo=Lower_ \
|
|
|
698a2e |
tran=Transpose_ diag=$(diag)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) dlib
|
|
|
698a2e |
qtrsmXover = $(INCAdir)/atlas_qtrsmXover.h
|
|
|
698a2e |
|
|
|
698a2e |
@@ -158,6 +162,7 @@ res/atlas_qtrsmXover.h :
|
|
|
698a2e |
cp $(qtrsmXover) res/.
|
|
|
698a2e |
|
|
|
698a2e |
qtsmfc :
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
rm -f $(qtrsmXover)
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) qlib
|
|
|
698a2e |
$(MAKE) xqtsmfc2 pre=q typ=QREAL side=$(side) uplo=Upper_ \
|
|
|
698a2e |
@@ -168,6 +173,7 @@ qtsmfc :
|
|
|
698a2e |
tran=NoTranspose_ diag=$(diag)
|
|
|
698a2e |
$(MAKE) xqtsmfc2 pre=q typ=QREAL side=$(side) uplo=Lower_ \
|
|
|
698a2e |
tran=Transpose_ diag=$(diag)
|
|
|
698a2e |
+endif
|
|
|
698a2e |
cd $(L3Bdir) ; $(MAKE) qlib
|
|
|
698a2e |
|
|
|
698a2e |
$(pre)tsmfc.o : force_build
|
|
|
698a2e |
diff --git a/makes/Make.sysinfo b/makes/Make.sysinfo
|
|
|
698a2e |
index 2b7dfdc..8e5dab2 100644
|
|
|
698a2e |
--- a/makes/Make.sysinfo
|
|
|
698a2e |
+++ b/makes/Make.sysinfo
|
|
|
698a2e |
@@ -5,6 +5,7 @@ maxlat=6
|
|
|
698a2e |
mflop=200
|
|
|
698a2e |
flags=
|
|
|
698a2e |
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
sTestFlags : force_build
|
|
|
698a2e |
$(MAKE) srbob `cat res/sBEST` pre='s' type=float
|
|
|
698a2e |
|
|
|
698a2e |
@@ -85,12 +86,14 @@ RunLamch : xemit_lamch
|
|
|
698a2e |
cp res/atlas_?lamch.h $(INCAdir)/.
|
|
|
698a2e |
RunTyp: xemit_typ
|
|
|
698a2e |
$(ATLRUN) $(SYSdir) xemit_typ > $(INCAdir)/atlas_type.h
|
|
|
698a2e |
+endif
|
|
|
698a2e |
|
|
|
698a2e |
xemit_buildinfo : emit_buildinfo.o
|
|
|
698a2e |
$(XCC) $(XCCFLAGS) -o $@ emit_buildinfo.o
|
|
|
698a2e |
xsyssum : GetSysSum.o
|
|
|
698a2e |
$(XCC) $(XCCFLAGS) -o $@ GetSysSum.o
|
|
|
698a2e |
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
xL1 : time.o L1CacheSize.o
|
|
|
698a2e |
$(KC) $(KCFLAGS) -o $@ L1CacheSize.o time.o
|
|
|
698a2e |
|
|
|
698a2e |
@@ -125,6 +128,7 @@ smatime.o : $(mySRCdir)/matime.c
|
|
|
698a2e |
$(KC) -c $(KCFLAGS) -DSREAL $(mySRCdir)/matime.c
|
|
|
698a2e |
xmasrch : $(mySRCdir)/masrch.c
|
|
|
698a2e |
$(XCC) $(XCCFLAGS) -o $@ $(mySRCdir)/masrch.c
|
|
|
698a2e |
+endif
|
|
|
698a2e |
|
|
|
698a2e |
ATL_cputime.c :
|
|
|
698a2e |
cp $(mySRCdir)/ATL_cputime.c .
|
|
|
698a2e |
@@ -143,6 +147,8 @@ emit_buildinfo.o : $(mySRCdir)/emit_buildinfo.c
|
|
|
698a2e |
$(XCC) -c $(XCCFLAGS) $(mySRCdir)/emit_buildinfo.c
|
|
|
698a2e |
GetSysSum.o : $(INCAdir)/atlas_type.h $(mySRCdir)/GetSysSum.c
|
|
|
698a2e |
$(XCC) -c $(XCCFLAGS) $(mySRCdir)/GetSysSum.c
|
|
|
698a2e |
+
|
|
|
698a2e |
+ifndef ATL_NOTUNE
|
|
|
698a2e |
time.o : $(mySRCdir)/time.c
|
|
|
698a2e |
$(KC) -c $(KCFLAGS) -I./ $(mySRCdir)/time.c
|
|
|
698a2e |
emit_lamch.o : $(mySRCdir)/emit_lamch.c
|
|
|
698a2e |
@@ -155,7 +161,7 @@ findNT.o : $(mySRCdir)/findNT.c
|
|
|
698a2e |
$(KC) -c $(KCFLAGS) $(mySRCdir)/findNT.c
|
|
|
698a2e |
tlb.o : $(mySRCdir)/tlb.c
|
|
|
698a2e |
$(KC) -c $(KCFLAGS) $(mySRCdir)/tlb.c
|
|
|
698a2e |
-
|
|
|
698a2e |
+endif
|
|
|
698a2e |
|
|
|
698a2e |
|
|
|
698a2e |
force_build :
|
|
|
698a2e |
--
|
|
|
698a2e |
2.23.0
|
|
|
698a2e |
|