FK20 CUDA
|
#include <cstring>
#include <time.h>
#include "fr.cuh"
#include "fp.cuh"
#include "g1.cuh"
#include "fk20.cuh"
#include "fk20test.cuh"
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] |
#define PatternOnWorkspaceMemory |
Definition at line 35 of file fk20_512test.cu.
#define PTRN_FRTMP memset(fr_tmp_, 0x88, 512*16*512*sizeof(fr_t)); |
Definition at line 38 of file fk20_512test.cu.
Definition at line 37 of file fk20_512test.cu.
#define START_INDEX 3 |
Definition at line 720 of file fk20_512test.cu.
void fk20_msmloop_512 | ( | unsigned | rows | ) |
Test for fk20_msm: Toeplitz_coefficients+xext_fft -> hext_fft.
rows | number of blocks in the range [1,512] |
Definition at line 650 of file fk20_512test.cu.
void fk20_poly2h_fft_512 | ( | unsigned | rows | ) |
Test for fk20_poly2h_fft: polynomial -> h_fft.
rows | number of blocks in the range [1,512] |
Definition at line 575 of file fk20_512test.cu.
void fk20_poly2hext_fft_512 | ( | unsigned | rows | ) |
Test for fk20_poly2hext_fft: polynomial -> hext_fft.
rows | number of blocks in the range [1,512] |
Definition at line 535 of file fk20_512test.cu.
void fk20_poly2toeplitz_coefficients_512 | ( | unsigned | rows | ) |
Test for fk20_poly2toeplitz_coefficients: polynomial -> toeplitz_coefficients.
rows | number of blocks in the range [1,512] |
Definition at line 497 of file fk20_512test.cu.
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.
rows | number of blocks in the range [1,512] |
Definition at line 133 of file fk20_512test.cu.
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.
rows | number of blocks in the range [1,512] |
Definition at line 235 of file fk20_512test.cu.
void h2h_fft_512 | ( | unsigned | rows | ) |
Test for g1p_fft: h -> h_fft".
rows | number of blocks in the range [1,512] |
Definition at line 376 of file fk20_512test.cu.
void h_fft2h_512 | ( | unsigned | rows | ) |
Test for g1p_ift: h_fft -> h.
rows | number of blocks in the range [1,512] |
Definition at line 416 of file fk20_512test.cu.
void hext_fft2h_512 | ( | unsigned | rows | ) |
Test for g1p_ift: hext_fft -> h.
rows | number of blocks in the range [1,512] |
Definition at line 457 of file fk20_512test.cu.
void hext_fft2h_fft_512 | ( | unsigned | rows | ) |
Test for hext_fft2h_fft_512: hext_fft -> h_fft.
rows | number of blocks in the range [1,512] |
Definition at line 612 of file fk20_512test.cu.
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.
argc | Command line argument cont |
argv | Command line argument values |
Definition at line 75 of file fk20_512test.cu.
void toeplitz_coefficients2toeplitz_coefficients_fft_512 | ( | unsigned | rows | ) |
Test for fr_fft: toeplitz_coefficients -> toeplitz_coefficients_fft.
rows | number of blocks in the range [1,512] |
Definition at line 338 of file fk20_512test.cu.
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
[out] | target | Pointer to array |
[in] | size | length of the array |
[in] | step | distance between elements swapped. |
Definition at line 730 of file fk20_512test.cu.
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
[out] | target | Pointer to array |
[in] | size | length of the array |
[in] | step | distance between elements swapped. |
Definition at line 752 of file fk20_512test.cu.
|
extern |
Definition at line 84615 of file fk20_testvector.cu.
|
extern |
Definition at line 87178 of file fk20_testvector.cu.
|
extern |
Definition at line 82052 of file fk20_testvector.cu.
|
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.
|
extern |
Definition at line 65598 of file fk20_testvector.cu.
|
extern |
Definition at line 73825 of file fk20_testvector.cu.
|
extern |
Definition at line 24603 of file fk20_testvector.cu.