IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /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, Deinitable, Equatable, ImplicitlyCopyable, Movable

comptime members

COMPUTE

comptime COMPUTE = OpRole(Int(3))

FENCE

comptime FENCE = OpRole(Int(5))

FRAGMENT_LOAD

comptime FRAGMENT_LOAD = OpRole(Int(2))

GLOBAL_LOAD

comptime GLOBAL_LOAD = OpRole(Int(0))

NONE

comptime NONE = OpRole(Int(255))

SHARED_STORE

comptime SHARED_STORE = OpRole(Int(1))

SYNC

comptime SYNC = OpRole(Int(4))

VALU_COMPUTE

comptime VALU_COMPUTE = OpRole(Int(6))

Vector ALU compute (softmax, exp2, reductions).