FK20 CUDA
fk20_512test.cu File Reference
#include <cstring>
#include <time.h>
#include "fr.cuh"
#include "fp.cuh"
#include "g1.cuh"
#include "fk20.cuh"
#include "fk20test.cuh"
Include dependency graph for fk20_512test.cu:

Go to the source code of this file.

Macros

#define PatternOnWorkspaceMemory
 
#define PTRN_G1PTMP   memset(g1p_tmp, 0x88, 512*512*sizeof(g1p_t));
 
#define PTRN_FRTMP   memset(fr_tmp_, 0x88, 512*16*512*sizeof(fr_t));
 
#define START_INDEX   3
 

Functions

void toeplitz_coefficients2toeplitz_coefficients_fft_512 (unsigned rows)
 Test for fr_fft: toeplitz_coefficients -> toeplitz_coefficients_fft. More...
 
void h2h_fft_512 (unsigned rows)
 Test for g1p_fft: h -> h_fft". More...
 
void h_fft2h_512 (unsigned rows)
 Test for g1p_ift: h_fft -> h. More...
 
void hext_fft2h_512 (unsigned rows)
 Test for g1p_ift: hext_fft -> h. More...
 
void hext_fft2h_fft_512 (unsigned rows)
 Test for hext_fft2h_fft_512: hext_fft -> h_fft. More...
 
void fk20_poly2toeplitz_coefficients_512 (unsigned rows)
 Test for fk20_poly2toeplitz_coefficients: polynomial -> toeplitz_coefficients. More...
 
void fk20_poly2hext_fft_512 (unsigned rows)
 Test for fk20_poly2hext_fft: polynomial -> hext_fft. More...
 
void fk20_poly2h_fft_512 (unsigned rows)
 Test for fk20_poly2h_fft: polynomial -> h_fft. More...
 
void fk20_msmloop_512 (unsigned rows)
 Test for fk20_msm: Toeplitz_coefficients+xext_fft -> hext_fft. More...
 
void fullTest_512 (unsigned rows)
 Executes many FK20 computations on a single row, with a check on each step. A computation failure will not cause a cascade effect, eliminating false-fails due to data dependencies. More...
 
void fullTestFalseability_512 (unsigned rows)
 Similar to fullTest, but polynomial is has changes done to it. The function checks for false-positive in the tests. More...
 
void varMangle (fr_t *target, size_t size, unsigned step)
 swap elements at positions multiple of step. Nondestructive, call a second time to undo the changes More...
 
void varMangle (g1p_t *target, size_t size, unsigned step)
 swap elements at positions multiple of step. Nondestructive, call a second time to undo the changes More...
 
int main (int argc, char **argv)
 Executes a many-row tests on FK20. Behavior is similar to fk20test.cu but using many GPU blocks, each one executing one known-answer test. All tests are different. KATS are statically linked in the binary. More...
 

Variables

__managed__ g1p_t xext_fft [16][512]
 
__managed__ fr_t polynomial [512 *4096]
 
__managed__ fr_t toeplitz_coefficients [512 *16][512]
 
__managed__ fr_t toeplitz_coefficients_fft [512 *16][512]
 
__managed__ g1p_t hext_fft [512 *512]
 
__managed__ g1p_t h [512 *512]
 
__managed__ g1p_t h_fft [512 *512]
 

Macro Definition Documentation

◆ PatternOnWorkspaceMemory

#define PatternOnWorkspaceMemory

Definition at line 35 of file fk20_512test.cu.

◆ PTRN_FRTMP

#define PTRN_FRTMP   memset(fr_tmp_, 0x88, 512*16*512*sizeof(fr_t));

Definition at line 38 of file fk20_512test.cu.

◆ PTRN_G1PTMP

#define PTRN_G1PTMP   memset(g1p_tmp, 0x88, 512*512*sizeof(g1p_t));

Definition at line 37 of file fk20_512test.cu.

◆ START_INDEX

#define START_INDEX   3

Definition at line 720 of file fk20_512test.cu.

Function Documentation

◆ fk20_msmloop_512()

void fk20_msmloop_512 ( unsigned  rows)

Test for fk20_msm: Toeplitz_coefficients+xext_fft -> hext_fft.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 650 of file fk20_512test.cu.

Here is the caller graph for this function:

◆ fk20_poly2h_fft_512()

void fk20_poly2h_fft_512 ( unsigned  rows)

Test for fk20_poly2h_fft: polynomial -> h_fft.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 575 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fk20_poly2hext_fft_512()

void fk20_poly2hext_fft_512 ( unsigned  rows)

