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

Struct_first_rejected

struct Struct_first_rejected

Registers the sampler.first_rejected graph op.

Writes each row's first rejected draft position, or the row's draft count when every draft was accepted. A sentinel concat, an int32 cast, a descending range, a multiply and an argmax answer the same question with five launches over one [batch, drafts] mask; this answers it with one.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[_trace_name: StaticString](first: T, rejected: T, ctx: DeviceContext)

Was this page helpful?