futhark-0.15.8: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.CodeGen.OpenCL.Heuristics

Description

Some OpenCL platforms have a SIMDwarpwavefront-based execution model that execute groups of threads in lockstep, permitting us to perform cross-thread synchronisation within each such group without the use of barriers. Unfortunately, there seems to be no reliable way to query these sizes at runtime. Instead, we use builtin tables to figure out which size we should use for a specific platform and device. If nothing matches here, the wave size should be set to one.

We also use this to select reasonable default group sizes and group counts.

Synopsis

Documentation

data SizeHeuristic Source #

A heuristic for setting the default value for something.

data DeviceType Source #

The type of OpenCL device that this heuristic applies to.

Constructors

DeviceCPU 
DeviceGPU 

data WhichSize Source #

A size that can be assigned a default.

data HeuristicValue Source #

The value supplies by a heuristic can be a constant, or inferred from some device information.

sizeHeuristicsTable :: [SizeHeuristic] Source #

All of our heuristics.