futhark-0.25.32: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageGHC2021

Futhark.Bench

Description

Facilities for handling Futhark benchmark results. A Futhark benchmark program is just like a Futhark test program.

Synopsis

Documentation

newtype RunResult Source #

The runtime of a single succesful run.

Constructors

RunResult 

Fields

Instances

Instances details
FromJSON RunResult Source # 
Instance details

Defined in Futhark.Bench

ToJSON RunResult Source # 
Instance details

Defined in Futhark.Bench

Show RunResult Source # 
Instance details

Defined in Futhark.Bench

Methods

showsPrec :: Int -> RunResult -> ShowS

show :: RunResult -> String

showList :: [RunResult] -> ShowS

Eq RunResult Source # 
Instance details

Defined in Futhark.Bench

Methods

(==) :: RunResult -> RunResult -> Bool

(/=) :: RunResult -> RunResult -> Bool

data DataResult Source #

The results for a single named dataset is either an error message, or a result.

Constructors

DataResult Text (Either Text Result) 

Instances

Instances details
Show DataResult Source # 
Instance details

Defined in Futhark.Bench

Methods

showsPrec :: Int -> DataResult -> ShowS

show :: DataResult -> String

showList :: [DataResult] -> ShowS

Eq DataResult Source # 
Instance details

Defined in Futhark.Bench

Methods

(==) :: DataResult -> DataResult -> Bool

(/=) :: DataResult -> DataResult -> Bool

data BenchResult Source #

The results for all datasets for some benchmark program.

Constructors

BenchResult 

Instances

Instances details
Show BenchResult Source # 
Instance details

Defined in Futhark.Bench

Methods

showsPrec :: Int -> BenchResult -> ShowS

show :: BenchResult -> String

showList :: [BenchResult] -> ShowS

Eq BenchResult Source # 
Instance details

Defined in Futhark.Bench

Methods

(==) :: BenchResult -> BenchResult -> Bool

(/=) :: BenchResult -> BenchResult -> Bool

data Result Source #

The measurements resulting from various successful runs of a benchmark (same dataset).

Constructors

Result 

Fields

  • runResults :: [RunResult]

    Runtime of every run.

  • memoryMap :: Map Text Int

    Memory usage.

  • stdErr :: Maybe Text

    The error output produced during execution. Often Nothing for space reasons, and otherwise only the output from the last run.

  • report :: Maybe ProfilingReport

    Profiling report. This will have been measured based on the last run.

Instances

Instances details
FromJSON Result Source # 
Instance details

Defined in Futhark.Bench

ToJSON Result Source # 
Instance details

Defined in Futhark.Bench

Show Result Source # 
Instance details

Defined in Futhark.Bench

Methods

showsPrec :: Int -> Result -> ShowS

show :: Result -> String

showList :: [Result] -> ShowS

Eq Result Source # 
Instance details

Defined in Futhark.Bench

Methods

(==) :: Result -> Result -> Bool

(/=) :: Result -> Result -> Bool

encodeBenchResults :: [BenchResult] -> ByteString Source #

Transform benchmark results to a JSON bytestring.

decodeBenchResults :: ByteString -> Either String [BenchResult] Source #

Decode benchmark results from a JSON bytestring.

binaryName :: FilePath -> FilePath Source #

The name we use for compiled programs.

benchmarkDataset :: Server -> RunOptions -> FutharkExe -> FilePath -> Text -> Values -> Maybe Success -> FilePath -> IO (Either Text ([RunResult], Text, ProfilingReport)) Source #

Run the benchmark program on the indicated dataset.

data RunOptions Source #

How to run a benchmark.

Constructors

RunOptions 

Fields

prepareBenchmarkProgram :: MonadIO m => Maybe Int -> CompileOptions -> FilePath -> [InputOutputs] -> m (Either (String, Maybe ByteString) ()) Source #

Compile and produce reference datasets.

data CompileOptions Source #

How to compile a benchmark.

Constructors

CompileOptions 

Fields