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

Futhark.Optimise.ReduceDeviceSyncs

Description

This module implements an optimization that migrates host statements into GPUBody kernels to reduce the number of host-device synchronizations that occur when a scalar variable is written to or read from device memory. Which statements that should be migrated are determined by a MigrationTable produced by the Futhark.Optimise.ReduceDeviceSyncs.MigrationTable module; this module merely performs the migration and rewriting dictated by that table.

Synopsis

Documentation

reduceDeviceSyncs :: Pass GPU GPU Source #

An optimization pass that migrates host statements into GPUBody kernels to reduce the number of host-device synchronizations.