Skip to content
Kavachकवच

GPU: CPU or GPU

● Advanced2 min

The runtime chooses CPU or GPU for each map. KAVACH_GPU overrides it, to debug or to compare.

KAVACH_GPUDoes
(not set)the runtime decides from the list's length and the work per item
offeverything on the CPU: use a debugger, or measure the CPU
onthe GPU for a list of any length
checkruns both, and panics at the first item whose results differ (floats compared with near)

The runtime estimates each gpu fn's work from its operations, with a loop counted once per round. A machine with no GPU runs everything on the CPU, with the same code and the same results.