| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Futhark.Bench
Description
Facilities for handling Futhark benchmark results. A Futhark benchmark program is just like a Futhark test program.
Synopsis
- newtype RunResult = RunResult {}
- data DataResult = DataResult Text (Either Text Result)
- data BenchResult = BenchResult {}
- data BenchMetadata = BenchMetadata {}
- data Result = Result {}
- encodeBenchResults :: [BenchResult] -> ByteString
- encodeBenchResultsWithMetadata :: BenchMetadata -> [BenchResult] -> ByteString
- decodeBenchResults :: ByteString -> Either String [BenchResult]
- binaryName :: FilePath -> FilePath
- benchmarkDataset :: Server -> RunOptions -> FutharkExe -> FilePath -> Text -> Values -> Maybe Success -> FilePath -> IO (Either Text ([RunResult], Text, ProfilingReport))
- data RunOptions = RunOptions {
- runMinRuns :: Int
- runMinTime :: NominalDiffTime
- runTimeout :: Int
- runVerbose :: Int
- runConvergencePhase :: Bool
- runConvergenceMaxTime :: NominalDiffTime
- runResultAction :: (Int, Maybe Double) -> IO ()
- runProfile :: Bool
- prepareBenchmarkProgram :: MonadIO m => Maybe Int -> CompileOptions -> FilePath -> [InputOutputs] -> m (Either (String, Maybe ByteString) ())
- data CompileOptions = CompileOptions {
- compFuthark :: String
- compBackend :: String
- compOptions :: [String]
- module Futhark.Profile
Documentation
The runtime of a single succesful run.
Constructors
| RunResult | |
Fields | |
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
| Show DataResult Source # | |
Defined in Futhark.Bench Methods showsPrec :: Int -> DataResult -> ShowS # show :: DataResult -> String # showList :: [DataResult] -> ShowS # | |
| Eq DataResult Source # | |
Defined in Futhark.Bench | |
data BenchResult Source #
The results for all datasets for some benchmark program.
Constructors
| BenchResult | |
Fields | |
Instances
| Show BenchResult Source # | |
Defined in Futhark.Bench Methods showsPrec :: Int -> BenchResult -> ShowS # show :: BenchResult -> String # showList :: [BenchResult] -> ShowS # | |
| Eq BenchResult Source # | |
Defined in Futhark.Bench | |
data BenchMetadata Source #
Information about the environment and invocation that produced a benchmark result file.
Constructors
| BenchMetadata | |
Fields
| |
Instances
| Show BenchMetadata Source # | |
Defined in Futhark.Bench Methods showsPrec :: Int -> BenchMetadata -> ShowS # show :: BenchMetadata -> String # showList :: [BenchMetadata] -> ShowS # | |
| Eq BenchMetadata Source # | |
Defined in Futhark.Bench Methods (==) :: BenchMetadata -> BenchMetadata -> Bool # (/=) :: BenchMetadata -> BenchMetadata -> Bool # | |
The measurements resulting from various successful runs of a benchmark (same dataset).
Constructors
| Result | |
Fields
| |
encodeBenchResults :: [BenchResult] -> ByteString Source #
Transform benchmark results to a JSON bytestring.
encodeBenchResultsWithMetadata :: BenchMetadata -> [BenchResult] -> ByteString Source #
Transform benchmark results and their provenance metadata to a JSON bytestring. Metadata is stored inside each benchmark object so existing consumers that iterate the top-level program keys remain compatible.
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
| |
module Futhark.Profile