Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GraphExecutor

Graph executor.

This is a thin wrapper of the underlying TVM module. you can also directly call set_input, run, and get_output of underlying module functions

Hierarchy

  • GraphExecutor

Implements

Index

Constructors

constructor

Properties

module

module: Module

Methods

benchmarkRuns

  • benchmarkRuns(dev: DLDevice, number?: number, repeat?: number): Promise<number[]>
  • Benchmark stable execution of the graph(without data copy).

    params

    dev The device to sync during each run.

    number

    The number of times to compute the average.

    repeat

    The number of times to repeat the run.

    Parameters

    • dev: DLDevice
    • Default value number: number = 10
    • Default value repeat: number = 4

    Returns Promise<number[]>

dispose

  • dispose(): void

getOutput

  • Get index-th output.

    Parameters

    • index: number

      The index number.

    • Default value out: NDArray | undefined = undefined

      The optional output storage parameters.

    Returns NDArray

    The output array.

loadParams

  • loadParams(paramBinary: Uint8Array): void
  • Load parameters from parameter binary.

    Parameters

    • paramBinary: Uint8Array

      The parameter binary.

    Returns void

run

  • run(): void
  • Execute the underlying graph.

    Returns void

setInput

  • setInput(key: number | string, value: NDArray): void
  • Set input to the executor.

    Parameters

    • key: number | string

      The input key.

    • value: NDArray

      The value to get set.

    Returns void

Generated using TypeDoc