-
Notifications
You must be signed in to change notification settings - Fork 27
Calling kernels
Nicholas Wilson edited this page Sep 25, 2016
·
1 revision
This page and associated features are a WORK IN PROGRESS.
So now that we can write kernels we want to be able to call them on our device (GPU, CPU other accelerator).
To do this we will use the dcompute driver library, dcompute.driver
. When we compile our project and kernels we get a file that looks like kernels_ocl210_64.spv
or kernels_cuda350_32.ptx
, depending if you built for CUDA or OpenCL on a 32 or 64-bit mode.
dcompute.driver
is a uniform wrapper around OpenCL and CUDA and is designed to be easy to use and does all the tedious API calls for you, because this is D and we have excellent metaprogramming.