Skip to Content

max_utils

View the code on GitHub

Structs

Functions

tensor_to_array

tensor_to_array(owned src: Tensor[float32]) -> Array
more details
Args
  • src: Tensor[float32]
Returns
  • Array

top_order

top_order(mut curr: Array) -> List[Array]
more details
Args
  • curr: Array
Returns
  • List[Array]

to_tensor

to_tensor(arg: Array) -> Tensor[float32]
more details
Args
  • arg: Array
Returns
  • Tensor[float32]

make_equal_rank

make_equal_rank(arg: Symbol, arg_shape: List[Int], comp_shape: List[Int]) -> Symbol
more details
Args
  • arg: Symbol

  • arg_shape: List[Int]

  • comp_shape: List[Int]

Returns
  • Symbol

build_graph

build_graph(args: List[Array], outputs: List[Array], trace: List[Array]) -> Graph
more details
Args
  • args: List[Array]

  • outputs: List[Array]

  • trace: List[Array]

Returns
  • Graph

build_model

build_model(args: List[Array], outputs: List[Array], trace: List[Array]) -> Model
more details
Args
  • args: List[Array]

  • outputs: List[Array]

  • trace: List[Array]

Returns
  • Model

execute_model

execute_model(args: List[Array], outputs: List[Array], model: Model) -> List[Array]
Execution of a model with MAX JIT compilation. No data copying, only temporary pointer borrowing for inputs and ownership stealing for outputs.
Args
  • args: List[Array]

  • outputs: List[Array]

  • model: Model

Returns
  • List[Array]
Last updated on