IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo struct

IOSpec

struct IOSpec[mut: Bool, input: IO]

Parameter used to encode whether a particular tensor argument to a DPS kernel is an output, input, or mutable input.

IOSpec.Input == IOSpec[False, IO.Input]()
IOSpec.Output == IOSpec[True, IO.Output]()
IOSpec.MutableInput == IOSpec[True, IO.Input]()
IOSpec.FusedInput == IOSpec[False, IO.FusedInput]()
IOSpec.FusedOutput == IOSpec[True, IO.FusedOutput]()

These value aliases live as static members of IOSpec (rather than as module-level aliases) so that the bare names Input/Output/MutableInput are free for the tensor-argument traits in tensor_arg_traits.mojo.

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

FusedInput​

comptime FusedInput = IOSpec()

FusedOutput​

comptime FusedOutput = IOSpec()

Input​

comptime Input = IOSpec()

MutableInput​

comptime MutableInput = IOSpec()

Output​

comptime Output = IOSpec()

Unknown​

comptime Unknown = IOSpec()

Was this page helpful?