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

Futhark.Optimise.MergeGPUBodies

Description

This module implements an optimization pass that merges GPUBody kernels to eliminate memory transactions and reduce the number of kernel launches. This is useful because the Futhark.Optimise.ReduceDeviceSyncs pass introduces GPUBody kernels that only execute single statements.

To merge as many GPUBody kernels as possible, this pass reorders statements with the goal of bringing as many GPUBody statements next to each other in a sequence. Such sequence can then trivially be merged.

Synopsis

Documentation

mergeGPUBodies :: Pass GPU GPU Source #

An optimization pass that reorders and merges GPUBody statements to eliminate memory transactions and reduce the number of kernel launches.