Closed martin-ueding closed 2 years ago
I have tried to figure out where the float
comes from. The template parameter is taken as WordType<T>
in Chroma, where T is something I haven't figured out yet. Since I configure QDP++ with --enable-precision=double
, all the types should be double
I'd hope.
The inner solver precision is also set to double. So the mixed precision solver should not cause the reference to those float
-kernels either.
Could you tell me where I would have to look?
Hi Martin, Apologies for the late response. I have had some personal disruptions. I guess the issue is whether you want to use the mixed precision solver. For KNL we should have only SOA=4,8,16 for float and 2,4,8 for double. For AVX I thought the matrix was SOA=4,8 for float and SOA=2,4 for double. The mixed prec solver compiles all the time, and so may be causing you grief. However you should be able to use flags to control the inner precision type and soalen, so you should be able to do a mixedprec solver with double outer and double inner which should then build ok with soalen=2 (at least in principle)
Are you setting all of these flags?
Outer (outer precision is picked up from base precision) --enable-qphix-soalen=2
Inner --enable-qphix-solver-inner-type=double --enable-qphix-solver-inner-soalen=2
If this persists in being a problem, another workaround is to just not build the mixed prec solver. I can add an enable flag to do that.
I have checked these compilation flags and I do believe that the solver should indeed be build with double-double precision. Still it requires the QPhiX kernels in float.
Having a configure flag for building this solver sounds like a good workaround. It would be better if no float-kernels were loaded, but that might be harder to track down.
We want to do a lattice with Lx = 28. After checkerboarding this is 14 and must be divisible by the SoA length. Therefore we need
soalen = 2
in a build. We want to have double precision and it has to run on KNL, where the vector length is 8 for double and 16 for float.Taking a look into
codegen/jinja/isa.js
we see that AVX512 does not have the vector length that we need.However, with AVX2 we have this option:
The problem is that Chroma seems to compile with both single and double precision kernels and there is no single precision kernel with SoA length 2:
More than a year ago, before the great refactoring of QPhiX, this would have compiled because the kernel code was header-only and there was a default definition which would just raise a runtime error. This way one could still compile in this fashion but just had to be careful not to call it with single precision calls. Now we have to decide what we want:
Add non-functioning kernels to QPhiX which raise exceptions when called. This way Chroma would not need to be changed but QPhiX would have to generate broken kernels.
Chroma needs to be more careful which QPhiX objects are instantiated.