For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
TemplateType
TemplateType
class max.experimental.custom.TemplateType(dtype, shape)
Bases: object
One entry in a CustomOp signature, input or output.
dtype is a concrete DType or a DTypeVar;
entries sharing a variable must agree on the actual dtype at call time.
shape holds Symbol and Param values, statics, or
expressions over them; its length is the entry’s rank. There is no
device: the op takes its device from its operands at each call.
Instances are immutable: CustomOp validates a signature once
at declaration, so an entry must not change underneath it afterwards.