mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-10-24 17:54:47 +01:00 
			
		
		
		
	Upgrade of the Britney test with flight recorder and fast xor checksum
This commit is contained in:
		| @@ -285,13 +285,25 @@ inline ComplexD rankInnerProduct(const Lattice<vobj> &left,const Lattice<vobj> & | ||||
| template<class vobj> | ||||
| inline ComplexD innerProduct(const Lattice<vobj> &left,const Lattice<vobj> &right) { | ||||
|   GridBase *grid = left.Grid(); | ||||
|   uint32_t csum=0; | ||||
|   //  Uint32Checksum(left,csum); | ||||
|  | ||||
| #ifdef GRID_SYCL | ||||
|   uint64_t csum=0; | ||||
|   if ( FlightRecorder::LoggingMode != FlightRecorder::LoggingModeNone) | ||||
|   { | ||||
|     // Hack | ||||
|     // Fast integer xor checksum. Can also be used in comms now. | ||||
|     autoView(l_v,left,AcceleratorRead); | ||||
|     Integer words = left.Grid()->oSites()*sizeof(vobj)/sizeof(uint64_t); | ||||
|     uint64_t *base= (uint64_t *)&l_v[0]; | ||||
|     csum=svm_xor(base,words); | ||||
|   } | ||||
|   FlightRecorder::CsumLog(csum); | ||||
| #endif | ||||
|   ComplexD nrm = rankInnerProduct(left,right); | ||||
|   RealD local = real(nrm); | ||||
|   GridNormLog(real(nrm),csum); // Could log before and after global sum to distinguish local and MPI | ||||
|   FlightRecorder::NormLog(real(nrm));  | ||||
|   grid->GlobalSum(nrm); | ||||
|   GridMPINormLog(local,real(nrm));  | ||||
|   FlightRecorder::ReductionLog(local,real(nrm));  | ||||
|   return nrm; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user