PROPHET/OS

NAME

rowkernel: runs a row kernel of ProphetCC on the card once over n words (R13-PGL-52)

SYNOPSIS

rowkernel <kernel.psm> <n> [seed] [out] [scratch]

DESCRIPTION

Runs a row kernel of ProphetCC on the card once over n words (R13-PGL-52): a loop over rows in a function marked target("sm86"), the kernel taking (u32 *out, const u32 *in, u64 n). The input is n words of the seed's sequence (a 64-bit x, x ^= x << 13, x ^= x >> 7, x ^= x << 17, its low word each; seed 1 when not given); the output is laid to 0xA5A5A5A5 first, so a word the kernel never writes shows. n lies in 1 .. 16777216.

The answer is one line, the FNV-1a of the output's bytes, which the compiler's check holds against the loop as written on the host over the same input; with out the output's words go into that file too (- for none). With scratch the kernel takes a fourth argument, u32 *scratch of that many words laid to 0, where the threads of all blocks meet. No time is taken.

Back comes 0 when the card ran it and the output was read back, 1 when the card or the buffers refused, 2 for wrong arguments, a missing kernel or no memory.

EXAMPLE

$ rowkernel --help
rowkernel <kernel.psm> <n> [seed] [out] [scratch]
  runs a row kernel (out, in, n) on the card over n words of the seed's sequence
  and says the FNV-1a of the output

SEE ALSO

gpu_atomtest, pcl_matmul