gpu-kernel-runner
gpu-kernel-runner copied to clipboard
Runs a single CUDA/OpenCL kernel, taking its source from a file and arguments from the command-line
At the moment, if we generate scalar argument values, we print a list of their names to the log, but we don't list their values. It would be nice if...
We don't currently check that the launch configurations specified by the user, or computed/deduced by the adapter, are even supported by the device. Let's add such checks and fail early...
Since the runner supports OpenCL, it would be nice if it could build on machines without CUDA, using OpenCL libraries only.
We currently only support dynamic shared memory when launching CUDA kernels. In OpenCL, it's more complex to use, requiring an association with a dummy kernel parameter. We should implement that.
At the moment, this runner will only work with NVIDIA GPUs: It requires the CUDA toolkit and driver, and will expect NVIDIA/CUDA's OpenCL library. We should, instead, make it CMake-configurable,...
If we provide size calculators for input buffers, they can be automatically size-checked by applying those calculators. This may allow us to implement a default input size validation function in...
Both CUDA and OpenCL allow you to use PTX as the source for a kernel, albeit somewhat differently than CUDA C++ or OpenCL C. The kernel runner should be adapted...
There are multiple functions in `kernel-runner.cpp` which take both OpenCL-specific and CUDA-specific params - only one of which is non-empty / non-null. We could use a single variant class instead....
The single_parameter_details class currently has fields which are redundant/null for scalars, and other fields which are redundant/null for buffers. Let's make this struct into a case-class or variant, which can...
CUDA supports device-side global variables (see [here](https://stackoverflow.com/q/6255215/1593077), 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...