pymoose.Argument#

class pymoose.Argument(placement, dtype=None, vtype=None)[source]#

A type annotation Arguments to Moose computations.

This class is used for annotating the parameters of Moose computations with extra information needed to identify their graph Values in the compiler, and eventually to materialize those values at runtime.

Parameters
  • placement – A placement to pin this Argument to. The corresponding InputOp for the argument will be pinned to this placement.

  • dtype – If the Value is a Tensor, specify its dtype. Using this argument is equivalent to specifying vtype=TensorType(dtype=dtype).

  • vtype – The Moose Value type for the Argument. This type information is used during compilation to check correctness of the computation and to lower the computation graph into one that is runtime-ready. The type information of arguments is also checked at runtime.

__init__(placement, dtype=None, vtype=None)[source]#

Methods

__init__(placement[, dtype, vtype])

Attributes

dtype

vtype

placement