1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 11:15:55 +01:00

Fixing AVX 512 instantiation error. Need to move to extern templates urgently.

This commit is contained in:
Peter Boyle 2019-01-02 00:27:07 +00:00
parent 350508bdb3
commit a4d9200293
3 changed files with 35 additions and 31 deletions

View File

@ -59,9 +59,10 @@ public:
int Ls, int Nsite, const FermionField &in, FermionField &out,
int interior=1,int exterior=1) ;
template <bool EnableBool = true> static accelerator
typename std::enable_if<Impl::Dimension == 3 && Nc == 3 &&EnableBool, void>::type
DhopSite(int Opt,StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
template<bool EnableBool=true>
static accelerator_inline void
DhopSite(typename std::enable_if<(Impl::isFundamental==true && Nc == 3 &&EnableBool), int>::type Opt,
StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, int Ls, int Nsite,
const FermionFieldView &in, FermionFieldView &out,int interior=1,int exterior=1)
{
@ -110,9 +111,10 @@ public:
//bgq_l1p_optimisation(0);
}
template <bool EnableBool = true> static accelerator
typename std::enable_if<(Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool, void>::type
DhopSite(int Opt, StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
template<bool EnableBool=true>
static accelerator_inline void
DhopSite(typename std::enable_if<((Impl::isFundamental==false)||(Nc != 3))&& EnableBool, int>::type Opt,
StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, int Ls, int Nsite, const FermionFieldView &in, FermionFieldView &out,int interior=1,int exterior=1 )
{
// no kernel choice
@ -128,9 +130,10 @@ public:
}
}
template <bool EnableBool = true> static accelerator
typename std::enable_if<Impl::Dimension == 3 && Nc == 3 && EnableBool,void>::type
DhopSiteDag(int Opt, StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
template<bool EnableBool=true>
static accelerator_inline void
DhopSiteDag(typename std::enable_if<(Impl::isFundamental==true && Nc == 3 &&EnableBool), int>::type Opt,
StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, int Ls, int Nsite, const FermionFieldView &in, FermionFieldView &out,int interior=1,int exterior=1)
{
//bgq_l1p_optimisation(1);
@ -178,9 +181,10 @@ public:
//bgq_l1p_optimisation(0);
}
template <bool EnableBool = true> static accelerator
typename std::enable_if<(Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool,void>::type
DhopSiteDag(int Opt,StencilView &st, DoubledGaugeFieldView &U,SiteHalfSpinor * buf,
template<bool EnableBool=true>
static accelerator_inline void
DhopSiteDag(typename std::enable_if<((Impl::isFundamental==false)||(Nc != 3))&& EnableBool, int>::type Opt,
StencilView &st, DoubledGaugeFieldView &U,SiteHalfSpinor * buf,
int sF, int sU, int Ls, int Nsite, const FermionFieldView &in, FermionFieldView &out,int interior=1,int exterior=1)
{
for (int site = 0; site < Nsite; site++) {

View File

@ -82,7 +82,7 @@ WilsonKernels<Impl >::AsmDhopSiteDagExt(StencilView &st, DoubledGaugeFieldView &
#include <qcd/action/fermion/WilsonKernelsAsmAvx512.h>
#include <qcd/action/fermion/WilsonKernelsAsmQPX.h>
#define INSTANTIATE_ASM(A)\
#define INSTANTIATE_ASM(A) \
template void WilsonKernels<A>::AsmDhopSite(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor *buf,\
int ss,int ssU,int Ls,int Ns,const FermionFieldView &in, FermionFieldView &out);\
\
@ -99,27 +99,27 @@ template void WilsonKernels<A>::AsmDhopSiteExt(StencilView &st, DoubledGaugeFiel
template void WilsonKernels<A>::AsmDhopSiteDagExt(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor *buf,\
int ss,int ssU,int Ls,int Ns,const FermionFieldView &in, FermionFieldView &out);\
INSTANTIATE_ASM(WilsonImplF);
INSTANTIATE_ASM(WilsonImplD);
INSTANTIATE_ASM(ZWilsonImplF);
INSTANTIATE_ASM(ZWilsonImplD);
//INSTANTIATE_ASM(WilsonImplF);
//INSTANTIATE_ASM(WilsonImplD);
INSTANTIATE_ASM(GparityWilsonImplF);
INSTANTIATE_ASM(GparityWilsonImplD);
INSTANTIATE_ASM(DomainWallVec5dImplF);
INSTANTIATE_ASM(DomainWallVec5dImplD);
INSTANTIATE_ASM(ZDomainWallVec5dImplF);
INSTANTIATE_ASM(ZDomainWallVec5dImplD);
//INSTANTIATE_ASM(ZWilsonImplF);
//INSTANTIATE_ASM(ZWilsonImplD);
//INSTANTIATE_ASM(DomainWallVec5dImplF);
//INSTANTIATE_ASM(DomainWallVec5dImplD);
//INSTANTIATE_ASM(ZDomainWallVec5dImplF);
//INSTANTIATE_ASM(ZDomainWallVec5dImplD);
INSTANTIATE_ASM(WilsonImplFH);
INSTANTIATE_ASM(WilsonImplDF);
INSTANTIATE_ASM(ZWilsonImplFH);
INSTANTIATE_ASM(ZWilsonImplDF);
//INSTANTIATE_ASM(WilsonImplFH);
//INSTANTIATE_ASM(WilsonImplDF);
//INSTANTIATE_ASM(ZWilsonImplFH);
//INSTANTIATE_ASM(ZWilsonImplDF);
INSTANTIATE_ASM(GparityWilsonImplFH);
INSTANTIATE_ASM(GparityWilsonImplDF);
INSTANTIATE_ASM(DomainWallVec5dImplFH);
INSTANTIATE_ASM(DomainWallVec5dImplDF);
INSTANTIATE_ASM(ZDomainWallVec5dImplFH);
INSTANTIATE_ASM(ZDomainWallVec5dImplDF);
//INSTANTIATE_ASM(DomainWallVec5dImplFH);
//INSTANTIATE_ASM(DomainWallVec5dImplDF);
//INSTANTIATE_ASM(ZDomainWallVec5dImplFH);
//INSTANTIATE_ASM(ZDomainWallVec5dImplDF);
NAMESPACE_END(Grid);

View File

@ -328,7 +328,7 @@ void WilsonKernels<Impl>::DhopKernel(int Opt,StencilImpl &st, DoubledGaugeField
accelerator_loop( ss, U_v, {
int sU = ss;
int sF = Ls * sU;
DhopSite(Opt,st_v,U_v,st.CommBuf(),sF,sU,Ls,1,in_v,out_v);
WilsonKernels<Impl>::DhopSite(Opt,st_v,U_v,st.CommBuf(),sF,sU,Ls,1,in_v,out_v);
});
}
}
@ -359,7 +359,7 @@ void WilsonKernels<Impl>::DhopKernel(int Opt,StencilImpl &st, DoubledGaugeField
accelerator_loop( ss, U_v, {
int sU = ss;
int sF = Ls * sU;
DhopSiteDag(Opt,st,U_v,st.CommBuf(),sF,sU,Ls,1,in_v,out_v);
WilsonKernels<Impl>::DhopSiteDag(Opt,st,U_v,st.CommBuf(),sF,sU,Ls,1,in_v,out_v);
});
}
}