eyalroz / gpu-kernel-runner

Runs a single CUDA/OpenCL kernel, taking its source from a file and arguments from the command-line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for device-side globals

eyalroz opened this issue · comments

CUDA supports device-side global variables (see here, for example). We should support running kernels which employ such variables. That means:

  1. Having the command-line and/or the kernel adapter specify what these are.
  2. Taking their value via the command-line (buffer-only? Buffer-or-scalar?)
  3. Registering them with the NVRTC program.
  4. Copying them "to symbol" before every run of the kernel. Or - copying them once and then making a copy if necessary, depending on whether the variable is read-only or not.
  5. Optionally copying the global variable values to to the host, to save as outputs (again - what about scalars?)

Also - need to look into these in OpenCL.