futhark-0.25.27: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

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

- reduceDeviceSyncs :: Pass GPU GPU

# Documentation

reduceDeviceSyncs :: Pass GPU GPU Source #

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