May 2019
Intermediate to advanced
452 pages
12h 16m
English
With reduction on HIP, you can use multiple thread blocks and decompose a computation into multiple kernel invocations, similar to CUDA, by maximizing parallelization and significantly lowering computation times.
To achieve reduction in HIP-C/C++, you need to expand the HIP __global__ kernel with multiple lines of code, just like CUDA.
To achieve reduction in OpenCL-C/C++, similarly, you need to expand the OpenCL __kernel function with multiple lines of code in the .cl file.
With PyOpenCL, you can perform reduction in a single line by importing the reduction module, just like in PyCUDA. It is also known as ReductionKernel, and you have the option to use actual OpenCL-C/C++ reduction code within the ...
Read now
Unlock full access