Test for fk20_poly2hext_fft: polynomial -> hext_fft.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 535 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fk20_poly2toeplitz_coefficients_512()

void fk20_poly2toeplitz_coefficients_512 ( unsigned  rows)

Test for fk20_poly2toeplitz_coefficients: polynomial -> toeplitz_coefficients.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 497 of file fk20_512test.cu.

Here is the caller graph for this function:

◆ fullTest_512()

void fullTest_512 ( unsigned  rows)

Executes many FK20 computations on a single row, with a check on each step. A computation failure will not cause a cascade effect, eliminating false-fails due to data dependencies.

NOTE ON DEPRECATED FUNCTIONS

In the main call, some tests are commented out, namely: -hext_fft2h_fft_512 -fk20_poly2toeplitz_coefficients_fft_test Those tests are regarding fk20 functions that execute more than one step in a single kernel. They cover a unimplemented (possible) future optimization.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 133 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fullTestFalseability_512()

void fullTestFalseability_512 ( unsigned  rows)

Similar to fullTest, but polynomial is has changes done to it. The function checks for false-positive in the tests.

polynomial is restored after execution.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 235 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ h2h_fft_512()

void h2h_fft_512 ( unsigned  rows)

Test for g1p_fft: h -> h_fft".

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 376 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ h_fft2h_512()

void h_fft2h_512 ( unsigned  rows)

Test for g1p_ift: h_fft -> h.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 416 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hext_fft2h_512()

void hext_fft2h_512 ( unsigned  rows)

Test for g1p_ift: hext_fft -> h.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 457 of file fk20_512test.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hext_fft2h_fft_512()

void hext_fft2h_fft_512 ( unsigned  rows)

Test for hext_fft2h_fft_512: hext_fft -> h_fft.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 612 of file fk20_512test.cu.

Here is the call graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Executes a many-row tests on FK20. Behavior is similar to fk20test.cu but using many GPU blocks, each one executing one known-answer test. All tests are different. KATS are statically linked in the binary.

Parameters
argcCommand line argument cont
argvCommand line argument values
Returns
int 0

Definition at line 75 of file fk20_512test.cu.

Here is the call graph for this function:

◆ toeplitz_coefficients2toeplitz_coefficients_fft_512()

void toeplitz_coefficients2toeplitz_coefficients_fft_512 ( unsigned  rows)

Test for fr_fft: toeplitz_coefficients -> toeplitz_coefficients_fft.

Parameters
rowsnumber of blocks in the range [1,512]

Definition at line 338 of file fk20_512test.cu.

Here is the caller graph for this function:

◆ varMangle() [1/2]

void varMangle ( fr_t target,
size_t  size,
unsigned  step 
)

swap elements at positions multiple of step. Nondestructive, call a second time to undo the changes

Parameters
[out]targetPointer to array
[in]sizelength of the array
[in]stepdistance between elements swapped.

Definition at line 730 of file fk20_512test.cu.

Here is the caller graph for this function:

◆ varMangle() [2/2]

void varMangle ( g1p_t target,
size_t  size,
unsigned  step 
)

swap elements at positions multiple of step. Nondestructive, call a second time to undo the changes

Parameters
[out]targetPointer to array
[in]sizelength of the array
[in]stepdistance between elements swapped.

Definition at line 752 of file fk20_512test.cu.

Variable Documentation

◆ h

__managed__ g1p_t h[512 *512]
extern

Definition at line 84615 of file fk20_testvector.cu.

◆ h_fft

__managed__ g1p_t h_fft[512 *512]
extern

Definition at line 87178 of file fk20_testvector.cu.

◆ hext_fft

__managed__ g1p_t hext_fft[512 *512]
extern

Definition at line 82052 of file fk20_testvector.cu.

◆ polynomial

__managed__ fr_t polynomial[512 *4096]
extern

Managed arrays to hold the valid intermediate values generated by the verified python implementation of FK20. Used by the test functions.

AVOID MANUAL EDIT Instead use the instrumented python code.

Definition at line 16 of file fk20_testvector.cu.

◆ toeplitz_coefficients

__managed__ fr_t toeplitz_coefficients[512 *16][512]
extern

Definition at line 65598 of file fk20_testvector.cu.

◆ toeplitz_coefficients_fft

__managed__ fr_t toeplitz_coefficients_fft[512 *16][512]
extern

Definition at line 73825 of file fk20_testvector.cu.

◆ xext_fft

__managed__ g1p_t xext_fft[16][512]
extern

Definition at line 24603 of file fk20_testvector.cu.