Compute kernel

In computing, a compute kernel is a routine compiled for high throughput accelerators (such as graphics processing units (GPUs), digital signal processors (DSPs) or field-programmable gate arrays (FPGAs)), separate from but used by a main program (typically running on a central processing unit). They are sometimes called compute shaders, sharing execution units with vertex shaders and pixel shaders on GPUs, but are not limited to execution on one class of device, or graphics APIs.[1][2]

Description

Compute kernels roughly correspond to inner loops when implementing algorithms in traditional languages (except there is no implied sequential operation), or to code passed to internal iterators.

They may be specified by a separate programming language such as "OpenCL C" (managed by the OpenCL API), as "compute shaders" (managed by a graphics API such as OpenGL), or embedded directly in application code written in a high level language, as in the case of C++AMP.

Vector processing

This programming paradigm maps well to vector processors: there is an assumption that each invocation of a kernel within a batch is independent, allowing for data parallel execution. However, atomic operations may sometimes be used for synchronization between elements (for interdependent work), in some scenarios. Individual invocations are given indices (in 1 or more dimensions) from which arbitrary addressing of buffer data may be performed (including scatter gather operations), so long as the non-overlapping assumption is respected.

Vulkan API

The Vulkan API provides the intermediate SPIR-V representation to describe both Graphical Shaders, and Compute Kernels, in a language independent and machine independent manner. The intention is to facilitate language evolution and provide a more natural ability to leverage GPU compute capabilities, in line with hardware developments such as Unified Memory Architecture and Heterogeneous System Architecture. This allows closer cooperation between a CPU and GPU.

gollark: Convert the uint8_ts to a uint32_t like you do there and cast that to a float?
gollark: Is the dark sorcery in this acceptable? https://tex.stackexchange.com/questions/94046/typesetting-poems
gollark: Also, if you burn down your house you lose the things inside. If you are sensible, you have backups of your computer's contents and so will not.
gollark: Someone breaking in wouldn't then contaminate my house with hard-to-detect burglars which could cause problems later, and reinstalling is waaaay easier than unburning houses.
gollark: You can probably kill the programs or reboot in safe mode, but this sort of behaviour is more "malware" than just "programs you don't want", so reinstalling is probably better. At least run an antivirus or something. It might help. Maybe.

See also

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.