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

OpRole

struct OpRole

Role of an operation in the pipeline data flow.

Classifies ops for automatic phase derivation (prologue, epilogue, etc.). Set at OpDesc construction time by factory methods.

Implemented traits​

AnyType, Copyable, Equatable, ImplicitlyCopyable, ImplicitlyDestructible, Movable

comptime members​

COMPUTE​

comptime COMPUTE = OpRole(3)

FENCE​

comptime FENCE = OpRole(5)

FRAGMENT_LOAD​

comptime FRAGMENT_LOAD = OpRole(2)

GLOBAL_LOAD​

comptime GLOBAL_LOAD = OpRole(0)

NONE​

comptime NONE = OpRole(255)

SHARED_STORE​

comptime SHARED_STORE = OpRole(1)

SYNC​

comptime SYNC = OpRole(4)

VALU_COMPUTE​

comptime VALU_COMPUTE = OpRole(6)

Vector ALU compute (softmax, exp2, reductions).