TritonInstrumentOps

tti.experimental_assert_in_thread (triton::instrument::ExperimentalAssertInThreadOp)

Assert the condition within the current thread

Syntax:

operation ::= `tti.experimental_assert_in_thread` $condition `,` $message attr-dict `:` type($condition)

Assert that the condition is true given all the values are available in the current thread. If the condition is false, the message is printed, and the program is aborted. If check_any is true, any of the values in the condition must be true. Otherwise, all the values in the condition must be true.

Interfaces: MemoryEffectOpInterface (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{MemoryEffects::Write on ::mlir::triton::GlobalMemory}

Attributes:

AttributeMLIR TypeDescription
message::mlir::StringAttrstring attribute
check_any::mlir::BoolAttrbool attribute

Operands:

Operand

Description

condition

1-bit signless integer or tensor of 1-bit signless integer values

tti.experimental_buffer_pointers (triton::instrument::ExperimentalBufferPointersOp)

Definte an array of pointers to shared memory buffers

Syntax:

operation ::= `tti.experimental_buffer_pointers` $offsets `,` $memType attr-dict `:` type($result)

Create a tensor of pointers to shared memory buffers.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
offsets::mlir::DenseI32ArrayAttri32 dense array attribute
memType::mlir::triton::instrument::MemTypeAttrallowed 32-bit signless integer cases: 0, 1

Results:

Result

Description

result

ranked tensor of floating-point or integer or ptr values

tti.experimental_lock_acquire (triton::instrument::ExperimentalLockAcquireOp)

Acquire a lock.

Syntax:

operation ::= `tti.experimental_lock_acquire` $lock (`,` $pred^)? attr-dict `:` type($lock)

Enter a critical section by acquiring a lock with single thread.

Interfaces: MemoryEffectOpInterface (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{MemoryEffects::Write on ::mlir::triton::GlobalMemory}

Operands:

Operand

Description

lock

ptr or ranked tensor of ptr values

pred

1-bit signless integer

tti.experimental_lock_release (triton::instrument::ExperimentalLockReleaseOp)

Release a lock.

Syntax:

operation ::= `tti.experimental_lock_release` $lock (`,` $pred^)? attr-dict `:` type($lock)

Leave a critical section by releasing a lock with single thread.

Interfaces: MemoryEffectOpInterface (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{MemoryEffects::Write on ::mlir::triton::GlobalMemory}

Operands:

Operand

Description

lock

ptr or ranked tensor of ptr values

pred

1-bit signless integer

tti.experimental_memdesc_to_i64 (triton::instrument::ExperimentalMemDescToI64Op)

Convert a memdesc into its base pointer as i64

Syntax:

operation ::= `tti.experimental_memdesc_to_i64` $memdesc attr-dict `:` type($memdesc)

Extract the base pointer from the given memdesc and return it as a 64-bit integer. This can be used to compare the memdesc against tensors of barrier pointers maintained by the concurrency sanitizer.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand

Description

memdesc

memory descriptor type (::mlir::triton::gpu::MemDescType) in Triton IR type system

Results:

Result

Description

result

64-bit signless integer