Beaver.MLIR.Dialect.NVVM (beaver v0.4.8)

Copy Markdown

Summary

Functions

Return op name nvvm.addf as a bitstring.

nvvm.addf -

Return op name nvvm.bar.warp.sync as a bitstring.

nvvm.bar.warp.sync - Warp Barrier Synchronization Op

Return op name nvvm.barrier as a bitstring.

nvvm.barrier - CTA Barrier Synchronization Op

Return op name nvvm.barrier.arrive as a bitstring.

nvvm.barrier.arrive

Return op name nvvm.barrier.reduction as a bitstring.

nvvm.barrier.reduction - CTA Barrier Reduction Op

Return op name nvvm.breakpoint as a bitstring.

nvvm.breakpoint - Breakpoint Op

Return op name nvvm.cluster.arrive as a bitstring.

nvvm.cluster.arrive - Cluster Barrier Arrive Op

Return op name nvvm.cluster.arrive.relaxed as a bitstring.

nvvm.cluster.arrive.relaxed - Cluster Barrier Relaxed Arrive Op

Return op name nvvm.cluster.wait as a bitstring.

nvvm.cluster.wait - Cluster Barrier Wait Op

Return op name nvvm.clusterlaunchcontrol.query.cancel as a bitstring.

nvvm.clusterlaunchcontrol.query.cancel - Query the response of a clusterlaunchcontrol.try.cancel operation

Return op name nvvm.clusterlaunchcontrol.try.cancel as a bitstring.

nvvm.clusterlaunchcontrol.try.cancel - Request atomically canceling the launch of a cluster that has not started running yet

Return op name nvvm.convert.bf16x2.to.f4x2 as a bitstring.

nvvm.convert.bf16x2.to.f4x2 - Convert an bf16x2 input to f4x2

Return op name nvvm.convert.bf16x2.to.f6x2 as a bitstring.

nvvm.convert.bf16x2.to.f6x2 - Convert an bf16x2 input to f6x2

Return op name nvvm.convert.bf16x2.to.f8x2 as a bitstring.

nvvm.convert.bf16x2.to.f8x2 - Convert a pair of bf16 inputs to f8x2

Return op name nvvm.convert.bf16x2.to.s2f6x2 as a bitstring.

nvvm.convert.bf16x2.to.s2f6x2 - Convert a pair of BF16 inputs to S2F6x2

Return op name nvvm.convert.f4x2.to.bf16x2 as a bitstring.

nvvm.convert.f4x2.to.bf16x2 - Convert a pair of f4 inputs to bf16x2

Return op name nvvm.convert.f4x2.to.f16x2 as a bitstring.

nvvm.convert.f4x2.to.f16x2 - Convert a pair of f4 inputs to f16x2

Return op name nvvm.convert.f6x2.to.bf16x2 as a bitstring.

nvvm.convert.f6x2.to.bf16x2 - Convert a pair of f6 inputs to bf16x2

Return op name nvvm.convert.f6x2.to.f16x2 as a bitstring.

nvvm.convert.f6x2.to.f16x2 - Convert a pair of f6 inputs to f16x2

Return op name nvvm.convert.f8x2.to.bf16x2 as a bitstring.

nvvm.convert.f8x2.to.bf16x2 - Convert a pair of f8 inputs to bf16x2

Return op name nvvm.convert.f8x2.to.f16x2 as a bitstring.

nvvm.convert.f8x2.to.f16x2 - Convert a pair of f8 inputs to f16x2

Return op name nvvm.convert.f16x2.to.f4x2 as a bitstring.

nvvm.convert.f16x2.to.f4x2 - Convert an f16x2 input to f4x2

Return op name nvvm.convert.f16x2.to.f6x2 as a bitstring.

nvvm.convert.f16x2.to.f6x2 - Convert an f16x2 input to f6x2

Return op name nvvm.convert.f16x2.to.f8x2 as a bitstring.

nvvm.convert.f16x2.to.f8x2 - Convert an f16x2 input to f8x2

Return op name nvvm.convert.f32x2.to.bf16x2 as a bitstring.

nvvm.convert.f32x2.to.bf16x2 - Convert two F32 values to packed bf16x2.

Return op name nvvm.convert.f32x2.to.f4x2 as a bitstring.

nvvm.convert.f32x2.to.f4x2 - Convert a pair of float inputs to f4x2

Return op name nvvm.convert.f32x2.to.f6x2 as a bitstring.

nvvm.convert.f32x2.to.f6x2 - Convert a pair of float inputs to f6x2

Return op name nvvm.convert.f32x2.to.f8x2 as a bitstring.

nvvm.convert.f32x2.to.f8x2 - Convert a pair of float inputs to f8x2

Return op name nvvm.convert.f32x2.to.f16x2 as a bitstring.

nvvm.convert.f32x2.to.f16x2 - Convert two F32 values to packed f16x2.

Return op name nvvm.convert.f32x2.to.s2f6x2 as a bitstring.

nvvm.convert.f32x2.to.s2f6x2 - Convert a pair of f32 inputs to S2F6x2

Return op name nvvm.convert.f32x4.to.f4x4 as a bitstring.

nvvm.convert.f32x4.to.f4x4 - Convert vector<4xf32> to packed f4x4 with stochastic rounding (.rs) and satfinite

Return op name nvvm.convert.f32x4.to.f6x4 as a bitstring.

nvvm.convert.f32x4.to.f6x4 - Convert vector<4xf32> to packed f6x4 with stochastic rounding (.rs) and satfinite

Return op name nvvm.convert.f32x4.to.f8x4 as a bitstring.

nvvm.convert.f32x4.to.f8x4 - Convert vector<4xf32> to packed f8x4 with stochastic rounding (.rs) and satfinite

Return op name nvvm.convert.float.to.tf32 as a bitstring.

nvvm.convert.float.to.tf32 - Convert the given float input to TF32

Return op name nvvm.convert.s2f6x2.to.bf16x2 as a bitstring.

nvvm.convert.s2f6x2.to.bf16x2 - Convert s2f6x2 to bf16x2

Return op name nvvm.cos as a bitstring.

nvvm.cos - Cosine (fast approximation)

Return op name nvvm.cp.async.bulk.commit.group as a bitstring.

nvvm.cp.async.bulk.commit.group

Return op name nvvm.cp.async.bulk.global.shared.cta as a bitstring.

nvvm.cp.async.bulk.global.shared.cta - Async bulk copy from Shared CTA memory to Global memory

Return op name nvvm.cp.async.bulk.prefetch as a bitstring.

nvvm.cp.async.bulk.prefetch - Async bulk prefetch from global memory to L2 cache

Return op name nvvm.cp.async.bulk.shared.cluster.global as a bitstring.

nvvm.cp.async.bulk.shared.cluster.global - Async bulk copy from global to Shared {cta or cluster} memory

Return op name nvvm.cp.async.bulk.shared.cluster.shared.cta as a bitstring.

nvvm.cp.async.bulk.shared.cluster.shared.cta - Async bulk copy from Shared CTA memory to Shared cluster memory

Return op name nvvm.cp.async.bulk.tensor.global.shared.cta as a bitstring.

nvvm.cp.async.bulk.tensor.global.shared.cta

Return op name nvvm.cp.async.bulk.tensor.prefetch as a bitstring.

nvvm.cp.async.bulk.tensor.prefetch

Return op name nvvm.cp.async.bulk.tensor.reduce as a bitstring.

nvvm.cp.async.bulk.tensor.reduce

Return op name nvvm.cp.async.bulk.tensor.shared.cluster.global as a bitstring.

nvvm.cp.async.bulk.tensor.shared.cluster.global

Return op name nvvm.cp.async.bulk.wait_group as a bitstring.

nvvm.cp.async.bulk.wait_group

Return op name nvvm.cp.async.commit.group as a bitstring.

nvvm.cp.async.commit.group

Return op name nvvm.cp.async.mbarrier.arrive as a bitstring.

nvvm.cp.async.mbarrier.arrive - NVVM Dialect Op for cp.async.mbarrier.arrive

Return op name nvvm.cp.async.shared.global as a bitstring.

nvvm.cp.async.shared.global

Return op name nvvm.cp.async.wait.group as a bitstring.

nvvm.cp.async.wait.group

Return op name nvvm.divf as a bitstring.

nvvm.divf - Divide one value by another

Return op name nvvm.dot.accumulate.2way as a bitstring.

nvvm.dot.accumulate.2way - Two-way 16-bit to 8-bit dot product-accumulate instruction

Return op name nvvm.dot.accumulate.4way as a bitstring.

nvvm.dot.accumulate.4way - Four-way byte dot product-accumulate instruction

Return op name nvvm.elect.sync as a bitstring.

nvvm.elect.sync - Elect one leader thread

Return op name nvvm.ex2 as a bitstring.

nvvm.ex2 - Base-2 exponential (fast approximation)

Return op name nvvm.exit as a bitstring.

nvvm.exit - Exit Op

Return op name nvvm.fence.mbarrier.init as a bitstring.

nvvm.fence.mbarrier.init

Return op name nvvm.fence.proxy as a bitstring.

nvvm.fence.proxy

Return op name nvvm.fence.proxy.acquire as a bitstring.

nvvm.fence.proxy.acquire - Uni-directional proxy fence operation with acquire semantics

Return op name nvvm.fence.proxy.release as a bitstring.

nvvm.fence.proxy.release - Uni-directional proxy fence operation with release semantics

Return op name nvvm.fence.proxy.sync_restrict as a bitstring.

nvvm.fence.proxy.sync_restrict - Uni-directional proxy fence operation with sync_restrict

Return op name nvvm.fence.sc.cluster as a bitstring.

nvvm.fence.sc.cluster

Return op name nvvm.fence.sync_restrict as a bitstring.

nvvm.fence.sync_restrict - Uni-directional thread fence operation

Return op name nvvm.fma as a bitstring.

nvvm.fma -

Return op name nvvm.griddepcontrol as a bitstring.

nvvm.griddepcontrol

Return op name nvvm.inline_ptx as a bitstring.

nvvm.inline_ptx - Inline PTX Op

Return op name nvvm.ldmatrix as a bitstring.

nvvm.ldmatrix - cooperative matrix load

Return op name nvvm.log2 as a bitstring.

nvvm.log2 - Base-2 logarithm (fast approximation)

Return op name nvvm.mapa as a bitstring.

nvvm.mapa

Return op name nvvm.match.sync as a bitstring.

nvvm.match.sync - Broadcast and compare a value across threads in warp

Return op name nvvm.mbarrier.arrive as a bitstring.

nvvm.mbarrier.arrive - MBarrier Arrive Operation

Return op name nvvm.mbarrier.arrive_drop as a bitstring.

nvvm.mbarrier.arrive_drop - MBarrier Arrive-Drop Operation

Return op name nvvm.mbarrier.arrive_drop.expect_tx as a bitstring.

nvvm.mbarrier.arrive_drop.expect_tx - MBarrier arrive_drop with expected transaction count

Return op name nvvm.mbarrier.arrive_drop.nocomplete as a bitstring.

nvvm.mbarrier.arrive_drop.nocomplete - MBarrier Arrive-Drop No-Complete Operation

Return op name nvvm.mbarrier.arrive.expect_tx as a bitstring.

nvvm.mbarrier.arrive.expect_tx - MBarrier Arrive with Expected Transaction Count

Return op name nvvm.mbarrier.arrive.nocomplete as a bitstring.

nvvm.mbarrier.arrive.nocomplete - MBarrier Arrive No-Complete Operation

Return op name nvvm.mbarrier.complete_tx as a bitstring.

nvvm.mbarrier.complete_tx - MBarrier complete-tx Operation

Return op name nvvm.mbarrier.expect_tx as a bitstring.

nvvm.mbarrier.expect_tx - MBarrier expect-tx Operation

Return op name nvvm.mbarrier.init as a bitstring.

nvvm.mbarrier.init - MBarrier Initialization Op

Return op name nvvm.mbarrier.inval as a bitstring.

nvvm.mbarrier.inval - MBarrier Invalidation Operation

Return op name nvvm.mbarrier.test.wait as a bitstring.

nvvm.mbarrier.test.wait - MBarrier Non-Blocking Test Wait Operation

Return op name nvvm.mbarrier.try_wait as a bitstring.

nvvm.mbarrier.try_wait - MBarrier try wait on state or phase with an optional timelimit

Return op name nvvm.mbarrier.try_wait.parity as a bitstring.

nvvm.mbarrier.try_wait.parity - MBarrier Potentially-Blocking Try Wait with Phase Parity

Return op name nvvm.memory.barrier as a bitstring.

nvvm.memory.barrier - Memory barrier operation

Return op name nvvm.mma.block_scale as a bitstring.

nvvm.mma.block_scale - cooperative matrix-multiply and accumulate with block scaling

Return op name nvvm.mma.sp.block_scale as a bitstring.

nvvm.mma.sp.block_scale - cooperative sparse matrix-multiply and accumulate with block scaling

Return op name nvvm.mma.sp.sync as a bitstring.

nvvm.mma.sp.sync - cooperative sparse matrix-multiply and accumulate

Return op name nvvm.mma.sync as a bitstring.

nvvm.mma.sync - cooperative matrix-multiply and accumulate

Return op name nvvm.movmatrix as a bitstring.

nvvm.movmatrix - Warp-level matrix transpose

Return op name nvvm.nanosleep as a bitstring.

nvvm.nanosleep - Suspends the thread for a specified duration.

Return op name nvvm.pmevent as a bitstring.

nvvm.pmevent - Trigger one or more Performance Monitor events.

Return op name nvvm.prefetch as a bitstring.

nvvm.prefetch - Brings the cache line containing an address into the specified cache level

Return op name nvvm.prmt as a bitstring.

nvvm.prmt - Permute bytes from two 32-bit registers

Return op name nvvm.rcp.approx.ftz.f as a bitstring.

nvvm.rcp.approx.ftz.f

Return op name nvvm.read.ptx.sreg.aggr.smem.size as a bitstring.

nvvm.read.ptx.sreg.aggr.smem.size

Return op name nvvm.read.ptx.sreg.clock64 as a bitstring.

nvvm.read.ptx.sreg.clock64

Return op name nvvm.read.ptx.sreg.clock as a bitstring.

nvvm.read.ptx.sreg.clock

Return op name nvvm.read.ptx.sreg.cluster.ctaid.x as a bitstring.

nvvm.read.ptx.sreg.cluster.ctaid.x

Return op name nvvm.read.ptx.sreg.cluster.ctaid.y as a bitstring.

nvvm.read.ptx.sreg.cluster.ctaid.y

Return op name nvvm.read.ptx.sreg.cluster.ctaid.z as a bitstring.

nvvm.read.ptx.sreg.cluster.ctaid.z

Return op name nvvm.read.ptx.sreg.cluster.ctarank as a bitstring.

nvvm.read.ptx.sreg.cluster.ctarank

Return op name nvvm.read.ptx.sreg.cluster.nctaid.x as a bitstring.

nvvm.read.ptx.sreg.cluster.nctaid.x

Return op name nvvm.read.ptx.sreg.cluster.nctaid.y as a bitstring.

nvvm.read.ptx.sreg.cluster.nctaid.y

Return op name nvvm.read.ptx.sreg.cluster.nctaid.z as a bitstring.

nvvm.read.ptx.sreg.cluster.nctaid.z

Return op name nvvm.read.ptx.sreg.cluster.nctarank as a bitstring.

nvvm.read.ptx.sreg.cluster.nctarank

Return op name nvvm.read.ptx.sreg.clusterid.x as a bitstring.

nvvm.read.ptx.sreg.clusterid.x

Return op name nvvm.read.ptx.sreg.clusterid.y as a bitstring.

nvvm.read.ptx.sreg.clusterid.y

Return op name nvvm.read.ptx.sreg.clusterid.z as a bitstring.

nvvm.read.ptx.sreg.clusterid.z

Return op name nvvm.read.ptx.sreg.ctaid.x as a bitstring.

nvvm.read.ptx.sreg.ctaid.x

Return op name nvvm.read.ptx.sreg.ctaid.y as a bitstring.

nvvm.read.ptx.sreg.ctaid.y

Return op name nvvm.read.ptx.sreg.ctaid.z as a bitstring.

nvvm.read.ptx.sreg.ctaid.z

Return op name nvvm.read.ptx.sreg.dynamic.smem.size as a bitstring.

nvvm.read.ptx.sreg.dynamic.smem.size

Return op name nvvm.read.ptx.sreg.envreg0 as a bitstring.

nvvm.read.ptx.sreg.envreg0

Return op name nvvm.read.ptx.sreg.envreg1 as a bitstring.

nvvm.read.ptx.sreg.envreg1

Return op name nvvm.read.ptx.sreg.envreg2 as a bitstring.

nvvm.read.ptx.sreg.envreg2

Return op name nvvm.read.ptx.sreg.envreg3 as a bitstring.

nvvm.read.ptx.sreg.envreg3

Return op name nvvm.read.ptx.sreg.envreg4 as a bitstring.

nvvm.read.ptx.sreg.envreg4

Return op name nvvm.read.ptx.sreg.envreg5 as a bitstring.

nvvm.read.ptx.sreg.envreg5

Return op name nvvm.read.ptx.sreg.envreg6 as a bitstring.

nvvm.read.ptx.sreg.envreg6

Return op name nvvm.read.ptx.sreg.envreg7 as a bitstring.

nvvm.read.ptx.sreg.envreg7

Return op name nvvm.read.ptx.sreg.envreg8 as a bitstring.

nvvm.read.ptx.sreg.envreg8

Return op name nvvm.read.ptx.sreg.envreg9 as a bitstring.

nvvm.read.ptx.sreg.envreg9

Return op name nvvm.read.ptx.sreg.envreg10 as a bitstring.

nvvm.read.ptx.sreg.envreg10

Return op name nvvm.read.ptx.sreg.envreg11 as a bitstring.

nvvm.read.ptx.sreg.envreg11

Return op name nvvm.read.ptx.sreg.envreg12 as a bitstring.

nvvm.read.ptx.sreg.envreg12

Return op name nvvm.read.ptx.sreg.envreg13 as a bitstring.

nvvm.read.ptx.sreg.envreg13

Return op name nvvm.read.ptx.sreg.envreg14 as a bitstring.

nvvm.read.ptx.sreg.envreg14

Return op name nvvm.read.ptx.sreg.envreg15 as a bitstring.

nvvm.read.ptx.sreg.envreg15

Return op name nvvm.read.ptx.sreg.envreg16 as a bitstring.

nvvm.read.ptx.sreg.envreg16

Return op name nvvm.read.ptx.sreg.envreg17 as a bitstring.

nvvm.read.ptx.sreg.envreg17

Return op name nvvm.read.ptx.sreg.envreg18 as a bitstring.

nvvm.read.ptx.sreg.envreg18

Return op name nvvm.read.ptx.sreg.envreg19 as a bitstring.

nvvm.read.ptx.sreg.envreg19

Return op name nvvm.read.ptx.sreg.envreg20 as a bitstring.

nvvm.read.ptx.sreg.envreg20

Return op name nvvm.read.ptx.sreg.envreg21 as a bitstring.

nvvm.read.ptx.sreg.envreg21

Return op name nvvm.read.ptx.sreg.envreg22 as a bitstring.

nvvm.read.ptx.sreg.envreg22

Return op name nvvm.read.ptx.sreg.envreg23 as a bitstring.

nvvm.read.ptx.sreg.envreg23

Return op name nvvm.read.ptx.sreg.envreg24 as a bitstring.

nvvm.read.ptx.sreg.envreg24

Return op name nvvm.read.ptx.sreg.envreg25 as a bitstring.

nvvm.read.ptx.sreg.envreg25

Return op name nvvm.read.ptx.sreg.envreg26 as a bitstring.

nvvm.read.ptx.sreg.envreg26

Return op name nvvm.read.ptx.sreg.envreg27 as a bitstring.

nvvm.read.ptx.sreg.envreg27

Return op name nvvm.read.ptx.sreg.envreg28 as a bitstring.

nvvm.read.ptx.sreg.envreg28

Return op name nvvm.read.ptx.sreg.envreg29 as a bitstring.

nvvm.read.ptx.sreg.envreg29

Return op name nvvm.read.ptx.sreg.envreg30 as a bitstring.

nvvm.read.ptx.sreg.envreg30

Return op name nvvm.read.ptx.sreg.envreg31 as a bitstring.

nvvm.read.ptx.sreg.envreg31

Return op name nvvm.read.ptx.sreg.globaltimer as a bitstring.

nvvm.read.ptx.sreg.globaltimer

Return op name nvvm.read.ptx.sreg.globaltimer.lo as a bitstring.

nvvm.read.ptx.sreg.globaltimer.lo

Return op name nvvm.read.ptx.sreg.gridid as a bitstring.

nvvm.read.ptx.sreg.gridid

Return op name nvvm.read.ptx.sreg.laneid as a bitstring.

nvvm.read.ptx.sreg.laneid

Return op name nvvm.read.ptx.sreg.lanemask.eq as a bitstring.

nvvm.read.ptx.sreg.lanemask.eq

Return op name nvvm.read.ptx.sreg.lanemask.ge as a bitstring.

nvvm.read.ptx.sreg.lanemask.ge

Return op name nvvm.read.ptx.sreg.lanemask.gt as a bitstring.

nvvm.read.ptx.sreg.lanemask.gt

Return op name nvvm.read.ptx.sreg.lanemask.le as a bitstring.

nvvm.read.ptx.sreg.lanemask.le

Return op name nvvm.read.ptx.sreg.lanemask.lt as a bitstring.

nvvm.read.ptx.sreg.lanemask.lt

Return op name nvvm.read.ptx.sreg.nclusterid.x as a bitstring.

nvvm.read.ptx.sreg.nclusterid.x

Return op name nvvm.read.ptx.sreg.nclusterid.y as a bitstring.

nvvm.read.ptx.sreg.nclusterid.y

Return op name nvvm.read.ptx.sreg.nclusterid.z as a bitstring.

nvvm.read.ptx.sreg.nclusterid.z

Return op name nvvm.read.ptx.sreg.nctaid.x as a bitstring.

nvvm.read.ptx.sreg.nctaid.x

Return op name nvvm.read.ptx.sreg.nctaid.y as a bitstring.

nvvm.read.ptx.sreg.nctaid.y

Return op name nvvm.read.ptx.sreg.nctaid.z as a bitstring.

nvvm.read.ptx.sreg.nctaid.z

Return op name nvvm.read.ptx.sreg.nsmid as a bitstring.

nvvm.read.ptx.sreg.nsmid

Return op name nvvm.read.ptx.sreg.ntid.x as a bitstring.

nvvm.read.ptx.sreg.ntid.x

Return op name nvvm.read.ptx.sreg.ntid.y as a bitstring.

nvvm.read.ptx.sreg.ntid.y

Return op name nvvm.read.ptx.sreg.ntid.z as a bitstring.

nvvm.read.ptx.sreg.ntid.z

Return op name nvvm.read.ptx.sreg.nwarpid as a bitstring.

nvvm.read.ptx.sreg.nwarpid

Return op name nvvm.read.ptx.sreg.smid as a bitstring.

nvvm.read.ptx.sreg.smid

Return op name nvvm.read.ptx.sreg.tid.x as a bitstring.

nvvm.read.ptx.sreg.tid.x

Return op name nvvm.read.ptx.sreg.tid.y as a bitstring.

nvvm.read.ptx.sreg.tid.y

Return op name nvvm.read.ptx.sreg.tid.z as a bitstring.

nvvm.read.ptx.sreg.tid.z

Return op name nvvm.read.ptx.sreg.total.smem.size as a bitstring.

nvvm.read.ptx.sreg.total.smem.size

Return op name nvvm.read.ptx.sreg.warpid as a bitstring.

nvvm.read.ptx.sreg.warpid

Return op name nvvm.read.ptx.sreg.warpsize as a bitstring.

nvvm.read.ptx.sreg.warpsize

Return op name nvvm.redux.sync as a bitstring.

nvvm.redux.sync - Redux Sync Op

Return op name nvvm.rsqrt as a bitstring.

nvvm.rsqrt - Reciprocal square root (fast approximation)

Return op name nvvm.setmaxregister as a bitstring.

nvvm.setmaxregister

Return op name nvvm.shfl.sync as a bitstring.

nvvm.shfl.sync - NVVM Dialect Op for shfl.sync

Return op name nvvm.sin as a bitstring.

nvvm.sin - Sine (fast approximation)

Return op name nvvm.sqrt as a bitstring.

nvvm.sqrt - Take the square root of a value

Return op name nvvm.sqrt.approx as a bitstring.

nvvm.sqrt.approx - Square root (fast approximation)

Return op name nvvm.st.bulk as a bitstring.

nvvm.st.bulk - Bulk Store Op

Return op name nvvm.stmatrix as a bitstring.

nvvm.stmatrix - cooperative matrix store

Return op name nvvm.subf as a bitstring.

nvvm.subf -

Return op name nvvm.tcgen05.alloc as a bitstring.

nvvm.tcgen05.alloc - Tcgen05 alloc operation

Return op name nvvm.tcgen05.commit as a bitstring.

nvvm.tcgen05.commit - Tcgen05 commit operations

Return op name nvvm.tcgen05.cp as a bitstring.

nvvm.tcgen05.cp - Tcgen05 copy operation

Return op name nvvm.tcgen05.dealloc as a bitstring.

nvvm.tcgen05.dealloc - Tcgen05 dealloc operation

Return op name nvvm.tcgen05.fence as a bitstring.

nvvm.tcgen05.fence - Tcgen05 fence operations

Return op name nvvm.tcgen05.ld as a bitstring.

nvvm.tcgen05.ld - tensor memory load instructions

Return op name nvvm.tcgen05.ld.red as a bitstring.

nvvm.tcgen05.ld.red - Tcgen05 tensor memory load and reduce instructions

Return op name nvvm.tcgen05.mma as a bitstring.

nvvm.tcgen05.mma - Performs MMA operation on 5th-gen tensor cores

Return op name nvvm.tcgen05.mma.block_scale as a bitstring.

nvvm.tcgen05.mma.block_scale - Performs block scaled MMA operation on 5th-gen tensor cores

Return op name nvvm.tcgen05.mma_smem_desc as a bitstring.

nvvm.tcgen05.mma_smem_desc - Constructs a Shared Memory descriptor for MMA Operands A or B

Return op name nvvm.tcgen05.mma.sp as a bitstring.

nvvm.tcgen05.mma.sp - Performs MMA operation with sparse A matrix on 5th-gen tensor cores

Return op name nvvm.tcgen05.mma.sp.block_scale as a bitstring.

nvvm.tcgen05.mma.sp.block_scale - Performs block scaled MMA operation with sparse A matrix on 5th-gen tensor cores

Return op name nvvm.tcgen05.mma.ws as a bitstring.

nvvm.tcgen05.mma.ws - Performs weight stationary convolution MMA operation on 5th-gen tensor cores

Return op name nvvm.tcgen05.mma.ws.sp as a bitstring.

nvvm.tcgen05.mma.ws.sp - Performs weight stationary convolution MMA with sparse A matrix on 5th-gen tensor cores

Return op name nvvm.tcgen05.relinquish_alloc_permit as a bitstring.

nvvm.tcgen05.relinquish_alloc_permit - Tcgen05 Op to relinquish the right to allocate

Return op name nvvm.tcgen05.shift as a bitstring.

nvvm.tcgen05.shift - Tcgen05 shift operation

Return op name nvvm.tcgen05.st as a bitstring.

nvvm.tcgen05.st - tensor memory store instructions

Return op name nvvm.tcgen05.wait as a bitstring.

nvvm.tcgen05.wait - Tcgen05 wait operations

Return op name nvvm.tensormap.replace as a bitstring.

nvvm.tensormap.replace - Modifies a field of the tensor-map object

Return op name nvvm.vote.sync as a bitstring.

nvvm.vote.sync - Vote across thread group

Return op name nvvm.wgmma.commit.group.sync.aligned as a bitstring.

nvvm.wgmma.commit.group.sync.aligned

Return op name nvvm.wgmma.fence.aligned as a bitstring.

nvvm.wgmma.fence.aligned

Return op name nvvm.wgmma.mma_async as a bitstring.

nvvm.wgmma.mma_async

Return op name nvvm.wgmma.wait.group.sync.aligned as a bitstring.

nvvm.wgmma.wait.group.sync.aligned

Return op name nvvm.wmma.load as a bitstring.

nvvm.wmma.load - Warp synchronous matrix load

Return op name nvvm.wmma.mma as a bitstring.

nvvm.wmma.mma - Warp synchronous matrix-multiply accumulate using tensor cores.

Return op name nvvm.wmma.store as a bitstring.

nvvm.wmma.store - Warp synchronous matrix store

Functions

addf()

Return op name nvvm.addf as a bitstring.

addf(ssa)

nvvm.addf -

Performs floating point addition of the given arguments `lhs` and `rhs`

This op has support for result type inference.

Attributes

  • rnd - Single, FPArithRoundingMode, NVVM FPRoundingMode kind whose value is one of {none, rm, rn, rp, rz}
  • sat - Single, SaturationModeSatOrNone, Describes the saturation mode whose value is one of {none, sat}
  • ftz - Single, BoolAttr, bool attribute

Operands

  • lhs - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2
  • rhs - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Results

  • res - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Description

The nvvm.addf operation performs floating point addition of two floating point operands of the same type.

The rounding mode is specified by the rnd attribute, saturation mode by the sat attribute, and flush-to-zero by the ftz attribute.

For more information, see PTX ISA:

bar_warp_sync()

Return op name nvvm.bar.warp.sync as a bitstring.

bar_warp_sync(ssa)

nvvm.bar.warp.sync - Warp Barrier Synchronization Op

Operands

  • mask - Single, I32, 32-bit signless integer

Description

The nvvm.bar.warp.sync operation performs barrier synchronization for threads within a warp.

This operation causes the executing thread to wait until all threads corresponding to the mask operand have executed a bar.warp.sync with the same mask value before resuming execution.

The mask operand specifies the threads participating in the barrier, where each bit position corresponds to the thread's lane ID within the warp. Only threads with their corresponding bit set in the mask participate in the barrier synchronization.

Important constraints:

  • The behavior is undefined if the executing thread is not included in the mask (i.e., the bit corresponding to the thread's lane ID is not set)
  • For compute capability sm_6x or below, all threads in the mask must execute the same bar.warp.sync instruction in convergence

This operation also guarantees memory ordering among participating threads. Threads within the warp that wish to communicate via memory can store to memory, execute bar.warp.sync, and then safely read values stored by other threads in the warp.

For more information, see PTX ISA

barrier()

Return op name nvvm.barrier as a bitstring.

barrier(ssa)

nvvm.barrier - CTA Barrier Synchronization Op

Attributes

  • aligned - Single, BoolAttr, bool attribute

Operands

  • barrierId - Optional, I32, 32-bit signless integer
  • numberOfThreads - Optional, I32, 32-bit signless integer

Description

The nvvm.barrier operation performs barrier synchronization and communication within a CTA (Cooperative Thread Array). It causes executing threads to wait for all non-exited threads participating in the barrier to arrive.

The operation takes the following optional operands and attributes:

  • barrierId: Specifies a logical barrier resource with value 0 through 15. Each CTA instance has sixteen barriers numbered 0..15. Defaults to 0 if not specified.
  • numberOfThreads: Specifies the number of threads participating in the barrier. When specified, the value must be a multiple of the warp size. If not specified, all threads in the CTA participate in the barrier.
  • aligned: Selects between the .aligned and non-.aligned forms of the underlying @llvm.nvvm.barrier.cta.* intrinsic family. Defaults to true, which requires every thread in the CTA to reach this same barrier instruction, otherwise the behavior is undefined. Set it to false to emit the non-.aligned form.

Reduction variants of the barrier instruction are modeled by the nvvm.barrier.reduction op.

The barrier operation guarantees that when the barrier completes, prior memory accesses requested by participating threads are performed relative to all threads participating in the barrier. It also ensures that no new memory access is requested by participating threads before the barrier completes.

When a barrier completes, the waiting threads are restarted without delay, and the barrier is reinitialized so that it can be immediately reused.

For more information, see PTX ISA

barrier_arrive()

Return op name nvvm.barrier.arrive as a bitstring.

barrier_arrive(ssa)

nvvm.barrier.arrive

Attributes

  • aligned - Single, BoolAttr, bool attribute

Operands

  • barrierId - Optional, I32, 32-bit signless integer
  • numberOfThreads - Single, I32, 32-bit signless integer

Description

Thread that executes this op announces their arrival at the barrier with given id and continue their execution.

The default barrier id is 0 that is similar to nvvm.barrier Op. When barrierId is not present, the default barrier id is used.

The aligned attribute, which defaults to true, generates the aligned form of the barrier (all threads in the CTA execute the same barrier instruction). When set to false, the unaligned form is generated.

For more information, see PTX ISA

barrier_reduction()

Return op name nvvm.barrier.reduction as a bitstring.

barrier_reduction(ssa)

nvvm.barrier.reduction - CTA Barrier Reduction Op

This op has support for result type inference.

Attributes

  • reductionOp - Single, BarrierReductionAttr, NVVM barrier reduction operation
  • aligned - Single, BoolAttr, bool attribute

Operands

  • barrierId - Optional, I32, 32-bit signless integer
  • reductionPredicate - Single, I32, 32-bit signless integer

Results

  • res - Single, I32, 32-bit signless integer

Description

The nvvm.barrier.reduction operation performs barrier synchronization with a reduction across the per-thread predicates contributed by participating threads in a CTA.

  • barrierId: Specifies a logical barrier resource with value 0 through 15. Optional; defaults to barrier id 0 when not specified.
  • reductionOp: The reduction kind (popc, and, or) applied across the per-thread predicates.
  • reductionPredicate: The per-thread i32 predicate. It is compared against zero to form the i1 value fed into the reduction.
  • aligned: Selects between the .aligned and non-.aligned forms of the underlying @llvm.nvvm.barrier.cta.red.* intrinsic family. Defaults to true, which requires every thread in the CTA to reach this same barrier instruction, otherwise the behavior is undefined. Set it to false to emit the non-.aligned form.

The result is the i32 reduction value computed across all threads participating in the barrier.

For more information, see PTX ISA

breakpoint()

Return op name nvvm.breakpoint as a bitstring.

breakpoint(ssa)

nvvm.breakpoint - Breakpoint Op

Description

Breakpoint suspends execution of the program for debugging. For more information, see PTX ISA

cluster_arrive()

Return op name nvvm.cluster.arrive as a bitstring.

cluster_arrive(ssa)

nvvm.cluster.arrive - Cluster Barrier Arrive Op

Attributes

  • aligned - Optional, UnitAttr, unit attribute

Description

The cluster.arrive can be used by the threads within the cluster for synchronization and communication. The cluster.arrive instruction marks the warps' arrival at the barrier without causing the executing thread to wait for other participating threads.

The aligned attribute, when provided, generates the .aligned version of the PTX instruction.

For more information, see PTX ISA

cluster_arrive_relaxed()

Return op name nvvm.cluster.arrive.relaxed as a bitstring.

cluster_arrive_relaxed(ssa)

nvvm.cluster.arrive.relaxed - Cluster Barrier Relaxed Arrive Op

Attributes

  • aligned - Optional, UnitAttr, unit attribute

Description

The cluster.arrive can be used by the threads within the cluster for synchronization and communication. The cluster.arrive instruction marks the warps' arrival at the barrier without causing the executing thread to wait for other participating threads.

The aligned attribute, when provided, generates the .aligned version of the PTX instruction. The .relaxed qualifier on cluster.arrive specifies that there are no memory ordering and visibility guarantees provided for the memory accesses performed prior to cluster.arrive.

For more information, see PTX ISA

cluster_wait()

Return op name nvvm.cluster.wait as a bitstring.

cluster_wait(ssa)

nvvm.cluster.wait - Cluster Barrier Wait Op

Attributes

  • aligned - Optional, UnitAttr, unit attribute

Description

The cluster.wait causes the executing thread to wait for all non-exited threads of the cluster to perform cluster.arrive. The aligned attribute, when provided, generates the .aligned version of the PTX instruction.

For more information, see PTX ISA

clusterlaunchcontrol_query_cancel()

Return op name nvvm.clusterlaunchcontrol.query.cancel as a bitstring.

clusterlaunchcontrol_query_cancel(ssa)

nvvm.clusterlaunchcontrol.query.cancel - Query the response of a clusterlaunchcontrol.try.cancel operation

This op has support for result type inference.

Attributes

  • query_type - Single, ClusterLaunchControlQueryTypeAttr, NVVM ClusterLaunchControlQueryType

Operands

  • try_cancel_response - Single, I128, 128-bit signless integer

Results

  • res - Single, anonymous/composite constraint, 1-bit signless integer or 32-bit signless integer

Description

clusterlaunchcontrol.query.cancel queries the response of a clusterlaunchcontrol.try.cancel operation specified by operand try_cancel_response.

Operand query_type specifies the type of query to perform and can be one of the following:

  • is_canceled : Returns true if the try cancel request succeeded, and false otherwise.
  • get_first_cta_id_{x/y/z} : Returns the x, y, or z coordinate of the first CTA in the canceled cluster. Behaviour is defined only if the try cancel request succeeded.

For more information, see PTX ISA

clusterlaunchcontrol_try_cancel()

Return op name nvvm.clusterlaunchcontrol.try.cancel as a bitstring.

clusterlaunchcontrol_try_cancel(ssa)

nvvm.clusterlaunchcontrol.try.cancel - Request atomically canceling the launch of a cluster that has not started running yet

Attributes

  • multicast - Optional, UnitAttr, unit attribute

Operands

  • smemAddress - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • mbarrier - Single, LLVM_PointerShared, LLVM pointer in address space 3

Description

clusterlaunchcontrol.try.cancel requests atomically canceling the launch of a cluster that has not started running yet. It asynchronously writes an opaque response to shared memory indicating whether the operation succeeded or failed.

Operand smemAddress specifies the naturally aligned address of the 16-byte wide shared memory location where the request's response is written.

Operand mbarrier specifies the mbarrier object used to track the completion of the asynchronous operation.

If multicast is specified, the response is asynchronously written to the corresponding local shared memory location (specifed by addr) of each CTA in the requesting cluster.

For more information, see PTX ISA

convert_bf16x2_to_f4x2()

Return op name nvvm.convert.bf16x2.to.f4x2 as a bitstring.

convert_bf16x2_to_f4x2(ssa)

nvvm.convert.bf16x2.to.f4x2 - Convert an bf16x2 input to f4x2

This op has support for result type inference.

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, anonymous/composite constraint, type attribute of f4E2M1FN type

Operands

  • src - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Results

  • dst - Single, I8, 8-bit signless integer

Description

This Op converts each of the given BF16 inputs in an bf16x2 vector to the specified fp4 type. The result dst is returned as an i8 type where the converted values are packed such that the value converted from the first element of a is stored in the lower 4 bits of dst and the value converted from the second element of a is stored in the upper 4 bits of dst. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

convert_bf16x2_to_f6x2()

Return op name nvvm.convert.bf16x2.to.f6x2 as a bitstring.

convert_bf16x2_to_f6x2(ssa)

nvvm.convert.bf16x2.to.f6x2 - Convert an bf16x2 input to f6x2

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, anonymous/composite constraint, type attribute of f6E2M3FN type or f6E3M2FN type

Operands

  • src - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given BF16 inputs in an bf16x2 vector to the specified fp6 type. The result dst is represented either as an i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from the first element of a is stored in the lower 8 bits of dst with 2 MSB bits padded with zeros and the value converted from the second element of a is stored in the upper 8 bits of dst with 2 MSB bits padded with zeros. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector with 2 MSB bits padded with zeros. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

convert_bf16x2_to_f8x2()

Return op name nvvm.convert.bf16x2.to.f8x2 as a bitstring.

convert_bf16x2_to_f8x2(ssa)

nvvm.convert.bf16x2.to.f8x2 - Convert a pair of bf16 inputs to f8x2

Attributes

  • rnd - Single, FPRoundingModeAttr, NVVM FPRoundingMode kind
  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, anonymous/composite constraint, type attribute of f8E8M0FNU type or f8E4M3FN type or f8E5M2 type

Operands

  • src - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts the given bf16 inputs in a bf16x2 vector to the specified f8 type. The result dst is represented either as a packed i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from the first element of a is stored in the lower 8 bits of dst and the value converted from the second element of a is stored in the upper 8 bits of dst. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The rnd and sat attributes specify the rounding and saturation modes respectively.

For more information, see PTX ISA

convert_bf16x2_to_s2f6x2()

Return op name nvvm.convert.bf16x2.to.s2f6x2 as a bitstring.

convert_bf16x2_to_s2f6x2(ssa)

nvvm.convert.bf16x2.to.s2f6x2 - Convert a pair of BF16 inputs to S2F6x2

Attributes

  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given BF16 inputs in a bf16x2 vector to the S2F6x2 type. The result dst can be either a packed i16 type or a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from the first element of a is stored in the lower 8 bits of dst and the value converted from the second element of a is stored in the upper 8 bits of dst. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction. The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

convert_f4x2_to_bf16x2()

Return op name nvvm.convert.f4x2.to.bf16x2 as a bitstring.

convert_f4x2_to_bf16x2(ssa)

nvvm.convert.f4x2.to.bf16x2 - Convert a pair of f4 inputs to bf16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f4E2M1FN type
  • sat - Single, SaturationModeSatfiniteOrNone, Describes the saturation mode whose value is one of {none, satfinite}
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, I8, 8-bit signless integer
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Description

This Op converts the given f4 inputs in a packed i8 to bf16.

The result dst is represented as a vector of bf16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

The sat attribute specifies the saturation mode.

The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

Example:

// Basic conversion; the f4x2 source is packed in a single i8.
%res1 = nvvm.convert.f4x2.to.bf16x2 %src
    : i8 (f4E2M1FN) -> vector<2xbf16>

// Conversion with relu and saturation.
%res2 = nvvm.convert.f4x2.to.bf16x2 %src
    {relu = true, sat = #nvvm.sat_mode<satfinite>}
    : i8 (f4E2M1FN) -> vector<2xbf16>

// Conversion with a packed ue8m0 scale-factor.
%res3 = nvvm.convert.f4x2.to.bf16x2 %src, %scaleFactor
    : i8 (f4E2M1FN) -> vector<2xbf16>

convert_f4x2_to_f16x2()

Return op name nvvm.convert.f4x2.to.f16x2 as a bitstring.

convert_f4x2_to_f16x2(ssa)

nvvm.convert.f4x2.to.f16x2 - Convert a pair of f4 inputs to f16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f4E2M1FN type
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, I8, 8-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Description

This Op converts the given f4 inputs in a packed i8 to f16.

The result dst is represented as a vector of f16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f6x2_to_bf16x2()

Return op name nvvm.convert.f6x2.to.bf16x2 as a bitstring.

convert_f6x2_to_bf16x2(ssa)

nvvm.convert.f6x2.to.bf16x2 - Convert a pair of f6 inputs to bf16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f6E2M3FN type or f6E3M2FN type
  • sat - Single, SaturationModeSatfiniteOrNone, Describes the saturation mode whose value is one of {none, satfinite}
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 2
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Description

This Op converts the given f6 inputs in a i8x2 vector to bf16.

The result dst is represented as a vector of bf16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

The sat attribute specifies the saturation mode.

The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

Example:

// Basic conversion from f6E2M3FN.
%res1 = nvvm.convert.f6x2.to.bf16x2 %src
    : vector<2xi8> (f6E2M3FN) -> vector<2xbf16>

// Conversion from f6E3M2FN with relu and saturation.
%res2 = nvvm.convert.f6x2.to.bf16x2 %src
    {relu = true, sat = #nvvm.sat_mode<satfinite>}
    : vector<2xi8> (f6E3M2FN) -> vector<2xbf16>

// Conversion with a packed ue8m0 scale-factor.
%res3 = nvvm.convert.f6x2.to.bf16x2 %src, %scaleFactor
    : vector<2xi8> (f6E2M3FN) -> vector<2xbf16>

convert_f6x2_to_f16x2()

Return op name nvvm.convert.f6x2.to.f16x2 as a bitstring.

convert_f6x2_to_f16x2(ssa)

nvvm.convert.f6x2.to.f16x2 - Convert a pair of f6 inputs to f16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f6E2M3FN type or f6E3M2FN type
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 2

Results

  • dst - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Description

This Op converts the given f6 inputs in a i8x2 vector to f16.

The result dst is represented as a vector of f16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f8x2_to_bf16x2()

Return op name nvvm.convert.f8x2.to.bf16x2 as a bitstring.

convert_f8x2_to_bf16x2(ssa)

nvvm.convert.f8x2.to.bf16x2 - Convert a pair of f8 inputs to bf16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f8E8M0FNU type or f8E4M3FN type or f8E5M2 type
  • sat - Single, SaturationModeSatfiniteOrNone, Describes the saturation mode whose value is one of {none, satfinite}
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 2
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Description

This Op converts the given f8 inputs in a i8x2 vector to bf16.

The result dst is represented as a vector of bf16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

The sat attribute specifies the saturation mode.

The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

Example:

// Basic conversion from f8E4M3FN.
%res1 = nvvm.convert.f8x2.to.bf16x2 %src
    : vector<2xi8> (f8E4M3FN) -> vector<2xbf16>

// Conversion from f8E5M2 with relu and saturation.
%res2 = nvvm.convert.f8x2.to.bf16x2 %src
    {relu = true, sat = #nvvm.sat_mode<satfinite>}
    : vector<2xi8> (f8E5M2) -> vector<2xbf16>

// Conversion with a packed ue8m0 scale-factor.
%res3 = nvvm.convert.f8x2.to.bf16x2 %src, %scaleFactor
    : vector<2xi8> (f8E4M3FN) -> vector<2xbf16>

convert_f8x2_to_f16x2()

Return op name nvvm.convert.f8x2.to.f16x2 as a bitstring.

convert_f8x2_to_f16x2(ssa)

nvvm.convert.f8x2.to.f16x2 - Convert a pair of f8 inputs to f16x2

Attributes

  • srcType - Single, anonymous/composite constraint, type attribute of f8E4M3FN type or f8E5M2 type
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 2

Results

  • dst - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Description

This Op converts the given f8 inputs in a i8x2 vector to f16.

The result dst is represented as a vector of f16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f16x2_to_f4x2()

Return op name nvvm.convert.f16x2.to.f4x2 as a bitstring.

convert_f16x2_to_f4x2(ssa)

nvvm.convert.f16x2.to.f4x2 - Convert an f16x2 input to f4x2

This op has support for result type inference.

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, anonymous/composite constraint, type attribute of f4E2M1FN type

Operands

  • src - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Results

  • dst - Single, I8, 8-bit signless integer

Description

This Op converts each of the given F16 inputs in an f16x2 vector to the specified fp4 type. The result dst is returned as an i8 type where the converted values are packed such that the value converted from the first element of a is stored in the lower 4 bits of dst and the value converted from the second element of a is stored in the upper 4 bits of dst. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

convert_f16x2_to_f6x2()

Return op name nvvm.convert.f16x2.to.f6x2 as a bitstring.

convert_f16x2_to_f6x2(ssa)

nvvm.convert.f16x2.to.f6x2 - Convert an f16x2 input to f6x2

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, anonymous/composite constraint, type attribute of f6E2M3FN type or f6E3M2FN type

Operands

  • src - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given F16 inputs in an f16x2 vector to the specified fp6 type. The result dst is represented either as an i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from the first element of a is stored in the lower 8 bits of dst with 2 MSB bits padded with zeros and the value converted from the second element of a is stored in the upper 8 bits of dst with 2 MSB bits padded with zeros. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector with 2 MSB bits padded with zeros. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

convert_f16x2_to_f8x2()

Return op name nvvm.convert.f16x2.to.f8x2 as a bitstring.

convert_f16x2_to_f8x2(ssa)

nvvm.convert.f16x2.to.f8x2 - Convert an f16x2 input to f8x2

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • a - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts the given f16 inputs in an f16x2 vector to the specified f8 type. The result dst is represented as an i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values from a are packed such that the value converted from the first element of a is stored in the upper 8 bits of dst and the value converted from the second element of a is stored in the lower 8 bits of dst. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f32x2_to_bf16x2()

Return op name nvvm.convert.f32x2.to.bf16x2 as a bitstring.

convert_f32x2_to_bf16x2(ssa)

nvvm.convert.f32x2.to.bf16x2 - Convert two F32 values to packed bf16x2.

Attributes

  • rnd - Single, FPRoundingModeAttr, NVVM FPRoundingMode kind
  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute

Operands

  • src_hi - Single, F32, 32-bit float
  • src_lo - Single, F32, 32-bit float
  • random_bits - Optional, I32, 32-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Description

Converts two F32 values to packed bf16x2 format with the specified rounding mode. The src_hi and src_lo parameters correspond to operands a and b in the PTX ISA, respectively.

The random_bits parameter is required for stochastic rounding and provides the random bits to be used for the conversion.

The relu attribute clamps negative results to 0.

The sat attribute determines saturation behavior.

For more information, see PTX ISA

convert_f32x2_to_f4x2()

Return op name nvvm.convert.f32x2.to.f4x2 as a bitstring.

convert_f32x2_to_f4x2(ssa)

nvvm.convert.f32x2.to.f4x2 - Convert a pair of float inputs to f4x2

This op has support for result type inference.

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • a - Single, F32, 32-bit float
  • b - Single, F32, 32-bit float

Results

  • dst - Single, I8, 8-bit signless integer

Description

This Op converts each of the given float inputs to the specified fp4 type. The result dst is returned as an i8 type where the converted values are packed such that the value converted from a is stored in the upper 4 bits of dst and the value converted from b is stored in the lower 4 bits of dst. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f32x2_to_f6x2()

Return op name nvvm.convert.f32x2.to.f6x2 as a bitstring.

convert_f32x2_to_f6x2(ssa)

nvvm.convert.f32x2.to.f6x2 - Convert a pair of float inputs to f6x2

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • a - Single, F32, 32-bit float
  • b - Single, F32, 32-bit float

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given float inputs to the specified fp6 type. The result dst is represented either as an i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from a is stored in the upper 8 bits of dst with 2 MSB bits padded with zeros and the value converted from b is stored in the lower 8 bits of dst with 2 MSB bits padded with zeros. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f32x2_to_f8x2()

Return op name nvvm.convert.f32x2.to.f8x2 as a bitstring.

convert_f32x2_to_f8x2(ssa)

nvvm.convert.f32x2.to.f8x2 - Convert a pair of float inputs to f8x2

Attributes

  • rnd - Single, FPRoundingModeAttr, NVVM FPRoundingMode kind
  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • a - Single, F32, 32-bit float
  • b - Single, F32, 32-bit float

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given float inputs to the specified fp8 type. The result dst is represented as an i16 type or as a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from a is stored in the upper 8 bits of dst and the value converted from b is stored in the lower 8 bits of dst. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The rnd and sat attributes specify the rounding and saturation modes respectively. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

For more information, see PTX ISA

convert_f32x2_to_f16x2()

Return op name nvvm.convert.f32x2.to.f16x2 as a bitstring.

convert_f32x2_to_f16x2(ssa)

nvvm.convert.f32x2.to.f16x2 - Convert two F32 values to packed f16x2.

Attributes

  • rnd - Single, FPRoundingModeAttr, NVVM FPRoundingMode kind
  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute

Operands

  • src_hi - Single, F32, 32-bit float
  • src_lo - Single, F32, 32-bit float
  • random_bits - Optional, I32, 32-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of 16-bit float values of length 2

Description

Converts two F32 values to packed f16x2 format with the specified rounding mode. The src_hi and src_lo parameters correspond to operands a and b in the PTX ISA, respectively.

The random_bits parameter is required for stochastic rounding and provides the random bits to be used for the conversion.

The relu attribute clamps negative results to 0.

The sat attribute determines saturation behavior.

For more information, see PTX ISA

convert_f32x2_to_s2f6x2()

Return op name nvvm.convert.f32x2.to.s2f6x2 as a bitstring.

convert_f32x2_to_s2f6x2(ssa)

nvvm.convert.f32x2.to.s2f6x2 - Convert a pair of f32 inputs to S2F6x2

Attributes

  • relu - Single, BoolAttr, bool attribute

Operands

  • a - Single, F32, 32-bit float
  • b - Single, F32, 32-bit float
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, 16-bit signless integer or vector of 8-bit signless integer values of length 2

Description

This Op converts each of the given f32 inputs to the S2F6x2 type. The result dst can be either a packed i16 type or a vector of two i8 types. If dst is returned as an i16 type, the converted values are packed such that the value converted from a is stored in the upper 8 bits of dst and the value converted from b is stored in the lower 8 bits of dst. If dst is returned as a vector type, each converted value is stored as an i8 element in the vector. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction. The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

convert_f32x4_to_f4x4()

Return op name nvvm.convert.f32x4.to.f4x4 as a bitstring.

convert_f32x4_to_f4x4(ssa)

nvvm.convert.f32x4.to.f4x4 - Convert vector<4xf32> to packed f4x4 with stochastic rounding (.rs) and satfinite

This op has support for result type inference.

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 32-bit float values of length 4
  • rbits - Single, I32, 32-bit signless integer

Results

  • dst - Single, I16, 16-bit signless integer

Description

Converts a vector<4xf32> to packed f4x4 format using stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is provided by the rbits parameter. The dstTy attribute specifies the target floating-point format. The relu attribute clamps negative results to 0.

Note: These operations always use RS rounding mode and SATFINITE saturation mode.

For more information, see PTX ISA

convert_f32x4_to_f6x4()

Return op name nvvm.convert.f32x4.to.f6x4 as a bitstring.

convert_f32x4_to_f6x4(ssa)

nvvm.convert.f32x4.to.f6x4 - Convert vector<4xf32> to packed f6x4 with stochastic rounding (.rs) and satfinite

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 32-bit float values of length 4
  • rbits - Single, I32, 32-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 4

Description

Converts a vector<4xf32> to packed f6x4 format using stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is provided by the rbits parameter. The dstTy attribute specifies the target floating-point format. The relu attribute clamps negative results to 0.

Note: These operations always use RS rounding mode and SATFINITE saturation mode.

For more information, see PTX ISA

convert_f32x4_to_f8x4()

Return op name nvvm.convert.f32x4.to.f8x4 as a bitstring.

convert_f32x4_to_f8x4(ssa)

nvvm.convert.f32x4.to.f8x4 - Convert vector<4xf32> to packed f8x4 with stochastic rounding (.rs) and satfinite

Attributes

  • relu - Single, BoolAttr, bool attribute
  • dstTy - Single, TypeAttr, any type attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 32-bit float values of length 4
  • rbits - Single, I32, 32-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 4

Description

Converts a vector<4xf32> to packed f8x4 format using stochastic rounding (.rs) mode with SATFINITE saturation. Randomness is provided by the rbits parameter. The dstTy attribute specifies the target floating-point format. The relu attribute clamps negative results to 0.

Note: These operations always use RS rounding mode and SATFINITE saturation mode.

For more information, see PTX ISA

convert_float_to_tf32()

Return op name nvvm.convert.float.to.tf32 as a bitstring.

convert_float_to_tf32(ssa)

nvvm.convert.float.to.tf32 - Convert the given float input to TF32

This op has support for result type inference.

Attributes

  • rnd - Single, FPRoundingModeAttr, NVVM FPRoundingMode kind
  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, I32, 32-bit signless integer

Description

This Op converts the given f32 input to tf32. The result res is represented as an i32 type. The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction. The rnd and sat attributes specify the the rounding and saturation modes respectively.

For more information, see PTX ISA

convert_s2f6x2_to_bf16x2()

Return op name nvvm.convert.s2f6x2.to.bf16x2 as a bitstring.

convert_s2f6x2_to_bf16x2(ssa)

nvvm.convert.s2f6x2.to.bf16x2 - Convert s2f6x2 to bf16x2

Attributes

  • sat - Single, SaturationModeAttr, Describes the saturation mode
  • relu - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 2
  • scaleFactor - Optional, I16, 16-bit signless integer

Results

  • dst - Single, anonymous/composite constraint, vector of bfloat16 type values of length 2

Description

This Op converts a pair of s2f6x2 inputs to bf16x2 type. The result dst is represented as a vector of two bf16 elements.

The relu attribute, when set, lowers to the '.relu' variant of the cvt instruction.

The optional scaling-factors for each of the inputs are provided through the operand scaleFactor as a packed i16 type. Only ue8m0 is supported as the type of the scale-factor currently.

For more information, see PTX ISA

cos()

Return op name nvvm.cos as a bitstring.

cos(ssa)

nvvm.cos - Cosine (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

Description

Computes a fast approximation of the cosine of the input value (in radians). The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero.

cp_async_bulk_commit_group()

Return op name nvvm.cp.async.bulk.commit.group as a bitstring.

cp_async_bulk_commit_group(ssa)

nvvm.cp.async.bulk.commit.group

Description

This Op commits all prior initiated but uncommitted cp.async.bulk instructions into a cp.async.bulk-group.

For more information, see PTX ISA

cp_async_bulk_global_shared_cta()

Return op name nvvm.cp.async.bulk.global.shared.cta as a bitstring.

cp_async_bulk_global_shared_cta(ssa)

nvvm.cp.async.bulk.global.shared.cta - Async bulk copy from Shared CTA memory to Global memory

Operands

  • dstMem - Single, LLVM_PointerGlobal, LLVM pointer in address space 1
  • srcMem - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • size - Single, I32, 32-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer
  • byteMask - Optional, I16, 16-bit signless integer

Description

Initiates an asynchronous copy operation from Shared CTA memory to global memory. The 32-bit operand size specifies the amount of memory to be copied, in terms of number of bytes. size must be a multiple of 16. The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access. The byteMask operand is optional. The i-th bit in the 16-bit wide byteMask specifies whether the i-th byte of each 16-byte wide chunk of source data is copied to the destination. If the bit is set, the byte is copied.

Example:

  nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size
      : !llvm.ptr<1>, !llvm.ptr<3>

  // with l2_cache_hint
  nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size l2_cache_hint = %ch
      : !llvm.ptr<1>, !llvm.ptr<3>

  // with byte_mask
  nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size byte_mask = %mask
      : !llvm.ptr<1>, !llvm.ptr<3>

  // with both l2_cache_hint and byte_mask
  nvvm.cp.async.bulk.global.shared.cta %dst, %src, %size l2_cache_hint = %ch byte_mask = %mask
      : !llvm.ptr<1>, !llvm.ptr<3>

For more information, see PTX ISA

cp_async_bulk_prefetch()

Return op name nvvm.cp.async.bulk.prefetch as a bitstring.

cp_async_bulk_prefetch(ssa)

nvvm.cp.async.bulk.prefetch - Async bulk prefetch from global memory to L2 cache

Operands

  • srcMem - Single, LLVM_PointerGlobal, LLVM pointer in address space 1
  • size - Single, I32, 32-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer

Description

Initiates an asynchronous prefetch of data from the location specified by srcMem to the L2 cache.

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

Example:

  nvvm.cp.async.bulk.prefetch %src, %size : !llvm.ptr<1>

  // with l2_cache_hint
  nvvm.cp.async.bulk.prefetch %src, %size l2_cache_hint = %ch : !llvm.ptr<1>

For more information, see PTX ISA

cp_async_bulk_shared_cluster_global()

Return op name nvvm.cp.async.bulk.shared.cluster.global as a bitstring.

cp_async_bulk_shared_cluster_global(ssa)

nvvm.cp.async.bulk.shared.cluster.global - Async bulk copy from global to Shared {cta or cluster} memory

Operands

  • dstMem - Single, anonymous/composite constraint, LLVM pointer in address space 3 or LLVM pointer in address space 7
  • srcMem - Single, LLVM_PointerGlobal, LLVM pointer in address space 1
  • mbar - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • size - Single, I32, 32-bit signless integer
  • multicastMask - Optional, I16, 16-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer

Description

Initiates an asynchronous copy operation from global memory to shared memory or shared_cluster memory.

The multicastMask operand is optional and can be used only when the destination is shared::cluster memory. When it is present, this Op copies data from global memory to shared memory of multiple CTAs in the cluster. Operand multicastMask specifies the destination CTAs in the cluster such that each bit position in the 16-bit multicastMask operand corresponds to the nvvm.read.ptx.sreg.ctaid of the destination CTA.

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

For more information, see PTX ISA

cp_async_bulk_shared_cluster_shared_cta()

Return op name nvvm.cp.async.bulk.shared.cluster.shared.cta as a bitstring.

cp_async_bulk_shared_cluster_shared_cta(ssa)

nvvm.cp.async.bulk.shared.cluster.shared.cta - Async bulk copy from Shared CTA memory to Shared cluster memory

Operands

  • dstMem - Single, LLVM_PointerSharedCluster, LLVM pointer in address space 7
  • srcMem - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • mbar - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • size - Single, I32, 32-bit signless integer

Description

Initiates an asynchronous copy operation from Shared CTA memory to Shared cluster memory.

For more information, see PTX ISA

cp_async_bulk_tensor_global_shared_cta()

Return op name nvvm.cp.async.bulk.tensor.global.shared.cta as a bitstring.

cp_async_bulk_tensor_global_shared_cta(ssa)

nvvm.cp.async.bulk.tensor.global.shared.cta

Attributes

  • mode - Single, TMAStoreModeAttr, NVVM TMA Store Mode

Operands

  • tmaDescriptor - Single, LLVM_PointerGeneric, LLVM pointer in address space 0
  • srcMem - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • coordinates - Variadic, I32, variadic of 32-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Description

Initiates an asynchronous copy of the tensor data from shared::cta memory to global memory. This Op supports all the store modes specified in TMAStoreMode.

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

For more information, see PTX ISA

cp_async_bulk_tensor_prefetch()

Return op name nvvm.cp.async.bulk.tensor.prefetch as a bitstring.

cp_async_bulk_tensor_prefetch(ssa)

nvvm.cp.async.bulk.tensor.prefetch

Attributes

  • mode - Single, TMALoadModeAttr, List of Load-Modes supported for TMA Tensor Ops

Operands

  • tmaDescriptor - Single, LLVM_PointerGeneric, LLVM pointer in address space 0
  • coordinates - Variadic, I32, variadic of 32-bit signless integer
  • im2colOffsets - Variadic, I16, variadic of 16-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer

Description

Initiates an asynchronous prefetch operation on the tensor data from global memory to L2 cache. This Op supports all the load modes specified in TMALoadMode.

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

For more information, see PTX ISA

cp_async_bulk_tensor_reduce()

Return op name nvvm.cp.async.bulk.tensor.reduce as a bitstring.

cp_async_bulk_tensor_reduce(ssa)

nvvm.cp.async.bulk.tensor.reduce

Attributes

  • redKind - Single, TMAReduxKindAttr, NVVM TMA redux kind
  • mode - Single, TMAStoreModeAttr, NVVM TMA Store Mode

Operands

  • tmaDescriptor - Single, LLVM_AnyPointer, LLVM pointer type
  • srcMem - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • coordinates - Variadic, I32, variadic of 32-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer

Description

Initiates an asynchronous reduction operation of tensor data in global memory with tensor data in shared memory.

The mode attribute indicates whether the copy mode is tile or im2col. The redOp attribute specifies the reduction operations applied. The supported reduction operations are: {add, min, max, inc, dec, and, or, xor}

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

For more information, see PTX ISA

cp_async_bulk_tensor_shared_cluster_global()

Return op name nvvm.cp.async.bulk.tensor.shared.cluster.global as a bitstring.

cp_async_bulk_tensor_shared_cluster_global(ssa)

nvvm.cp.async.bulk.tensor.shared.cluster.global

Attributes

  • mode - Single, TMALoadModeAttr, List of Load-Modes supported for TMA Tensor Ops
  • isCTAOnly - Single, BoolAttr, bool attribute
  • group - Optional, CTAGroupKindAttr, NVVM CTA group kind

Operands

  • dstMem - Single, anonymous/composite constraint, LLVM pointer in address space 3 or LLVM pointer in address space 7
  • tmaDescriptor - Single, LLVM_PointerGeneric, LLVM pointer in address space 0
  • coordinates - Variadic, I32, variadic of 32-bit signless integer
  • mbar - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • im2colOffsets - Variadic, I16, variadic of 16-bit signless integer
  • multicastMask - Optional, I16, 16-bit signless integer
  • l2CacheHint - Optional, I64, 64-bit signless integer
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Description

Initiates an asynchronous copy operation on the tensor data from global memory to shared::cluster (or) shared::cta memory. This Op supports all the load modes specified in TMALoadMode.

The multicastMask operand is optional. When it is present, the Op copies data from global memory to shared memory of multiple CTAs in the cluster. Operand multicastMask specifies the destination CTAs in the cluster such that each bit position in the 16-bit multicastMask operand corresponds to the nvvm.read.ptx.sreg.ctaid of the destination CTA.

The l2CacheHint operand is optional, and it is used to specify cache eviction policy that may be used during the memory access.

When the isCTAOnly attribute is set to true, the destination is shared::cta only. Hence, multicastMask and CTAGroup are not applicable when isCTAOnly is true.

For more information, see PTX ISA

cp_async_bulk_wait_group()

Return op name nvvm.cp.async.bulk.wait_group as a bitstring.

cp_async_bulk_wait_group(ssa)

nvvm.cp.async.bulk.wait_group

Attributes

  • group - Single, I32Attr, 32-bit signless integer attribute whose minimum value is 0
  • read - Optional, UnitAttr, unit attribute

Description

Op waits for completion of the most recent bulk async-groups.

The $group operand tells waiting has to be done until for $group or fewer of the most recent bulk async-groups. If `$group` is 0, the op wait until all the most recent bulk async-groups have completed.

The $read indicates that the waiting has to be done until all the bulk async operations in the specified bulk async-group have completed reading from their source locations.

For more information, see PTX ISA

cp_async_commit_group()

Return op name nvvm.cp.async.commit.group as a bitstring.

cp_async_commit_group(ssa)

nvvm.cp.async.commit.group

cp_async_mbarrier_arrive()

Return op name nvvm.cp.async.mbarrier.arrive as a bitstring.

cp_async_mbarrier_arrive(ssa)

nvvm.cp.async.mbarrier.arrive - NVVM Dialect Op for cp.async.mbarrier.arrive

Attributes

  • noinc - Single, I1Attr, 1-bit signless integer attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3

Description

The cp.async.mbarrier.arrive Op makes the mbarrier object track all prior cp.async operations initiated by the executing thread. The addr operand specifies the address of the mbarrier object in generic or shared::cta address space. When it is generic, the underlying memory should fall within the shared::cta space; otherwise the behavior is undefined. The noinc attr impacts how the mbarrier's state is updated.

For more information, see PTX ISA

cp_async_shared_global()

Return op name nvvm.cp.async.shared.global as a bitstring.

cp_async_shared_global(ssa)

nvvm.cp.async.shared.global

Attributes

  • size - Single, I32Attr, 32-bit signless integer attribute
  • modifier - Single, LoadCacheModifierAttr, NVVM load cache modifier kind

Operands

  • dst - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • src - Single, LLVM_PointerGlobal, LLVM pointer in address space 1
  • cpSize - Optional, I32, 32-bit signless integer

cp_async_wait_group()

Return op name nvvm.cp.async.wait.group as a bitstring.

cp_async_wait_group(ssa)

nvvm.cp.async.wait.group

Attributes

  • n - Single, I32Attr, 32-bit signless integer attribute

divf()

Return op name nvvm.divf as a bitstring.

divf(ssa)

nvvm.divf - Divide one value by another

This op has support for result type inference.

Attributes

  • rnd - Single, FPArithRoundingMode, NVVM FPRoundingMode kind whose value is one of {none, rm, rn, rp, rz}
  • ftz - Single, BoolAttr, bool attribute
  • approx - Single, BoolAttr, bool attribute
  • full - Single, BoolAttr, bool attribute

Operands

  • lhs - Single, anonymous/composite constraint, 32-bit float or 64-bit float
  • rhs - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Results

  • res - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Description

Divides lhs by rhs, stores result in res (res = lhs / rhs).

For more information, see PTX ISA

dot_accumulate_2way()

Return op name nvvm.dot.accumulate.2way as a bitstring.

dot_accumulate_2way(ssa)

nvvm.dot.accumulate.2way - Two-way 16-bit to 8-bit dot product-accumulate instruction

This op has support for result type inference.

Attributes

  • a_type - Single, DotAccumulateTypeAttr, NVVM DotAccumulateType
  • b_type - Single, DotAccumulateTypeAttr, NVVM DotAccumulateType
  • b_hi - Single, BoolAttr, bool attribute

Operands

  • a - Single, anonymous/composite constraint, vector of 16-bit signless integer values of length 2
  • b - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 4
  • c - Single, I32, 32-bit signless integer

Results

  • res - Single, I32, 32-bit signless integer

Description

Performs a two-way 16-bit to 8-bit dot-product which is accumulated in a 32-bit result. Operand a is a vector of two 16-bit elements and operand b a vector of four 8-bit elements between which the dot product is computed.

The a_type and b_type attributes specify the type of the elements in a and b respectively. If a_type or b_type is s, then the elements in the corresponding vector are sign-extended to 32-bit before the dot product is computed. If a_type or b_type is u, then the elements in the corresponding vector are zero-extended to 32-bit instead.

The b_hi boolean attribute specifies which two bytes of b are used for the dot product. If b_hi is true, then the dot product is computed between a and elements at indices 2 and 3 of b. If b_hi is false, then the dot product is computed between a and elements at indices 0 and 1 of b.

Operand c is a 32-bit integer to which the result is accumulated. It is treated as holding a signed integer if any of a_type or b_type is signed.

For more information, see PTX ISA

dot_accumulate_4way()

Return op name nvvm.dot.accumulate.4way as a bitstring.

dot_accumulate_4way(ssa)

nvvm.dot.accumulate.4way - Four-way byte dot product-accumulate instruction

This op has support for result type inference.

Attributes

  • a_type - Single, DotAccumulateTypeAttr, NVVM DotAccumulateType
  • b_type - Single, DotAccumulateTypeAttr, NVVM DotAccumulateType

Operands

  • a - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 4
  • b - Single, anonymous/composite constraint, vector of 8-bit signless integer values of length 4
  • c - Single, I32, 32-bit signless integer

Results

  • res - Single, I32, 32-bit signless integer

Description

Performs a four-way byte dot-product which is accumulated in a 32-bit result. Operand a and b are vectors of 4 bytes between which the dot product is computed.

The a_type and b_type attributes specify the type of the elements in a and b respectively. If a_type or b_type is signed, then the elements in the corresponding vector are sign-extended to 32-bit before the dot product is computed. If a_type or b_type is unsigned, then the elements in the corresponding vector are zero-extended to 32-bit instead.

Operand c is a 32-bit integer to which the result is accumulated. It is treated as holding a signed integer if any of a_type or b_type is s8.

For more information, see PTX ISA

elect_sync()

Return op name nvvm.elect.sync as a bitstring.

elect_sync(ssa)

nvvm.elect.sync - Elect one leader thread

This op has support for result type inference.

Operands

  • membermask - Optional, I32, 32-bit signless integer

Results

  • pred - Single, I1, 1-bit signless integer

Description

The elect.sync instruction elects one predicated active leader thread from among a set of threads specified in the membermask. When the membermask is not provided explicitly, a default value of 0xFFFFFFFF is used. The predicate result is set to True for the leader thread, and False for all other threads.

For more information, see PTX ISA

ex2()

Return op name nvvm.ex2 as a bitstring.

ex2(ssa)

nvvm.ex2 - Base-2 exponential (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

Description

Computes a fast approximation of 2 raised to the power of the input value. The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero.

exit()

Return op name nvvm.exit as a bitstring.

exit(ssa)

nvvm.exit - Exit Op

Description

Ends execution of a thread. For more information, see PTX ISA

fence_mbarrier_init()

Return op name nvvm.fence.mbarrier.init as a bitstring.

fence_mbarrier_init(ssa)

nvvm.fence.mbarrier.init

Description

Fence operation that applies on the prior nvvm.mbarrier.init

For more information, see PTX ISA

fence_proxy()

Return op name nvvm.fence.proxy as a bitstring.

fence_proxy(ssa)

nvvm.fence.proxy

Attributes

  • kind - Single, ProxyKindAttr, Proxy kind whose value is none of {tensormap, generic}
  • space - Optional, SharedSpaceAttr, Shared memory space

Description

Fence operation with proxy to establish an ordering between memory accesses that may happen through different proxies.

For more information, see PTX ISA

fence_proxy_acquire()

Return op name nvvm.fence.proxy.acquire as a bitstring.

fence_proxy_acquire(ssa)

nvvm.fence.proxy.acquire - Uni-directional proxy fence operation with acquire semantics

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • fromProxy - Single, ProxyKindAttr, Proxy kind
  • toProxy - Single, ProxyKindAttr, Proxy kind

Operands

  • addr - Single, LLVM_PointerGeneric, LLVM pointer in address space 0
  • size - Single, I32, 32-bit signless integer

Description

fence.proxy.acquire is a uni-directional fence used to establish ordering between a prior memory access performed via the generic proxy and a subsequent memory access performed via the tensormap proxy

The address operand addr and the operand size together specify the memory range [addr, addr+size) on which the ordering guarantees on the memory accesses across the proxies is to be provided. The only supported value for the size operand is 128 and must be an immediate. Generic Addressing is used unconditionally, and the address specified by the operand addr must fall within the .global state space. Otherwise, the behavior is undefined

For more information, see PTX ISA

fence_proxy_release()

Return op name nvvm.fence.proxy.release as a bitstring.

fence_proxy_release(ssa)

nvvm.fence.proxy.release - Uni-directional proxy fence operation with release semantics

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • fromProxy - Single, ProxyKindAttr, Proxy kind
  • toProxy - Single, ProxyKindAttr, Proxy kind

Description

fence.proxy.release is a uni-directional fence used to establish ordering between a prior memory access performed via the generic proxy and a subsequent memory access performed via the tensormap proxy. fence.proxy.release operation can form a release sequence that synchronizes with an acquire sequence that contains the fence.proxy.acquire proxy fence operation

For more information, see PTX ISA

fence_proxy_sync_restrict()

Return op name nvvm.fence.proxy.sync_restrict as a bitstring.

fence_proxy_sync_restrict(ssa)

nvvm.fence.proxy.sync_restrict - Uni-directional proxy fence operation with sync_restrict

Attributes

  • order - Single, MemOrderKindAttr, NVVM Memory Ordering kind whose value is one of {acquire, release}
  • fromProxy - Single, ProxyKindAttr, Proxy kind
  • toProxy - Single, ProxyKindAttr, Proxy kind

Description

The nvvm.fence.proxy.sync_restrict Op used to establish ordering between a prior memory access performed between proxies. Currently, the ordering is only supported between async and generic proxies. sync_restrict restricts acquire memory semantics to shared_cluster and release memory semantics to shared_cta with cluster scope. For more information, see PTX ISA

fence_sc_cluster()

Return op name nvvm.fence.sc.cluster as a bitstring.

fence_sc_cluster(ssa)

nvvm.fence.sc.cluster

fence_sync_restrict()

Return op name nvvm.fence.sync_restrict as a bitstring.

fence_sync_restrict(ssa)

nvvm.fence.sync_restrict - Uni-directional thread fence operation

Attributes

  • order - Single, MemOrderKindAttr, NVVM Memory Ordering kind whose value is one of {acquire, release}

Description

The nvvm.fence.sync_restrict Op restricts the class of memory operations for which the fence instruction provides the memory ordering guarantees. sync_restrict restricts acquire memory semantics to shared_cluster and release memory semantics to shared_cta with cluster scope. For more information, see PTX ISA

fma()

Return op name nvvm.fma as a bitstring.

fma(ssa)

nvvm.fma -

Performs floating point fused multiply-add operation with support for mixed 
precision operands

This op has support for result type inference.

Attributes

  • rnd - Single, FPArithRoundingMode, NVVM FPRoundingMode kind whose value is one of {none, rm, rn, rp, rz}
  • sat - Single, SaturationModeSatOrNone, Describes the saturation mode whose value is one of {none, sat}
  • ftz - Single, BoolAttr, bool attribute
  • relu - Single, BoolAttr, bool attribute
  • oob - Single, BoolAttr, bool attribute

Operands

  • a - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2
  • b - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2
  • c - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Results

  • res - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Description

The nvvm.fma operation performs floating point fused multiply-add of three operands of the same type.

The rounding mode is specified by the rnd attribute, saturation mode by the sat attribute, flush-to-zero by the ftz attribute, and ReLU by the relu attribute.

Out-of-bounds (OOB) behavior is controlled by the oob attribute. oob clamps the result to 0 if either of the operands is OOB NaN (see Tensors).

For more information, see PTX ISA:

griddepcontrol()

Return op name nvvm.griddepcontrol as a bitstring.

griddepcontrol(ssa)

nvvm.griddepcontrol

Attributes

  • kind - Single, GridDepActionAttr, Action kind for grid dependency control

Description

If the $kind attribute is set to wait, it causes the executing thread to wait until all prerequisite grids in flight have completed and all the memory operations from the prerequisite grids are performed and made visible to the current grid.

When the $kind is launch_dependents, it signals that specific dependents the runtime system designated to react to this instruction can be scheduled as soon as all other CTAs in the grid issue the same instruction or have completed.

For more information, see PTX ISA

inline_ptx()

Return op name nvvm.inline_ptx as a bitstring.

inline_ptx(ssa)

nvvm.inline_ptx - Inline PTX Op

Attributes

  • ptxCode - Single, StrAttr, string attribute
  • memoryClobber - Single, BoolAttr, bool attribute

Operands

  • readOnlyArgs - Variadic, AnyType, variadic of any non-token type
  • readWriteArgs - Variadic, AnyType, variadic of any non-token type
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Results

  • writeOnlyArgs - Variadic, AnyType, variadic of any non-token type

Description

This op allows using PTX directly within the NVVM

dialect, while greatly simplifying llvm.inline_asm generation. It 
automatically handles register size selection and sets the correct 
read/write access for each operand. The operation leverages the 
`BasicPtxBuilderInterface` to abstract away low-level details of 
PTX assembly formatting.

The `predicate` attribute is used to specify a predicate for the
PTX instruction.

The `memory_clobber` attribute appends a "~{memory}" clobber to the
constraints of the generated inline assembly. Set it when the PTX reads
or writes memory beyond its listed operands (e.g. stores, atomics, or
instructions with acquire/release semantics such as mbarrier), so that
LLVM does not reorder memory accesses across the inline assembly.

Example 1: Read-only Parameters
```mlir
nvvm.inline_ptx "mbarrier.init.b64 [$0], $1;" ro(%barrier_gen, %count : !llvm.ptr, i32) memory_clobber = true

// Lowers to:
llvm.inline_asm has_side_effects asm_dialect = att
  "mbarrier.init.b64 [$0], $1;", "l,r,~{memory}" %arg0, %arg2 : (!llvm.ptr, i32) -> ()
```

Example 2: Read-only and Write-only Parameters
```mlir
%0 = nvvm.inline_ptx "ex2.approx.ftz.f32 $0, $1;" (%input) : f32 -> f32

// Lowers to:
%0 = llvm.inline_asm has_side_effects asm_dialect = att 
  "ex2.approx.ftz.f32 $0, $1;", "=f,f" %arg0 : (f32) -> f32
```

Example 3: Predicate Usage
```mlir
nvvm.inline_ptx "mbarrier.init.b64 [$0], $1;" (%barrier_gen, %count), 
  predicate = %pred : !llvm.ptr, i32, i1

// Lowers to:
llvm.inline_asm has_side_effects asm_dialect = att 
  "@$2 mbarrier.init.b64 [$0], $1;", "l,r,b" %arg0, %arg2, %arg3 
  : (!llvm.ptr, i32, i1) -> ()
```

ldmatrix()

Return op name nvvm.ldmatrix as a bitstring.

ldmatrix(ssa)

nvvm.ldmatrix - cooperative matrix load

This op has support for result type inference.

Attributes

  • num - Single, I32Attr, 32-bit signless integer attribute
  • layout - Single, MMALayoutAttr, NVVM MMA layout
  • shape - Single, LdStMatrixShapeAttr, Matrix shape for ldmatrix and stmatrix
  • eltType - Single, LdStMatrixEltTypeAttr, Element type for ldmatrix and stmatrix

Operands

  • ptr - Single, LLVM_PointerShared, LLVM pointer in address space 3

Results

  • res - Single, AnyType, any non-token type

log2()

Return op name nvvm.log2 as a bitstring.

log2(ssa)

nvvm.log2 - Base-2 logarithm (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

Description

Computes a fast approximation of the base-2 logarithm of the input value. The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero.

mapa()

Return op name nvvm.mapa as a bitstring.

mapa(ssa)

nvvm.mapa

Operands

  • a - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • b - Single, I32, 32-bit signless integer

Results

  • res - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 7

match_sync()

Return op name nvvm.match.sync as a bitstring.

match_sync(ssa)

nvvm.match.sync - Broadcast and compare a value across threads in warp

This op has support for result type inference.

Attributes

  • kind - Single, MatchSyncKindAttr, NVVM match sync kind

Operands

  • thread_mask - Single, I32, 32-bit signless integer
  • val - Single, anonymous/composite constraint, 32-bit signless integer or 64-bit signless integer

Results

  • res - Single, anonymous/composite constraint, 32-bit signless integer or LLVM struct type

Description

The match.sync op performs broadcast and compare of operand val across all non-exited threads in thread_mask and returns a mask depending on the kind and an optional predicate.

The matching operation kinds are:

  • any: Returns a mask corresponding to the non-exited threads in the thread_mask that have the same value of operand val.
  • all: Returns a mask and a predicate. If all non-exited threads in the thread_mask have the same value of operand val, the predicate is set to true and the mask corresponds to the non-exited threads in the thread_mask. Otherwise, the predicate is set to false and the mask is 0.

For more information, see PTX ISA

mbarrier_arrive()

Return op name nvvm.mbarrier.arrive as a bitstring.

mbarrier_arrive(ssa)

nvvm.mbarrier.arrive - MBarrier Arrive Operation

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3 or LLVM pointer in address space 7
  • count - Optional, I32, 32-bit signless integer

Results

  • res - Optional, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive operation performs an arrive-on operation on the mbarrier object at the specified address. Uses the default .release.cta semantics. This release pattern establishes memory ordering for operations occurring in program order before this arrive instruction by making operations from the current thread visible to subsequent operations in other threads within the CTA. When other threads perform corresponding acquire operations (like 'mbarrier.test.wait'), they synchronize with this release pattern.

This operation causes the executing thread to signal its arrival at the barrier.

  • res: When the space is not shared_cluster, this operation returns an opaque 64-bit value capturing the phase of the mbarrier object prior to the arrive-on operation. The contents of this return value are implementation-specific. An mbarrier object located in the shared_cluster space cannot return a value.

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. The addr must be a pointer to generic or shared_cta or shared_cluster memory. When it is generic, the underlying address must be within the shared_cta memory space; otherwise the behavior is undefined.
  • count: This specifies the amount by which the pending arrival count is decremented. If the count argument is not specified, the pending arrival count is decremented by 1.
  • scope: This specifies the set of threads that directly observe the memory synchronizing effect of the mbarrier.arrive operation.
  • space: This indicates the memory space where the mbarrier object resides.
  • relaxed: When set to true, the arrive operation has relaxed memory semantics and does not provide any ordering or visibility guarantees.

For more information, see PTX ISA

mbarrier_arrive_drop()

Return op name nvvm.mbarrier.arrive_drop as a bitstring.

mbarrier_arrive_drop(ssa)

nvvm.mbarrier.arrive_drop - MBarrier Arrive-Drop Operation

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3 or LLVM pointer in address space 7
  • count - Optional, I32, 32-bit signless integer

Results

  • res - Optional, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive_drop operation decrements the expected arrival count of the mbarrier object by count and then performs an arrive-on operation. When count is not specified, it defaults to 1. The decrement of the expected arrival count applies to all the subsequent phases of the mbarrier object. The remaining semantics are identical to those of the nvvm.mbarrier.arrive operation.

For more information, see PTX ISA

mbarrier_arrive_drop_expect_tx()

Return op name nvvm.mbarrier.arrive_drop.expect_tx as a bitstring.

mbarrier_arrive_drop_expect_tx(ssa)

nvvm.mbarrier.arrive_drop.expect_tx - MBarrier arrive_drop with expected transaction count

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3 or LLVM pointer in address space 7
  • txcount - Single, I32, 32-bit signless integer

Results

  • res - Optional, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive_drop.expect_tx operation is similar to the nvvm.mbarrier.arrive.expect_tx operation except that it performs an arrive_drop operation instead of only an arrive operation.

For more information, see PTX ISA

mbarrier_arrive_drop_nocomplete()

Return op name nvvm.mbarrier.arrive_drop.nocomplete as a bitstring.

mbarrier_arrive_drop_nocomplete(ssa)

nvvm.mbarrier.arrive_drop.nocomplete - MBarrier Arrive-Drop No-Complete Operation

This op has support for result type inference.

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • count - Single, I32, 32-bit signless integer

Results

  • res - Single, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive_drop.nocomplete operation decrements the expected arrival count of the mbarrier object by the amount count and then performs an arrive-on operation on the mbarrier object with the guarantee that it will not cause the barrier to complete its current phase.

For more information, see PTX ISA

mbarrier_arrive_expect_tx()

Return op name nvvm.mbarrier.arrive.expect_tx as a bitstring.

mbarrier_arrive_expect_tx(ssa)

nvvm.mbarrier.arrive.expect_tx - MBarrier Arrive with Expected Transaction Count

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3 or LLVM pointer in address space 7
  • txcount - Single, I32, 32-bit signless integer
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Results

  • res - Optional, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive.expect_tx operation performs an expect-tx operation followed by an arrive-on operation on the mbarrier object. Uses the default .release.cta semantics. This release pattern establishes memory ordering for operations occurring in program order before this arrive instruction by making operations from the current thread visible to subsequent operations in other threads within the CTA. When other threads perform corresponding acquire operations (like 'mbarrier.test.wait'), they synchronize with this release pattern.

This operation first performs an expect-tx operation with the specified transaction count, then performs an arrive-on operation with an implicit count of 1. The expect-tx operation increases the expect-count of the mbarrier object by the specified value (i.e. txcount), setting the current phase to expect and track the completion of additional asynchronous transactions.

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. Uses generic addressing, but the address must still be in the shared memory space.
  • txcount: An unsigned integer specifying the expected transaction count for the expect-tx operation. This represents the number of asynchronous transactions expected to complete before the barrier phase completes.
  • scope: This specifies the set of threads that directly observe the memory synchronizing effect of the mbarrier.test.wait operation.
  • relaxed: When set to true, the arrive operation has relaxed memory semantics and does not provide any ordering or visibility guarantees.
  • predicate: Optional predicate for conditional execution used only when lowering to inline-ptx.

For more information, see PTX ISA

mbarrier_arrive_nocomplete()

Return op name nvvm.mbarrier.arrive.nocomplete as a bitstring.

mbarrier_arrive_nocomplete(ssa)

nvvm.mbarrier.arrive.nocomplete - MBarrier Arrive No-Complete Operation

This op has support for result type inference.

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • count - Single, I32, 32-bit signless integer

Results

  • res - Single, I64, 64-bit signless integer

Description

The nvvm.mbarrier.arrive.nocomplete operation performs an arrive-on operation on the mbarrier object with the guarantee that it will not cause the barrier to complete its current phase. Uses the default .release.cta semantics. This release pattern establishes memory ordering for operations occurring in program order before this arrive instruction by making operations from the current thread visible to subsequent operations in other threads within the CTA. When other threads perform corresponding acquire operations (like 'mbarrier.test.wait'), they synchronize with this release pattern.

This operation causes the executing thread to signal its arrival at the barrier with a specified count, but ensures that the barrier phase will not complete as a result of this operation. The operation returns an opaque value that captures the phase of the mbarrier object prior to the arrive-on operation.

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. The addr must be a pointer to generic or shared::cta memory. When it is generic, the underlying address must be within the shared::cta memory space; otherwise the behavior is undefined.
  • count: Integer specifying the count argument to the arrive-on operation. Must be in the valid range as specified in the mbarrier object contents.

For more information, see PTX ISA

mbarrier_complete_tx()

Return op name nvvm.mbarrier.complete_tx as a bitstring.

mbarrier_complete_tx(ssa)

nvvm.mbarrier.complete_tx - MBarrier complete-tx Operation

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 3 or LLVM pointer in address space 7
  • txcount - Single, I32, 32-bit signless integer

Description

The nvvm.mbarrier.complete_tx operation decrements the transaction count of the mbarrier object at addr by txcount. It also signals the completion of asynchronous transactions that were tracked by the current phase. The scope specifies the set of threads that can directly observe the memory synchronizing effect of the mbarrier.complete_tx operation. CTA and CLUSTER are the only allowed values for scope.

For more information, see PTX ISA

mbarrier_expect_tx()

Return op name nvvm.mbarrier.expect_tx as a bitstring.

mbarrier_expect_tx(ssa)

nvvm.mbarrier.expect_tx - MBarrier expect-tx Operation

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 3 or LLVM pointer in address space 7
  • txcount - Single, I32, 32-bit signless integer

Description

The nvvm.mbarrier.expect_tx operation increases the transaction count of the mbarrier located at addr by txcount amount. The scope specifies the set of threads that can directly observe the memory synchronizing effect of the mbarrier.expect_tx operation. CTA and CLUSTER are the only allowed values for scope.

For more information, see PTX ISA

mbarrier_init()

Return op name nvvm.mbarrier.init as a bitstring.

mbarrier_init(ssa)

nvvm.mbarrier.init - MBarrier Initialization Op

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • count - Single, I32, 32-bit signless integer
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Description

The nvvm.mbarrier.init operation initializes an mbarrier object at the specified memory location.

This operation initializes the mbarrier object with the following state:

  • Current phase: 0
  • Expected arrival count: count
  • Pending arrival count: count
  • Transaction count (tx-count): 0

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. The addr must be a pointer to generic or shared::cta memory. When it is generic, the underlying address must be within the shared::cta memory space; otherwise the behavior is undefined.
  • count: Integer specifying the number of threads that will participate in barrier synchronization. Must be in the range [1, 2²⁰ - 1].
  • predicate: Optional predicate for conditional execution.

For more information, see PTX ISA

mbarrier_inval()

Return op name nvvm.mbarrier.inval as a bitstring.

mbarrier_inval(ssa)

nvvm.mbarrier.inval - MBarrier Invalidation Operation

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3

Description

The nvvm.mbarrier.inval operation invalidates an mbarrier object at the specified memory location.

This operation marks the mbarrier object as invalid, making it safe to repurpose the memory location for other uses or to reinitialize it as a new mbarrier object. It is undefined behavior if the mbarrier object is already invalid.

The operation takes the following operand:

  • addr: A pointer to the memory location of the mbarrier object. The addr must be a pointer to generic or shared::cta memory. When it is generic, the underlying address must be within the shared::cta memory space; otherwise the behavior is undefined.

For more information, see PTX ISA

mbarrier_test_wait()

Return op name nvvm.mbarrier.test.wait as a bitstring.

mbarrier_test_wait(ssa)

nvvm.mbarrier.test.wait - MBarrier Non-Blocking Test Wait Operation

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • stateOrPhase - Single, anonymous/composite constraint, 64-bit signless integer or 32-bit signless integer

Results

  • res - Single, I1, 1-bit signless integer

Description

The nvvm.mbarrier.test.wait operation performs a non-blocking test for the completion of a specific phase of an mbarrier object. It uses the default .acquire.cta semantics. This acquire pattern establishes memory ordering for operations occurring in program order after this wait instruction by making operations from other threads in the CTA visible to subsequent operations in the current thread. When this wait completes, it synchronizes with the corresponding release pattern from the mbarrier.arrive operation, establishing memory ordering within the CTA.

This operation tests whether the mbarrier phase specified by the state operand has completed. It is a non-blocking instruction that immediately returns the completion status without suspending the executing thread.

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. Uses generic addressing, but the address must still be in the shared memory space.
  • stateOrPhase: This argument represents a state when it is a 64-bit value and represents a phase when it is a 32-bit value. The state is an opaque value returned by a previous mbarrier.arrive operation on the same mbarrier object during the current or immediately preceding phase. The phase is an integer specifying the phase parity (0 or 1). Even phases have parity 0, odd phases have parity 1.
  • scope: This specifies the set of threads that directly observe the memory synchronizing effect of the mbarrier.test.wait operation.
  • relaxed: When set to true, the arrive operation has relaxed memory semantics and does not provide any ordering or visibility guarantees.

The operation returns a boolean value indicating whether the specified phase has completed:

  • true: The immediately preceding phase has completed
  • false: The phase is still incomplete (current phase)

Memory ordering guarantees: When this wait returns true, the following ordering guarantees hold:

  1. All memory accesses (except async operations) requested prior to mbarrier.arrive having release semantics by participating CTA threads are visible to the executing thread.
  2. All cp.async operations requested prior to cp.async.mbarrier.arrive by participating CTA threads are visible to the executing thread.
  3. All cp.async.bulk operations using the same mbarrier object requested prior to mbarrier.arrive having release semantics by participating CTA threads are visible to the executing thread.
  4. Memory accesses requested after this wait are not visible to memory accesses performed prior to mbarrier.arrive by other participating threads.
  5. No ordering guarantee exists for memory accesses by the same thread between mbarrier.arrive and this wait.

For more information, see PTX ISA

mbarrier_try_wait()

Return op name nvvm.mbarrier.try_wait as a bitstring.

mbarrier_try_wait(ssa)

nvvm.mbarrier.try_wait - MBarrier try wait on state or phase with an optional timelimit

This op has support for result type inference.

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind
  • relaxed - Single, BoolAttr, bool attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • stateOrPhase - Single, anonymous/composite constraint, 64-bit signless integer or 32-bit signless integer
  • ticks - Optional, I32, 32-bit signless integer

Results

  • res - Single, I1, 1-bit signless integer

Description

The nvvm.mbarrier.try_wait operation checks whether the specified mbarrier object at addr has completed the given phase. Note that unlike the nvvm.mbarrier.test.wait operation, the try_wait operation is a potentially-blocking one. If the phase is not yet complete, the calling thread may be suspended. A suspended thread resumes execution once the phase completes or when a system-defined timeout occurs. Optionally, the ticks operand can be used to provide a custom timeout (in nanoseconds), overriding the system-defined one. The semantics of this operation and its operands are otherwise similar to those of the nvvm.mbarrier.test.wait Op.

For more information, see PTX ISA

mbarrier_try_wait_parity()

Return op name nvvm.mbarrier.try_wait.parity as a bitstring.

mbarrier_try_wait_parity(ssa)

nvvm.mbarrier.try_wait.parity - MBarrier Potentially-Blocking Try Wait with Phase Parity

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • phase - Single, I32, 32-bit signless integer
  • ticks - Single, I32, 32-bit signless integer

Description

The nvvm.mbarrier.try_wait.parity operation performs a potentially-blocking test for the completion of a specific phase of an mbarrier object using phase parity. It uses the default .acquire.cta semantics. This acquire pattern establishes memory ordering for operations occurring in program order after this wait instruction by making operations from other threads in the CTA visible to subsequent operations in the current thread. When this wait completes, it synchronizes with the corresponding release pattern from the mbarrier.arrive operation, establishing memory ordering within the CTA.

This operation waits for the completion of the mbarrier phase indicated by the phase parity. While it uses the underlying PTX mbarrier.try_wait.parity instruction, this MLIR operation generates a loop that enforces the test to complete before continuing execution, ensuring the barrier phase is actually completed rather than potentially timing out.

The operation takes the following operands:

  • addr: A pointer to the memory location of the mbarrier object. Uses generic addressing, but the address must still be in the shared memory space.
  • phase: An integer specifying the phase parity (0 or 1). Even phases have parity 0, odd phases have parity 1.
  • ticks: An unsigned integer specifying the suspend time hint in nanoseconds. This may be used instead of the system-dependent time limit.

Memory ordering guarantees: When this wait returns true, the following ordering guarantees hold:

  1. All memory accesses (except async operations) requested prior to mbarrier.arrive having release semantics by participating CTA threads are visible to the executing thread.
  2. All cp.async operations requested prior to cp.async.mbarrier.arrive by participating CTA threads are visible to the executing thread.
  3. All cp.async.bulk operations using the same mbarrier object requested prior to mbarrier.arrive having release semantics by participating CTA threads are visible to the executing thread.
  4. Memory accesses requested after this wait are not visible to memory accesses performed prior to mbarrier.arrive by other participating threads.
  5. No ordering guarantee exists for memory accesses by the same thread between mbarrier.arrive and this wait.

Implementation behavior: This operation generates a PTX loop that repeatedly calls the underlying mbarrier.try_wait.parity instruction until the barrier phase completes. Unlike the raw PTX instruction which may return without completion after a timeout, this MLIR operation guarantees completion by continuing to loop until the specified phase is reached.

For more information, see PTX ISA

memory_barrier()

Return op name nvvm.memory.barrier as a bitstring.

memory_barrier(ssa)

nvvm.memory.barrier - Memory barrier operation

Attributes

  • scope - Single, MemScopeKindAttr, NVVM Memory Scope kind

Description

membar operation guarantees that prior memory accesses requested by this thread are performed at the specified scope, before later memory operations requested by this thread following the membar instruction.

For more information, see PTX ISA

mma_block_scale()

Return op name nvvm.mma.block_scale as a bitstring.

mma_block_scale(ssa)

nvvm.mma.block_scale - cooperative matrix-multiply and accumulate with block scaling

Attributes

  • shape - Single, NVVM_MMAShapeAttr, Attribute for MMA operation shape.
  • multiplicandAPtxType - Optional, MMATypesAttr, NVVM MMA types
  • multiplicandBPtxType - Optional, MMATypesAttr, NVVM MMA types
  • scaleVecSize - Single, ScaleVecSizeAttr, MMA Scale Vector Sizes
  • blockScaleFormat - Single, BlockScaleFormatAttr, MMA Block Scale Format
  • kind - Single, MMABlockScaleKindAttr, Block Scale Kind

Operands

  • operandA - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandB - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandC - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • scaleAData - Single, I32, 32-bit signless integer
  • byteIdA - Single, I16, 16-bit signless integer
  • threadIdA - Single, I16, 16-bit signless integer
  • scaleBData - Single, I32, 32-bit signless integer
  • byteIdB - Single, I16, 16-bit signless integer
  • threadIdB - Single, I16, 16-bit signless integer

Results

  • res - Single, LLVM_AnyStruct, LLVM structure type

Description

The nvvm.mma.block_scale operation collectively performs the operation D = matmul(A * SF_A, B * SF_B) + C using all threads in a warp.

A, B, C and D are dense matrices and SF_A and SF_B are scaling factors. Dimensions of SF_A and SF_B are based on scale vector sizes (x1, x2, x4), and the data type must be either ue8m0 or ue4m3.

All the threads in the warp must execute the same mma.block_scale operation.

This operation follows the same design pattern as nvvm.mma.sync, with additional scaling operands for both A and B matrices.

Example:

%d = nvvm.mma.block_scale A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
                          scaleA[%scaleAData, %byteIdA, %threadIdA]
                          scaleB[%scaleBData, %byteIdB, %threadIdB]
                          {shape = #nvvm.shape<m = 16, n = 8, k = 64>,
                           multiplicandAPtxType = #nvvm.mma_type<e2m1>,
                           multiplicandBPtxType = #nvvm.mma_type<e2m1>,
                           scaleVecSize = #nvvm.scale_vec_size<x2>,
                           blockScaleFormat = #nvvm.block_scale_format<ue8m0>,
                           kind = #nvvm.block_scale_kind<mxf4nvf4>}
    : (vector<4xf16>, vector<2xf16>, vector<2xf32>) -> !llvm.struct<(f32, f32)>

mma_sp_block_scale()

Return op name nvvm.mma.sp.block_scale as a bitstring.

mma_sp_block_scale(ssa)

nvvm.mma.sp.block_scale - cooperative sparse matrix-multiply and accumulate with block scaling

Attributes

  • shape - Single, NVVM_MMAShapeAttr, Attribute for MMA operation shape.
  • multiplicandAPtxType - Optional, MMATypesAttr, NVVM MMA types
  • multiplicandBPtxType - Optional, MMATypesAttr, NVVM MMA types
  • scaleVecSize - Single, ScaleVecSizeAttr, MMA Scale Vector Sizes
  • blockScaleFormat - Single, BlockScaleFormatAttr, MMA Block Scale Format
  • kind - Single, MMABlockScaleKindAttr, Block Scale Kind
  • orderedMetadata - Optional, UnitAttr, unit attribute

Operands

  • operandA - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandB - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandC - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • sparseMetadata - Single, I32, 32-bit signless integer
  • sparsitySelector - Single, I32, 32-bit signless integer
  • scaleAData - Single, I32, 32-bit signless integer
  • byteIdA - Single, I16, 16-bit signless integer
  • threadIdA - Single, I16, 16-bit signless integer
  • scaleBData - Single, I32, 32-bit signless integer
  • byteIdB - Single, I16, 16-bit signless integer
  • threadIdB - Single, I16, 16-bit signless integer

Results

  • res - Single, LLVM_AnyStruct, LLVM structure type

Description

The nvvm.mma.sp.block_scale operation collectively performs the operation D = matmul(A_sparse * SF_A, B * SF_B) + C using all threads in a warp.

A is a sparse matrix, and B, C and D are dense matrices. SF_A and SF_B are scaling factors. Dimensions of SF_A and SF_B are based on scale vector sizes (x1, x2, x4), and the data type must be either ue8m0 or ue4m3.

This operation is similar to nvvm.mma.block_scale but with structured sparsity in the A operand. The sparsity follows the 2:4 structured sparse pattern where 2 out of every 4 elements are non-zero.

All the threads in the warp must execute the same mma.sp.block_scale operation.

The sparseMetadata operand provides the sparsity indices that indicate which elements in the A operand are non-zero. The sparsitySelector controls how the indices are distributed among threads in the warp and should typically be 0 or 1.

This operation follows the same design pattern as nvvm.mma.sp.sync, with additional scaling operands for both A and B matrices. Note that sparse block scale operations always use ordered metadata (sm_90+).

Example:

%d = nvvm.mma.sp.block_scale A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
                             sparseMetadata[%meta] selector[%sel]
                             scaleA[%scaleAData, %byteIdA, %threadIdA]
                             scaleB[%scaleBData, %byteIdB, %threadIdB]
                             {shape = #nvvm.shape<m = 16, n = 8, k = 128>,
                              multiplicandAPtxType = #nvvm.mma_type<e2m1>,
                              multiplicandBPtxType = #nvvm.mma_type<e2m1>,
                              scaleVecSize = #nvvm.scale_vec_size<x2>,
                              blockScaleFormat = #nvvm.block_scale_format<ue8m0>,
                              kind = #nvvm.block_scale_kind<mxf4>}
    : (vector<2xf16>, vector<2xf16>, vector<2xf32>) -> !llvm.struct<(f32, f32)>

mma_sp_sync()

Return op name nvvm.mma.sp.sync as a bitstring.

mma_sp_sync(ssa)

nvvm.mma.sp.sync - cooperative sparse matrix-multiply and accumulate

Attributes

  • shape - Single, NVVM_MMAShapeAttr, Attribute for MMA operation shape.
  • intOverflowBehavior - Optional, MMAIntOverflowAttr, MMA overflow options
  • multiplicandAPtxType - Optional, MMATypesAttr, NVVM MMA types
  • multiplicandBPtxType - Optional, MMATypesAttr, NVVM MMA types
  • orderedMetadata - Optional, UnitAttr, unit attribute
  • kind - Optional, MMAKindAttr, MMA operation kind

Operands

  • operandA - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandB - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandC - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • sparseMetadata - Single, I32, 32-bit signless integer
  • sparsitySelector - Single, I32, 32-bit signless integer

Results

  • res - Single, LLVM_AnyStruct, LLVM structure type

Description

The nvvm.mma.sp.sync operation collectively performs the sparse operation D = matmul(A_sparse, B) + C using all threads in a warp.

This operation is similar to nvvm.mma.sync but with structured sparsity in the A operand. The sparsity follows the 2:4 structured sparse pattern where 2 out of every 4 elements are non-zero.

All the threads in the warp must execute the same mma.sp.sync operation.

The sparseMetadata operand provides the sparsity indices that indicate which elements in the A operand are non-zero. The sparsitySelector controls how the indices are distributed among threads in the warp and should typically be 0 or 1.

The optional orderedMetadata attribute specifies the metadata ordering:

  • Absence (default): Uses standard sparse metadata ordering
  • Presence: Uses ordered metadata (PTX ISA 8.5+, sm_90+)

The optional kind attribute specifies mixed-precision modes for FP8 operations:

  • f8f6f4: Enables e3m2, e2m3, e2m1 FP8 types and f16 accumulator (PTX ISA 8.7+, sm_90+)
  • Only valid with ordered metadata and m16n8k64 shape

The shapes, layouts, and data types follow the same constraints as the regular nvvm.mma.sync operation, but the A operand contains only the non-zero elements in compressed format.

Example:

%d = nvvm.mma.sp.sync A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
                      sparseMetadata[%meta] selector[%sel]
                      {shape = {k = 32 : i32, m = 16 : i32, n = 8 : i32}}
    : (vector<2xf16>, vector<2xf16>, vector<2xf16>) -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>

// With ordered metadata:
%d = nvvm.mma.sp.sync A[%a0, %a1] B[%b0, %b1] C[%c0, %c1]
                      sparseMetadata[%meta] selector[%sel]
                      {orderedMetadata, shape = {k = 32 : i32, m = 16 : i32, n = 8 : i32}}
    : (vector<2xf16>, vector<2xf16>, vector<2xf16>) -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>

mma_sync()

Return op name nvvm.mma.sync as a bitstring.

mma_sync(ssa)

nvvm.mma.sync - cooperative matrix-multiply and accumulate

Attributes

  • shape - Single, NVVM_MMAShapeAttr, Attribute for MMA operation shape.
  • b1Op - Optional, MMAB1OpAttr, MMA binary operations
  • intOverflowBehavior - Optional, MMAIntOverflowAttr, MMA overflow options
  • layoutA - Single, MMALayoutAttr, NVVM MMA layout
  • layoutB - Single, MMALayoutAttr, NVVM MMA layout
  • multiplicandAPtxType - Optional, MMATypesAttr, NVVM MMA types
  • multiplicandBPtxType - Optional, MMATypesAttr, NVVM MMA types

Operands

  • operandA - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandB - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • operandC - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type

Results

  • res - Single, LLVM_AnyStruct, LLVM structure type

Description

The nvvm.mma.sync operation collectively performs the operation D = matmul(A, B) + C using all threads in a warp.

All the threads in the warp must execute the same mma.sync operation.

For each possible multiplicand PTX data type, there are one or more possible instruction shapes given as "mMnNkK". The below table describes the posssibilities as well as the types required for the operands. Note that the data type for C (the accumulator) and D (the result) can vary independently when there are multiple possibilities in the "C/D Type" column.

When an optional attribute cannot be immediately inferred from the types of the operands and the result during parsing or validation, an error will be raised.

b1Op is only relevant when the binary (b1) type is given to multiplicandDataType. It specifies how the multiply-and-acumulate is performed and is either xor_popc or and_poc. The default is xor_popc.

intOverflowBehavior is only relevant when the multiplicandType attribute is one of u8, s8, u4, s4, this attribute describes how overflow is handled in the accumulator. When the attribute is satfinite, the accumulator values are clamped in the int32 range on overflow. Alternatively, accumulator behavior wrapped can be specified (this is the default), in which case overflow wraps from one end of the range to the other.

layoutA and layoutB are required and should generally be set to #nvvm.mma_layout<row> and #nvvm.mma_layout<col> respectively, but other combinations are possible for certain layouts according to the table below.

| A/B Type | Shape     | ALayout | BLayout | A Type   | B Type   | C/D Type          |
|----------|-----------|---------|---------|----------|----------|-------------------|
| f64      | .m8n8k4   | row     | col     | 1x f64   | 1x f64   | 2x f64            |
| f16      | .m8n8k4   | row/col | row/col | 2x f16x2 | 2x f16x2 | 4x f16x2 or 8xf32 |
|          | .m16n8k8  | row     | col     | 2x f16x2 | 1x f16x2 | 2x f16x2 or 4 f32 |
|          | .m16n8k16 | row     | col     | 4x f16x2 | 2x f16x2 | 2x f16x2 or 4 f32 |
| bf16     | .m16n8k8  | row     | col     | 2x i32   | 1x i32   | 4x f32            |
|          | .m16n8k16 | row     | col     | 4x i32   | 2x i32   | 4x f32            |
| tf32     | .m16n8k4  | row     | col     | 2x i32   | 1x i32   | 4x f32            |
|          | .m16n8k8  | row     | col     | 4x i32   | 2x i32   | 2x f16x2 or 4 f32 |
| u8/s8    | .m8n8k16  | row     | col     | 1x i32   | 1x i32   | 2x i32            |
|          | .m16n8k16 | row     | col     | 2x i32   | 1x i32   | 4x i32            |
|          | .m16n8k32 | row     | col     | 4x i32   | 2x i32   | 4x i32            |
| u4/s4    | .m8n8k32  | row     | col     | 1x i32   | 1x i32   | 2x i32            |
|          | m16n8k32  | row     | col     | 2x i32   | 1x i32   | 4x i32            |
|          | m16n8k64  | row     | col     | 4x i32   | 2x i32   | 4x i32            |
| b1       | m8n8k128  | row     | col     | 1x i32   | 1x i32   | 2x i32            |
|          | m16n8k128 | row     | col     | 2x i32   | 1x i32   | 4x i32            |

Example:


%128 = nvvm.mma.sync A[%120, %121, %122, %123]
                     B[%124, %125]
                     C[%126, %127]
                     {layoutA = #nvvm.mma_layout<row>,
                      layoutB = #nvvm.mma_layout<col>,
                      shape = {k = 16 : i32, m = 16 : i32, n = 8 : i32}}
    : (vector<2xf16>, vector<2xf16>, vector<2xf16>)
       -> !llvm.struct<(vector<2xf16>, vector<2xf16>)>

movmatrix()

Return op name nvvm.movmatrix as a bitstring.

movmatrix(ssa)

nvvm.movmatrix - Warp-level matrix transpose

This op has support for result type inference.

Attributes

  • shape - Single, LdStMatrixShapeAttr, Matrix shape for ldmatrix and stmatrix
  • layout - Single, MMALayoutAttr, NVVM MMA layout
  • eltType - Single, LdStMatrixEltTypeAttr, Element type for ldmatrix and stmatrix

Operands

  • src - Single, I32, 32-bit signless integer

Results

  • dst - Single, I32, 32-bit signless integer

Description

Moves a row-major matrix across all threads in a warp, reading elements from source $src, and writing the transposed elements to destination $dst.

The shape attribute indicates the dimensions of the matrix being transposed. Each matrix element holds 16-bit data as indicated by the eltType attribute.

For more information, see PTX ISA

Example:

%dst = nvvm.movmatrix %src {shape = #nvvm.ld_st_matrix_shape<m = 8, n = 8>,
                            eltType = #nvvm.ld_st_matrix_elt_type<b16>} : i32

nanosleep()

Return op name nvvm.nanosleep as a bitstring.

nanosleep(ssa)

nvvm.nanosleep - Suspends the thread for a specified duration.

Operands

  • duration - Single, I32, 32-bit signless integer

Description

The op suspends the thread for a sleep duration approximately close to the delay $duration, specified in nanoseconds.

The sleep duration is approximated, but guaranteed to be in the interval [0, 2*t]. The maximum sleep duration is 1 millisecond. The implementation may reduce the sleep duration for individual threads within a warp such that all sleeping threads in the warp wake up together.

For more information, see PTX ISA

pmevent()

Return op name nvvm.pmevent as a bitstring.

pmevent(ssa)

nvvm.pmevent - Trigger one or more Performance Monitor events.

Attributes

  • maskedEventId - Optional, I16Attr, 16-bit signless integer attribute
  • eventId - Optional, I32Attr, 32-bit signless integer attribute

Description

Triggers one or more of a fixed number of performance monitor events, with event index or mask specified by immediate operand.

Without mask it triggers a single performance monitor event indexed by immediate operand a, in the range 0..15.

With mask it triggers one or more of the performance monitor events. Each bit in the 16-bit immediate operand controls an event.

For more information, see PTX ISA

prefetch()

Return op name nvvm.prefetch as a bitstring.

prefetch(ssa)

nvvm.prefetch - Brings the cache line containing an address into the specified cache level

Attributes

  • cacheLevel - Optional, PrefetchCacheLevelAttr, NVVM Prefetch Cache Level
  • evictPriority - Optional, CacheEvictionPriorityAttr, NVVM Cache Eviction Priority
  • tensormap - Optional, UnitAttr, unit attribute
  • uniform - Optional, UnitAttr, unit attribute
  • in_param_space - Optional, UnitAttr, unit attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 1 or LLVM pointer in address space 5 or LLVM pointer in address space 0 or LLVM pointer in address space 4
  • predicate - Optional, PtxPredicate, 1-bit signless integer

Description

Prefetches the cache line containing the address given by addr. The operand may be a global, local, or generic pointer. When tensormap is specified, the operand may instead be a constant or generic pointer. If the address maps to shared memory, the operation has no effect.

At most one of cacheLevel or tensormap may be present. The cacheLevel attribute selects the target cache level. When combined with uniform, the prefetch is performed to the uniform cache, in which case addr must be a generic pointer.

When tensormap is used, the line containing addr is brought from the constant or parameter state space for later use by cp.async.bulk.tensor. If in_param_space is specified, the generic pointer is interpreted as referring to the parameter state space.

uniform can be specified after the cacheLevel to indicate that the prefetch is performed to the specified uniform cache level. If uniform is specified, addr must be a generic address pointer and no operation is performed if addr maps to a const, local, or shared memory location.

The evictPriority attribute is optional and specifies the cache eviction priority when cacheLevel is L2.

For more information, see PTX ISA

prmt()

Return op name nvvm.prmt as a bitstring.

prmt(ssa)

nvvm.prmt - Permute bytes from two 32-bit registers

This op has support for result type inference.

Attributes

  • mode - Single, PermuteModeAttr, NVVM permute mode

Operands

  • lo - Single, I32, 32-bit signless integer
  • hi - Optional, I32, 32-bit signless integer
  • selector - Single, I32, 32-bit signless integer

Results

  • res - Single, I32, 32-bit signless integer

Description

The nvvm.prmt operation constructs a permutation of the bytes of the first one or two operands, selecting based on the 2 least significant bits of the final operand.

The bytes in the first one or two source operands are numbered. The first source operand (%lo) is numbered {b3, b2, b1, b0}, in the case of the 'default', 'f4e' and 'b4e' variants, the second source operand (%hi) is numbered {b7, b6, b5, b4}.

Modes:

  • default: Index mode - each nibble in selector selects a byte from the 8-byte pool
  • f4e : Forward 4 extract - extracts 4 contiguous bytes starting from position in selector
  • b4e : Backward 4 extract - extracts 4 contiguous bytes in reverse order
  • rc8 : Replicate 8 - replicates the lower 8 bits across the 32-bit result
  • ecl : Edge clamp left - clamps out-of-range indices to the leftmost valid byte
  • ecr : Edge clamp right - clamps out-of-range indices to the rightmost valid byte
  • rc16 : Replicate 16 - replicates the lower 16 bits across the 32-bit result

Depending on the 2 least significant bits of the %selector operand, the result of the permutation is defined as follows:

+------------+----------------+--------------+ | Mode | %selector[1:0] | Output | +------------+----------------+--------------+ | 'f4e' | 0 | {3, 2, 1, 0} | | +----------------+--------------+ | | 1 | {4, 3, 2, 1} | | +----------------+--------------+ | | 2 | {5, 4, 3, 2} | | +----------------+--------------+ | | 3 | {6, 5, 4, 3} | +------------+----------------+--------------+ | 'b4e' | 0 | {5, 6, 7, 0} | | +----------------+--------------+ | | 1 | {6, 7, 0, 1} | | +----------------+--------------+ | | 2 | {7, 0, 1, 2} | | +----------------+--------------+ | | 3 | {0, 1, 2, 3} | +------------+----------------+--------------+ | 'rc8' | 0 | {0, 0, 0, 0} | | +----------------+--------------+ | | 1 | {1, 1, 1, 1} | | +----------------+--------------+ | | 2 | {2, 2, 2, 2} | | +----------------+--------------+ | | 3 | {3, 3, 3, 3} | +------------+----------------+--------------+ | 'ecl' | 0 | {3, 2, 1, 0} | | +----------------+--------------+ | | 1 | {3, 2, 1, 1} | | +----------------+--------------+ | | 2 | {3, 2, 2, 2} | | +----------------+--------------+ | | 3 | {3, 3, 3, 3} | +------------+----------------+--------------+ | 'ecr' | 0 | {0, 0, 0, 0} | | +----------------+--------------+ | | 1 | {1, 1, 1, 0} | | +----------------+--------------+ | | 2 | {2, 2, 1, 0} | | +----------------+--------------+ | | 3 | {3, 2, 1, 0} | +------------+----------------+--------------+ | 'rc16' | 0 | {1, 0, 1, 0} | | +----------------+--------------+ | | 1 | {3, 2, 3, 2} | | +----------------+--------------+ | | 2 | {1, 0, 1, 0} | | +----------------+--------------+ | | 3 | {3, 2, 3, 2} | +------------+----------------+--------------+

[For more information, see PTX ISA] (https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-prmt)

rcp_approx_ftz_f()

Return op name nvvm.rcp.approx.ftz.f as a bitstring.

rcp_approx_ftz_f(ssa)

nvvm.rcp.approx.ftz.f

This op has support for result type inference.

Operands

  • arg - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

read_ptx_sreg_aggr_smem_size()

Return op name nvvm.read.ptx.sreg.aggr.smem.size as a bitstring.

read_ptx_sreg_aggr_smem_size(ssa)

nvvm.read.ptx.sreg.aggr.smem.size

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_clock64()

Return op name nvvm.read.ptx.sreg.clock64 as a bitstring.

read_ptx_sreg_clock64(ssa)

nvvm.read.ptx.sreg.clock64

This op has support for result type inference.

Results

  • res - Single, I64, 64-bit signless integer

read_ptx_sreg_clock()

Return op name nvvm.read.ptx.sreg.clock as a bitstring.

read_ptx_sreg_clock(ssa)

nvvm.read.ptx.sreg.clock

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_ctaid_x()

Return op name nvvm.read.ptx.sreg.cluster.ctaid.x as a bitstring.

read_ptx_sreg_cluster_ctaid_x(ssa)

nvvm.read.ptx.sreg.cluster.ctaid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_ctaid_y()

Return op name nvvm.read.ptx.sreg.cluster.ctaid.y as a bitstring.

read_ptx_sreg_cluster_ctaid_y(ssa)

nvvm.read.ptx.sreg.cluster.ctaid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_ctaid_z()

Return op name nvvm.read.ptx.sreg.cluster.ctaid.z as a bitstring.

read_ptx_sreg_cluster_ctaid_z(ssa)

nvvm.read.ptx.sreg.cluster.ctaid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_ctarank()

Return op name nvvm.read.ptx.sreg.cluster.ctarank as a bitstring.

read_ptx_sreg_cluster_ctarank(ssa)

nvvm.read.ptx.sreg.cluster.ctarank

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_nctaid_x()

Return op name nvvm.read.ptx.sreg.cluster.nctaid.x as a bitstring.

read_ptx_sreg_cluster_nctaid_x(ssa)

nvvm.read.ptx.sreg.cluster.nctaid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_nctaid_y()

Return op name nvvm.read.ptx.sreg.cluster.nctaid.y as a bitstring.

read_ptx_sreg_cluster_nctaid_y(ssa)

nvvm.read.ptx.sreg.cluster.nctaid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_nctaid_z()

Return op name nvvm.read.ptx.sreg.cluster.nctaid.z as a bitstring.

read_ptx_sreg_cluster_nctaid_z(ssa)

nvvm.read.ptx.sreg.cluster.nctaid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_cluster_nctarank()

Return op name nvvm.read.ptx.sreg.cluster.nctarank as a bitstring.

read_ptx_sreg_cluster_nctarank(ssa)

nvvm.read.ptx.sreg.cluster.nctarank

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_clusterid_x()

Return op name nvvm.read.ptx.sreg.clusterid.x as a bitstring.

read_ptx_sreg_clusterid_x(ssa)

nvvm.read.ptx.sreg.clusterid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_clusterid_y()

Return op name nvvm.read.ptx.sreg.clusterid.y as a bitstring.

read_ptx_sreg_clusterid_y(ssa)

nvvm.read.ptx.sreg.clusterid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_clusterid_z()

Return op name nvvm.read.ptx.sreg.clusterid.z as a bitstring.

read_ptx_sreg_clusterid_z(ssa)

nvvm.read.ptx.sreg.clusterid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ctaid_x()

Return op name nvvm.read.ptx.sreg.ctaid.x as a bitstring.

read_ptx_sreg_ctaid_x(ssa)

nvvm.read.ptx.sreg.ctaid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ctaid_y()

Return op name nvvm.read.ptx.sreg.ctaid.y as a bitstring.

read_ptx_sreg_ctaid_y(ssa)

nvvm.read.ptx.sreg.ctaid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ctaid_z()

Return op name nvvm.read.ptx.sreg.ctaid.z as a bitstring.

read_ptx_sreg_ctaid_z(ssa)

nvvm.read.ptx.sreg.ctaid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_dynamic_smem_size()

Return op name nvvm.read.ptx.sreg.dynamic.smem.size as a bitstring.

read_ptx_sreg_dynamic_smem_size(ssa)

nvvm.read.ptx.sreg.dynamic.smem.size

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg0()

Return op name nvvm.read.ptx.sreg.envreg0 as a bitstring.

read_ptx_sreg_envreg0(ssa)

nvvm.read.ptx.sreg.envreg0

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg1()

Return op name nvvm.read.ptx.sreg.envreg1 as a bitstring.

read_ptx_sreg_envreg1(ssa)

nvvm.read.ptx.sreg.envreg1

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg2()

Return op name nvvm.read.ptx.sreg.envreg2 as a bitstring.

read_ptx_sreg_envreg2(ssa)

nvvm.read.ptx.sreg.envreg2

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg3()

Return op name nvvm.read.ptx.sreg.envreg3 as a bitstring.

read_ptx_sreg_envreg3(ssa)

nvvm.read.ptx.sreg.envreg3

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg4()

Return op name nvvm.read.ptx.sreg.envreg4 as a bitstring.

read_ptx_sreg_envreg4(ssa)

nvvm.read.ptx.sreg.envreg4

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg5()

Return op name nvvm.read.ptx.sreg.envreg5 as a bitstring.

read_ptx_sreg_envreg5(ssa)

nvvm.read.ptx.sreg.envreg5

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg6()

Return op name nvvm.read.ptx.sreg.envreg6 as a bitstring.

read_ptx_sreg_envreg6(ssa)

nvvm.read.ptx.sreg.envreg6

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg7()

Return op name nvvm.read.ptx.sreg.envreg7 as a bitstring.

read_ptx_sreg_envreg7(ssa)

nvvm.read.ptx.sreg.envreg7

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg8()

Return op name nvvm.read.ptx.sreg.envreg8 as a bitstring.

read_ptx_sreg_envreg8(ssa)

nvvm.read.ptx.sreg.envreg8

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg9()

Return op name nvvm.read.ptx.sreg.envreg9 as a bitstring.

read_ptx_sreg_envreg9(ssa)

nvvm.read.ptx.sreg.envreg9

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg10()

Return op name nvvm.read.ptx.sreg.envreg10 as a bitstring.

read_ptx_sreg_envreg10(ssa)

nvvm.read.ptx.sreg.envreg10

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg11()

Return op name nvvm.read.ptx.sreg.envreg11 as a bitstring.

read_ptx_sreg_envreg11(ssa)

nvvm.read.ptx.sreg.envreg11

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg12()

Return op name nvvm.read.ptx.sreg.envreg12 as a bitstring.

read_ptx_sreg_envreg12(ssa)

nvvm.read.ptx.sreg.envreg12

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg13()

Return op name nvvm.read.ptx.sreg.envreg13 as a bitstring.

read_ptx_sreg_envreg13(ssa)

nvvm.read.ptx.sreg.envreg13

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg14()

Return op name nvvm.read.ptx.sreg.envreg14 as a bitstring.

read_ptx_sreg_envreg14(ssa)

nvvm.read.ptx.sreg.envreg14

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg15()

Return op name nvvm.read.ptx.sreg.envreg15 as a bitstring.

read_ptx_sreg_envreg15(ssa)

nvvm.read.ptx.sreg.envreg15

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg16()

Return op name nvvm.read.ptx.sreg.envreg16 as a bitstring.

read_ptx_sreg_envreg16(ssa)

nvvm.read.ptx.sreg.envreg16

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg17()

Return op name nvvm.read.ptx.sreg.envreg17 as a bitstring.

read_ptx_sreg_envreg17(ssa)

nvvm.read.ptx.sreg.envreg17

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg18()

Return op name nvvm.read.ptx.sreg.envreg18 as a bitstring.

read_ptx_sreg_envreg18(ssa)

nvvm.read.ptx.sreg.envreg18

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg19()

Return op name nvvm.read.ptx.sreg.envreg19 as a bitstring.

read_ptx_sreg_envreg19(ssa)

nvvm.read.ptx.sreg.envreg19

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg20()

Return op name nvvm.read.ptx.sreg.envreg20 as a bitstring.

read_ptx_sreg_envreg20(ssa)

nvvm.read.ptx.sreg.envreg20

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg21()

Return op name nvvm.read.ptx.sreg.envreg21 as a bitstring.

read_ptx_sreg_envreg21(ssa)

nvvm.read.ptx.sreg.envreg21

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg22()

Return op name nvvm.read.ptx.sreg.envreg22 as a bitstring.

read_ptx_sreg_envreg22(ssa)

nvvm.read.ptx.sreg.envreg22

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg23()

Return op name nvvm.read.ptx.sreg.envreg23 as a bitstring.

read_ptx_sreg_envreg23(ssa)

nvvm.read.ptx.sreg.envreg23

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg24()

Return op name nvvm.read.ptx.sreg.envreg24 as a bitstring.

read_ptx_sreg_envreg24(ssa)

nvvm.read.ptx.sreg.envreg24

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg25()

Return op name nvvm.read.ptx.sreg.envreg25 as a bitstring.

read_ptx_sreg_envreg25(ssa)

nvvm.read.ptx.sreg.envreg25

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg26()

Return op name nvvm.read.ptx.sreg.envreg26 as a bitstring.

read_ptx_sreg_envreg26(ssa)

nvvm.read.ptx.sreg.envreg26

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg27()

Return op name nvvm.read.ptx.sreg.envreg27 as a bitstring.

read_ptx_sreg_envreg27(ssa)

nvvm.read.ptx.sreg.envreg27

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg28()

Return op name nvvm.read.ptx.sreg.envreg28 as a bitstring.

read_ptx_sreg_envreg28(ssa)

nvvm.read.ptx.sreg.envreg28

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg29()

Return op name nvvm.read.ptx.sreg.envreg29 as a bitstring.

read_ptx_sreg_envreg29(ssa)

nvvm.read.ptx.sreg.envreg29

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg30()

Return op name nvvm.read.ptx.sreg.envreg30 as a bitstring.

read_ptx_sreg_envreg30(ssa)

nvvm.read.ptx.sreg.envreg30

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_envreg31()

Return op name nvvm.read.ptx.sreg.envreg31 as a bitstring.

read_ptx_sreg_envreg31(ssa)

nvvm.read.ptx.sreg.envreg31

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_globaltimer()

Return op name nvvm.read.ptx.sreg.globaltimer as a bitstring.

read_ptx_sreg_globaltimer(ssa)

nvvm.read.ptx.sreg.globaltimer

This op has support for result type inference.

Results

  • res - Single, I64, 64-bit signless integer

read_ptx_sreg_globaltimer_lo()

Return op name nvvm.read.ptx.sreg.globaltimer.lo as a bitstring.

read_ptx_sreg_globaltimer_lo(ssa)

nvvm.read.ptx.sreg.globaltimer.lo

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_gridid()

Return op name nvvm.read.ptx.sreg.gridid as a bitstring.

read_ptx_sreg_gridid(ssa)

nvvm.read.ptx.sreg.gridid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_laneid()

Return op name nvvm.read.ptx.sreg.laneid as a bitstring.

read_ptx_sreg_laneid(ssa)

nvvm.read.ptx.sreg.laneid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_lanemask_eq()

Return op name nvvm.read.ptx.sreg.lanemask.eq as a bitstring.

read_ptx_sreg_lanemask_eq(ssa)

nvvm.read.ptx.sreg.lanemask.eq

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_lanemask_ge()

Return op name nvvm.read.ptx.sreg.lanemask.ge as a bitstring.

read_ptx_sreg_lanemask_ge(ssa)

nvvm.read.ptx.sreg.lanemask.ge

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_lanemask_gt()

Return op name nvvm.read.ptx.sreg.lanemask.gt as a bitstring.

read_ptx_sreg_lanemask_gt(ssa)

nvvm.read.ptx.sreg.lanemask.gt

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_lanemask_le()

Return op name nvvm.read.ptx.sreg.lanemask.le as a bitstring.

read_ptx_sreg_lanemask_le(ssa)

nvvm.read.ptx.sreg.lanemask.le

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_lanemask_lt()

Return op name nvvm.read.ptx.sreg.lanemask.lt as a bitstring.

read_ptx_sreg_lanemask_lt(ssa)

nvvm.read.ptx.sreg.lanemask.lt

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nclusterid_x()

Return op name nvvm.read.ptx.sreg.nclusterid.x as a bitstring.

read_ptx_sreg_nclusterid_x(ssa)

nvvm.read.ptx.sreg.nclusterid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nclusterid_y()

Return op name nvvm.read.ptx.sreg.nclusterid.y as a bitstring.

read_ptx_sreg_nclusterid_y(ssa)

nvvm.read.ptx.sreg.nclusterid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nclusterid_z()

Return op name nvvm.read.ptx.sreg.nclusterid.z as a bitstring.

read_ptx_sreg_nclusterid_z(ssa)

nvvm.read.ptx.sreg.nclusterid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nctaid_x()

Return op name nvvm.read.ptx.sreg.nctaid.x as a bitstring.

read_ptx_sreg_nctaid_x(ssa)

nvvm.read.ptx.sreg.nctaid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nctaid_y()

Return op name nvvm.read.ptx.sreg.nctaid.y as a bitstring.

read_ptx_sreg_nctaid_y(ssa)

nvvm.read.ptx.sreg.nctaid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nctaid_z()

Return op name nvvm.read.ptx.sreg.nctaid.z as a bitstring.

read_ptx_sreg_nctaid_z(ssa)

nvvm.read.ptx.sreg.nctaid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nsmid()

Return op name nvvm.read.ptx.sreg.nsmid as a bitstring.

read_ptx_sreg_nsmid(ssa)

nvvm.read.ptx.sreg.nsmid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ntid_x()

Return op name nvvm.read.ptx.sreg.ntid.x as a bitstring.

read_ptx_sreg_ntid_x(ssa)

nvvm.read.ptx.sreg.ntid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ntid_y()

Return op name nvvm.read.ptx.sreg.ntid.y as a bitstring.

read_ptx_sreg_ntid_y(ssa)

nvvm.read.ptx.sreg.ntid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_ntid_z()

Return op name nvvm.read.ptx.sreg.ntid.z as a bitstring.

read_ptx_sreg_ntid_z(ssa)

nvvm.read.ptx.sreg.ntid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_nwarpid()

Return op name nvvm.read.ptx.sreg.nwarpid as a bitstring.

read_ptx_sreg_nwarpid(ssa)

nvvm.read.ptx.sreg.nwarpid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_smid()

Return op name nvvm.read.ptx.sreg.smid as a bitstring.

read_ptx_sreg_smid(ssa)

nvvm.read.ptx.sreg.smid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_tid_x()

Return op name nvvm.read.ptx.sreg.tid.x as a bitstring.

read_ptx_sreg_tid_x(ssa)

nvvm.read.ptx.sreg.tid.x

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_tid_y()

Return op name nvvm.read.ptx.sreg.tid.y as a bitstring.

read_ptx_sreg_tid_y(ssa)

nvvm.read.ptx.sreg.tid.y

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_tid_z()

Return op name nvvm.read.ptx.sreg.tid.z as a bitstring.

read_ptx_sreg_tid_z(ssa)

nvvm.read.ptx.sreg.tid.z

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_total_smem_size()

Return op name nvvm.read.ptx.sreg.total.smem.size as a bitstring.

read_ptx_sreg_total_smem_size(ssa)

nvvm.read.ptx.sreg.total.smem.size

This op has support for result type inference.

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_warpid()

Return op name nvvm.read.ptx.sreg.warpid as a bitstring.

read_ptx_sreg_warpid(ssa)

nvvm.read.ptx.sreg.warpid

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

read_ptx_sreg_warpsize()

Return op name nvvm.read.ptx.sreg.warpsize as a bitstring.

read_ptx_sreg_warpsize(ssa)

nvvm.read.ptx.sreg.warpsize

This op has support for result type inference.

Attributes

  • range - Optional, LLVM_ConstantRangeAttr, A range of two integers, corresponding to LLVM's ConstantRange

Results

  • res - Single, I32, 32-bit signless integer

redux_sync()

Return op name nvvm.redux.sync as a bitstring.

redux_sync(ssa)

nvvm.redux.sync - Redux Sync Op

This op has support for result type inference.

Attributes

  • kind - Single, ReductionKindAttr, NVVM Reduction Kind attribute
  • abs - Single, BoolAttr, bool attribute
  • nan - Single, BoolAttr, bool attribute

Operands

  • val - Single, anonymous/composite constraint, 32-bit signless integer or 32-bit float
  • mask_and_clamp - Single, I32, 32-bit signless integer

Results

  • res - Single, anonymous/composite constraint, 32-bit signless integer or 32-bit float

Description

redux.sync performs a reduction operation kind of the 32 bit source register across all non-exited threads in the membermask.

The abs and nan attributes can be used in the case of f32 input type, where the abs attribute causes the absolute value of the input to be used in the reduction operation, and the nan attribute causes the reduction operation to return NaN if any of the inputs to participating threads are NaN.

For more information, see PTX ISA

rsqrt()

Return op name nvvm.rsqrt as a bitstring.

rsqrt(ssa)

nvvm.rsqrt - Reciprocal square root (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Results

  • res - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Description

Computes an approximation of the reciprocal of the square root of the input value: d = 1 / sqrt(a). Supports both f32 and f64. The maximum relative error for the f32 form over the entire positive finite range is 2^-22.9.

The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero. For f64 inputs, ftz=true selects a coarser approximation that uses only the upper 32 bits of the input (the lower 32 bits of the result are zeroed).

For more information, see PTX ISA: rsqrt

setmaxregister()

Return op name nvvm.setmaxregister as a bitstring.

setmaxregister(ssa)

nvvm.setmaxregister

Attributes

  • regCount - Single, I32Attr, 32-bit signless integer attribute
  • action - Single, SetMaxRegisterActionAttr, NVVM set max register action

shfl_sync()

Return op name nvvm.shfl.sync as a bitstring.

shfl_sync(ssa)

nvvm.shfl.sync - NVVM Dialect Op for shfl.sync

This op has support for result type inference.

Attributes

  • kind - Single, ShflKindAttr, NVVM shuffle kind
  • return_value_and_is_valid - Optional, UnitAttr, unit attribute

Operands

  • thread_mask - Single, I32, 32-bit signless integer
  • val - Single, anonymous/composite constraint, 32-bit signless integer or 32-bit float
  • offset - Single, I32, 32-bit signless integer
  • mask_and_clamp - Single, I32, 32-bit signless integer

Results

  • res - Single, anonymous/composite constraint, 32-bit signless integer or 32-bit float or LLVM struct type

Description

The shfl.sync Op implements data shuffle within threads of a warp. The thread_mask denotes the threads participating in the Op where the bit position corresponds to a particular thread's laneid. The offset specifies a source lane or source lane offset (depending on kind). The val is the input value to be copied from the source. The mask_and_clamp contains two packed values specifying a mask for logically splitting warps into sub-segments and an upper bound for clamping the source lane index.

The return_value_and_is_valid unit attribute can be specified to indicate that the return value is a two-element struct, where the first element is the result value and the second element is a predicate indicating if the computed source lane index is valid.

For more information, see PTX ISA

sin()

Return op name nvvm.sin as a bitstring.

sin(ssa)

nvvm.sin - Sine (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

Description

Computes a fast approximation of the sine of the input value (in radians). The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero.

For more information, see PTX ISA: sin

sqrt()

Return op name nvvm.sqrt as a bitstring.

sqrt(ssa)

nvvm.sqrt - Take the square root of a value

This op has support for result type inference.

Attributes

  • rnd - Single, FPArithRoundingMode, NVVM FPRoundingMode kind whose value is one of {none, rm, rn, rp, rz}
  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Results

  • res - Single, anonymous/composite constraint, 32-bit float or 64-bit float

Description

Compute sqrt(src) and store the result in res.

For more information, see PTX ISA: sqrt

sqrt_approx()

Return op name nvvm.sqrt.approx as a bitstring.

sqrt_approx(ssa)

nvvm.sqrt.approx - Square root (fast approximation)

This op has support for result type inference.

Attributes

  • ftz - Single, BoolAttr, bool attribute

Operands

  • src - Single, F32, 32-bit float

Results

  • res - Single, F32, 32-bit float

Description

Computes a fast approximation of the square root of the input value (res = sqrt(src)). The maximum relative error over the entire positive finite range is 2^-23.

The ftz attribute, when set, flushes subnormal inputs and results to sign-preserving zero.

For more information, see PTX ISA: sqrt

st_bulk()

Return op name nvvm.st.bulk as a bitstring.

st_bulk(ssa)

nvvm.st.bulk - Bulk Store Op

Attributes

  • initVal - Single, I64Attr, 64-bit signless integer attribute

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 0 or LLVM pointer in address space 3
  • size - Single, I64, 64-bit signless integer

Description

Initializes a region of shared memory at the address given by addr. The size operand specifies the number of bytes to initialize and must be a multiple of 8. The initVal operand specifies the value to initialize the memory to. The only supported value is 0.

For more information, see PTX ISA

stmatrix()

Return op name nvvm.stmatrix as a bitstring.

stmatrix(ssa)

nvvm.stmatrix - cooperative matrix store

Attributes

  • layout - Single, MMALayoutAttr, NVVM MMA layout
  • shape - Single, LdStMatrixShapeAttr, Matrix shape for ldmatrix and stmatrix
  • eltType - Single, LdStMatrixEltTypeAttr, Element type for ldmatrix and stmatrix

Operands

  • ptr - Single, LLVM_PointerShared, LLVM pointer in address space 3
  • sources - Variadic, I32, variadic of 32-bit signless integer

Description

Collectively store one or more matrices across all threads in a warp to the location indicated by the address operand $ptr in shared memory.

For more information, see PTX ISA

subf()

Return op name nvvm.subf as a bitstring.

subf(ssa)

nvvm.subf -

Performs floating point subtraction of the given arguments `lhs` and `rhs`

This op has support for result type inference.

Attributes

  • rnd - Single, FPArithRoundingMode, NVVM FPRoundingMode kind whose value is one of {none, rm, rn, rp, rz}
  • sat - Single, SaturationModeSatOrNone, Describes the saturation mode whose value is one of {none, sat}
  • ftz - Single, BoolAttr, bool attribute

Operands

  • lhs - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2
  • rhs - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Results

  • res - Single, SIMTFloatType, 16-bit float or bfloat16 type or 32-bit float or 64-bit float or vector of 16-bit float or bfloat16 type or 32-bit float or 64-bit float values of length 2

Description

The nvvm.subf operation performs floating point subtraction of two operands.

It supports the same type combinations and modifiers as nvvm.addf. This is equivalent to nvvm.addf(lhs, -rhs).

For more information, see PTX ISA:

tcgen05_alloc()

Return op name nvvm.tcgen05.alloc as a bitstring.

tcgen05_alloc(ssa)

nvvm.tcgen05.alloc - Tcgen05 alloc operation

Attributes

  • group - Single, CTAGroupKindAttr, NVVM CTA group kind

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer type or LLVM pointer in address space 3
  • nCols - Single, I32, 32-bit signless integer

Description

The tcgen05.alloc Op allocates tensor core memory for the amount specified by nCols and writes the destination address to the addr argument. The nCols operand specifies the number of columns to be allocated and it must be a power-of-two. For more information, see PTX ISA

tcgen05_commit()

Return op name nvvm.tcgen05.commit as a bitstring.

tcgen05_commit(ssa)

nvvm.tcgen05.commit - Tcgen05 commit operations

Attributes

  • group - Single, CTAGroupKindAttr, NVVM CTA group kind

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer type or LLVM pointer in address space 3
  • multicastMask - Optional, I16, 16-bit signless integer

Description

The tcgen05.commit makes the mbarrier object, specified by the operand addr, track the completion of all the prior async-tcgen05 operations initiated by the executing thread. The multicast variants allow signaling on the mbarrier objects of multiple CTAs within the cluster. Operand multicastMask, when present, specifies the destination CTAs in the cluster such that each bit position in the 16-bit multicastMask operand corresponds to the nvvm.read.ptx.sreg.ctaid of the destination CTA. For more information, see PTX ISA

tcgen05_cp()

Return op name nvvm.tcgen05.cp as a bitstring.

tcgen05_cp(ssa)

nvvm.tcgen05.cp - Tcgen05 copy operation

Attributes

  • shape - Single, Tcgen05CpShapeAttr, tcgen05 cp shapes
  • group - Single, CTAGroupKindAttr, NVVM CTA group kind
  • multicast - Single, Tcgen05CpMulticastAttr, tcgen05 cp multicast
  • srcFormat - Optional, Tcgen05CpSrcFormatAttr, tcgen05 cp source format

Operands

  • taddr - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • smem_desc - Single, I64, 64-bit signless integer

Description

Instruction tcgen05.cp initiates an asynchronous copy operation from shared memory to the location specified by the address operand taddr in the Tensor Memory. The 64-bit register operand smem_desc specifies the matrix descriptor representing the source matrix in the shared memory that needs to be copied.

Example:

  nvvm.tcgen05.cp %taddr, %smem_desc {
    group = #nvvm.tcgen05_group<cta_2>,
    shape = #nvvm.tcgen05_cp_shape<shape_64x128b>,
    multicast = #nvvm.tcgen05_cp_multicast<warpx2_01_23>,
    srcFormat = #nvvm.tcgen05_cp_src_fmt<b6x16_p32>
  }

For more information, see PTX ISA

tcgen05_dealloc()

Return op name nvvm.tcgen05.dealloc as a bitstring.

tcgen05_dealloc(ssa)

nvvm.tcgen05.dealloc - Tcgen05 dealloc operation

Attributes

  • group - Single, CTAGroupKindAttr, NVVM CTA group kind

Operands

  • taddr - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • nCols - Single, I32, 32-bit signless integer

Description

The tcgen05.dealloc Op de-allocates the tensor core memory specified by tmemAddr, which must be from a previous tensor memory allocation. The nCols operand specifies the number of columns to be de-allocated, and it must be a power-of-two. For more information, see PTX ISA

tcgen05_fence()

Return op name nvvm.tcgen05.fence as a bitstring.

tcgen05_fence(ssa)

nvvm.tcgen05.fence - Tcgen05 fence operations

Attributes

  • kind - Single, Tcgen05FenceKindAttr, NVVM Tcgen05 fence kind

Description

The tcgen05.fence<before> orders all prior async tcgen05 operations with respect to the subsequent tcgen05 and execution ordering operations. The tcgen05.fence<after> orders all subsequent async tcgen05 operations with respect to the prior tcgen05 and execution ordering operations.

For more information, see PTX ISA

tcgen05_ld()

Return op name nvvm.tcgen05.ld as a bitstring.

tcgen05_ld(ssa)

nvvm.tcgen05.ld - tensor memory load instructions

Attributes

  • pack - Optional, UnitAttr, unit attribute
  • shape - Single, Tcgen05LdStShapeAttr, allowed 32-bit signless integer cases: 0, 1, 2, 3, 4

Operands

  • tmemAddr - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • offset - Optional, I64, 64-bit signless integer

Results

  • res - Single, anonymous/composite constraint, vector of 32-bit signless integer values of length 1/2/4/8/16/32/64/128

Description

Instruction tcgen05.ld asynchronously loads data from the Tensor Memory at the location specified by the 32-bit address operand tmemAddr into the destination register res, collectively across all threads of the warps.

The shape and the num attribute together determines the total dimension of the data which is loaded from the Tensor Memory. The shape attribute indicates the base dimension of data to be accessed as described in the Data Movement Shape. The num attribute indicates the repeat factor on the base dimension resulting in the total dimension of the data that is accessed.

The shape 16x32bx2 performs two accesses into Tensor Memory of the shape 16x32b. The base address of the first access is specified by tmemAddr and the base address of the second access is specified by tmemAddr + offset, where offset is an immediate argument.

The unit attribute pack can be used to pack two 16-bit elements from adjacent columns into a single 32-bit element during the load.

The following table describes the size of the vector for various combinations of num and shape attributes:

|=====================================================================|
| num/shape      |     16x32bx2/16x64b/32x32b |  16x128b   | 16x256b  |
|=====================================================================|
| x1             |          1                 |    2       |    4     |
| x2             |          2                 |    4       |    8     |
| x4             |          4                 |    8       |    16    |
| x8             |          8                 |    16      |    32    |
| x16            |          16                |    32      |    64    |
| x32            |          32                |    64      |    128   |
| x64            |          64                |    128     |    NA    |
| x128           |          128               |    NA      |    NA    |
|=====================================================================|

Example:

  nvvm.tcgen05.ld %tmemAddr, %offset pack {
    shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
  } : <2xi32>

For more information, see PTX ISA

tcgen05_ld_red()

Return op name nvvm.tcgen05.ld.red as a bitstring.

tcgen05_ld_red(ssa)

nvvm.tcgen05.ld.red - Tcgen05 tensor memory load and reduce instructions

Attributes

  • shape - Single, Tcgen05LdStShapeAttr, allowed 32-bit signless integer cases: 0, 1, 2, 3, 4
  • op - Single, ReductionKindAttr, NVVM Reduction Kind attribute
  • abs - Optional, UnitAttr, unit attribute
  • nan - Optional, UnitAttr, unit attribute

Operands

  • addr - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • offset - Optional, I64, 64-bit signless integer

Results

  • data - Single, anonymous/composite constraint, vector of 32-bit signless integer or 32-bit float values of length 2/4/8/16/32/64/128
  • redVal - Single, anonymous/composite constraint, 32-bit signless integer or 32-bit float

Description

Instruction tcgen05.ld.red asynchronously loads data from the Tensor Memory at the location specified by the 32-bit address operand addr into the destination register data, collectively across all threads of the warp. The operation also performs reduction operation specified by op on the loaded data across columns in each lane and stored into redVal

The shape and the num attribute together determines the total dimension of the data which is loaded from the Tensor Memory. The shape attribute indicates the base dimension of data to be accessed as described in the Data Movement Shape. The num attribute indicates the repeat factor on the base dimension resulting in the total dimension of the data that is accessed.

The shape 16x32bx2 performs two accesses into Tensor Memory of the shape 16x32b. The base address of the first access is specified by addr and the base address of the second access is specified by addr + offset, where offset is an immediate argument.

The following table describes the size of the vector for various combinations of num and shape attributes:

|=============================================|
| num/shape      |     16x32bx2/32x32b        |
|=============================================|
| x2             |             2              |
| x4             |             4              |
| x8             |             8              |
| x16            |             16             |
| x32            |             32             |
| x64            |             64             |
| x128           |             128            |
|=============================================|

Example:

  %data, %redval = nvvm.tcgen05.ld.red %addr, %offset {
    shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
  } : <2xi32>, i32

  %data, %redval = nvvm.tcgen05.ld.red %addr {
    shape = #nvvm.tcgen05_ldst_shape<shape_32x32b>,
  } : <2xf32>, f32

For more information, see PTX ISA

tcgen05_mma()

Return op name nvvm.tcgen05.mma as a bitstring.

tcgen05_mma(ssa)

nvvm.tcgen05.mma - Performs MMA operation on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {f16, tf32, f8f6f4, i8}
  • ctaGroup - Single, CTAGroupKindAttr, NVVM CTA group kind
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation
  • aShift - Optional, UnitAttr, unit attribute

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • scaleInputD - Optional, I64, 64-bit signless integer
  • disableOutputLane - Optional, anonymous/composite constraint, fixed-length vector of 32-bit signless integer values of length 4/8

Description

The tcgen05.mma operation is an asynchronous tensor core instruction that performs matrix multiplication, accumulation in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution and scheduling.

D = A * B + (D * 2^ -scaleInputD)    // if `scaleInputD` is provided
D = A * B                            // if `enableInputD` is false
D = A * B + D                        // otherwise

where:

  • A is an M x K matrix in tensor memory or described using shared memory descriptor
  • B is a K x N matrix described using shared memory descriptor
  • D is an M x N accumulator matrix in tensor memory

The shared memory descriptor can be generated using tcgen05.mma_smem_desc Op

Optional Operands:

  • scaleInputD is an Immediate value operand used for scaling D matrix by 2 ^ (-scaleInputD). The valid range is [0, 15]

  • disableOutputLane is a vector mask for selective output

    • vector<4 x i32> when ctaGroup is CTA_1
    • vector<8 x i32> when ctaGroup is CTA_2

Required Attributes:

  • kind is a Tcgen05MMAKind attribute

  • ctaGroup specifies CTA group configuration

    • cta_1: MMA will be performed on the current thread's CTA
    • cta_2: MMA will be performed on the current thread and it's peer CTA

Default Attributes:

  • collectorOp is a Tcgen05MMACollectorOp attribute with matrix A as the collector buffer

  • aShift shifts the rows of the A matrix down by one row and can only be applied if A is in tensor memory

For more information, see PTX ISA

tcgen05_mma_block_scale()

Return op name nvvm.tcgen05.mma.block_scale as a bitstring.

tcgen05_mma_block_scale(ssa)

nvvm.tcgen05.mma.block_scale - Performs block scaled MMA operation on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {mxf8f6f4, mxf4, mxf4nvf4}
  • ctaGroup - Single, CTAGroupKindAttr, NVVM CTA group kind
  • blockScale - Single, Tcgen05MMABlockScaleAttr, tcgen05.mma block scale attribute
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • scaleA - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • scaleB - Single, LLVM_PointerTensor, LLVM pointer in address space 6

Description

The tcgen05.mma.block_scale operation is an asynchronous tensor core instruction that performs matrix multiplication, accumulation with block scaling in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution and scheduling.

D = (A * scale_a)  * (B * scale_b)`      // if `enableInputD` is false
D = (A * scale_a)  * (B * scale_b) + D`

where:

  • A is an M x (K / 2) matrix in tensor memory or described using shared memory descriptor
  • B is a K x N matrix described using shared memory descriptor
  • D is an M x N accumulator matrix in tensor memory
  • scale_a and scale_b are matrices in tensor memory used to scale A and B respectively

The shared memory descriptor can be generated using tcgen05.mma_smem_desc Op

Required Attributes:

  • kind is a Tcgen05MMAKind attribute restricted to mxf8f6f4, mxf4, or mxf4nvf4

  • ctaGroup specifies CTA group configuration

    • cta_1: MMA will be performed on the current thread's CTA
    • cta_2: MMA will be performed on the current thread and it's peer CTA

Default Attributes:

  • collectorOp is a Tcgen05MMACollectorOp attribute with matrix A as the collector buffer

For more information, see PTX ISA

tcgen05_mma_smem_desc()

Return op name nvvm.tcgen05.mma_smem_desc as a bitstring.

tcgen05_mma_smem_desc(ssa)

nvvm.tcgen05.mma_smem_desc - Constructs a Shared Memory descriptor for MMA Operands A or B

This op has support for result type inference.

Operands

  • startAddr - Single, I32, 32-bit signless integer
  • leadingDimOffset - Single, I32, 32-bit signless integer
  • strideDimOffset - Single, I32, 32-bit signless integer
  • baseOffset - Single, I8, 8-bit signless integer
  • leadingDimMode - Single, I1, 1-bit signless integer
  • swizzleMode - Single, I8, 8-bit signless integer

Results

  • res - Single, I64, 64-bit signless integer

Description

The nvvm.tcgen05_mma_smem_desc constructs a Shared Memory descriptor for tcgen05.mma. This descriptor is a 64-bit value which describes the properties of multiplicand matrix in shared memory including its location in the shared memory of the current CTA.

+-----------+------+------------------------------------------------------+
| Bit-field | Size | Description                                          |
+-----------+------+------------------------------------------------------+
| 0-13      | 14   | Matrix start address                                 |
| 14-15     | 2    | Reserved                                             |
| 16-29     | 14   | Leading dim relative-offset (or) absolute-address    |
| 30-31     | 2    | Reserved                                             |
| 32-45     | 14   | Stride dimension byte offset                         |
| 46-48     | 3    | Fixed constant value of 0b001                        |
| 49-51     | 3    | Matrix base offset                                   |
| 52        | 1    | Leading dimension stride mode:                       |
|           |      |   0: byte offset relative                            |
|           |      |   1: byte address absolute                           |
| 53-60     | 8    | Fixed constant value of 0xb00000000                  |
| 61-63     | 3    | Swizzling mode:                                      |
|           |      |   0: No swizzling                                    |
|           |      |   1: 128-Byte with 32B atomic swizzling              |
|           |      |   2: 128-Byte swizzling                              |
|           |      |   4: 64-Byte swizzling                               |
|           |      |   6: 32-Byte swizzling                               |
|           |      |   (Values 3, 5 and 7 are invalid)                    |
+-----------+------+------------------------------------------------------+    

Example:

  %desc = nvvm.tcgen05.mma_smem_desc (%startAddr, %leadingDimOffset, %strideDimOffset,
                                      %baseOffset, %leadingDimMode, %swizzleMode) : (i32, i32, i32, i8, i1, i8) -> i64

For more information, see PTX ISA

tcgen05_mma_sp()

Return op name nvvm.tcgen05.mma.sp as a bitstring.

tcgen05_mma_sp(ssa)

nvvm.tcgen05.mma.sp - Performs MMA operation with sparse A matrix on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {f16, tf32, f8f6f4, i8}
  • ctaGroup - Single, CTAGroupKindAttr, NVVM CTA group kind
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation
  • aShift - Optional, UnitAttr, unit attribute

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • sparseMetadata - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • scaleInputD - Optional, I64, 64-bit signless integer
  • disableOutputLane - Optional, anonymous/composite constraint, fixed-length vector of 32-bit signless integer values of length 4/8

Description

The tcgen05.mma.sp operation is an asynchronous tensor core instruction that performs matrix multiplication, accumulation with sparse A matrix in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution and scheduling.

D = A * B + (D * 2^ -scaleInputD)    // if `scaleInputD` is provided
D = A * B                            // if `enableInputD` is false
D = A * B + D                        // otherwise

where:

  • A is an M x (K / 2) matrix in tensor memory or described using shared memory descriptor
  • B is a K x N matrix described using shared memory descriptor
  • D is an M x N accumulator matrix in tensor memory
  • sparseMetadata located in tensor memory specifies the mapping of the K / 2 non-zero elements to the K elements before performing the MMA operation

Other attributes and operands are similar to that of tcgen05.mma Op

For more information, see PTX ISA

tcgen05_mma_sp_block_scale()

Return op name nvvm.tcgen05.mma.sp.block_scale as a bitstring.

tcgen05_mma_sp_block_scale(ssa)

nvvm.tcgen05.mma.sp.block_scale - Performs block scaled MMA operation with sparse A matrix on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {mxf8f6f4, mxf4, mxf4nvf4}
  • ctaGroup - Single, CTAGroupKindAttr, NVVM CTA group kind
  • blockScale - Single, Tcgen05MMABlockScaleAttr, tcgen05.mma block scale attribute
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • sparseMetadata - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • scaleA - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • scaleB - Single, LLVM_PointerTensor, LLVM pointer in address space 6

Description

The tcgen05.mma.sp.block_scale operation is an asynchronous tensor core instruction that performs matrix multiplication, accumulation with block scaling, and sparse A matrix in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution, and scheduling.

D = (A * scale_a)  * (B * scale_b)      // if `enableInputD` is specified
D = (A * scale_a)  * (B * scale_b) + D  // otherwise

where:

  • A is an M x (K / 2) matrix in tensor memory or described using shared memory descriptor
  • B is a K x N matrix described using shared memory descriptor
  • D is an M x N accumulator matrix in tensor memory
  • scale_a and scale_b are matrices in tensor memory used to scale A and B respectively

Other attributes and operands are similar to that of tcgen05.mma.block_scale Op

For more information, see PTX ISA

tcgen05_mma_ws()

Return op name nvvm.tcgen05.mma.ws as a bitstring.

tcgen05_mma_ws(ssa)

nvvm.tcgen05.mma.ws - Performs weight stationary convolution MMA operation on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {f16, tf32, f8f6f4, i8}
  • collectorBBuffer - Single, Tcgen05MMACollectorBBufferAttr, tcgen05 MMA Collector Buffer B Attribute
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • zeroColMask - Optional, I64, 64-bit signless integer

Description

The tcgen05.mma.ws operation is an asynchronous tensor core instruction that performs weight stationary convolution matrix multiplication, accumulation in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution, and scheduling.

D = A * B`      // if `enableInputD` is false
D = A * B + D`  // otherwise

where:

  • A is an M x K matrix in tensor memory or described using shared memory descriptor
  • B is a K x N matrix described using shared memory descriptor
  • D is an M x N accumulator matrix in tensor memory

The shared memory descriptor can be generated using tcgen05.mma_smem_desc Op

Optional Operands:

Required Attributes:

  • kind is a Tcgen05MMAKind attribute

Default Valued Attributes:

  • collectorBBuffer specifies collector buffer for matrix B: b0 (default), b1, b2, b3

  • collectorOp is a Tcgen05MMACollectorOp attribute with matrix B as the collector buffer

For more information, see PTX ISA

tcgen05_mma_ws_sp()

Return op name nvvm.tcgen05.mma.ws.sp as a bitstring.

tcgen05_mma_ws_sp(ssa)

nvvm.tcgen05.mma.ws.sp - Performs weight stationary convolution MMA with sparse A matrix on 5th-gen tensor cores

Attributes

  • kind - Single, Tcgen05MMAKindAttr, tcgen05 MMA Supported Types whose value is one of {f16, tf32, f8f6f4, i8}
  • collectorBBuffer - Single, Tcgen05MMACollectorBBufferAttr, tcgen05 MMA Collector Buffer B Attribute
  • collectorOp - Single, Tcgen05MMACollectorOpAttr, tcgen05.mma Collector Buffer Operation

Operands

  • matrixD - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • matrixA - Single, anonymous/composite constraint, LLVM pointer in address space 6 or 64-bit signless integer
  • matrixB - Single, I64, 64-bit signless integer
  • idesc - Single, I32, 32-bit signless integer
  • enableInputD - Single, I1, 1-bit signless integer
  • sparseMetadata - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • zeroColMask - Optional, I64, 64-bit signless integer

Description

The tcgen05.mma.ws.sp operation is an asynchronous tensor core instruction that performs weight stationary convolution matrix multiplication, accumulation with sparse A matrix in a single fused operation. It targets 5th-generation tensor cores, providing developers with fine-grained control over execution, and scheduling.

D = A * B`      // if `enableInputD` is false
D = A * B + D`  // otherwise

where:

  • A is an M x (K / 2) matrix in memory or descriptor format
  • B is a K x N matrix
  • D is an M x N accumulator matrix
  • sparseMetadata located in tensor memory specifies the mapping of the K / 2 non-zero elements to the K elements before performing the MMA operation

Other attributes and operands are similar to that of tcgen05.mma.ws Op

For more information, see PTX ISA

tcgen05_relinquish_alloc_permit()

Return op name nvvm.tcgen05.relinquish_alloc_permit as a bitstring.

tcgen05_relinquish_alloc_permit(ssa)

nvvm.tcgen05.relinquish_alloc_permit - Tcgen05 Op to relinquish the right to allocate

Attributes

  • group - Single, CTAGroupKindAttr, NVVM CTA group kind

Description

The tcgen05.relinquish_alloc_permit Op specifies that the CTA of the executing thread is relinquishing the right to allocate Tensor Memory. So, it is illegal for a CTA to perform tcgen05.alloc after any of its constituent threads execute tcgen05.relinquish_alloc_permit. For more information, see PTX ISA

tcgen05_shift()

Return op name nvvm.tcgen05.shift as a bitstring.

tcgen05_shift(ssa)

nvvm.tcgen05.shift - Tcgen05 shift operation

Attributes

  • group - Single, CTAGroupKindAttr, NVVM CTA group kind

Operands

  • taddr - Single, LLVM_PointerTensor, LLVM pointer in address space 6

Description

The tcgen05.shift is an asynchronous instruction which initiates the shifting of 32-byte elements downwards across all the rows, except the last, by one row. The operand taddr specifies the base address of the matrix in Tensor Memory whose rows must be down shifted.

For more information, see PTX ISA

tcgen05_st()

Return op name nvvm.tcgen05.st as a bitstring.

tcgen05_st(ssa)

nvvm.tcgen05.st - tensor memory store instructions

Attributes

  • unpack - Optional, UnitAttr, unit attribute
  • shape - Single, Tcgen05LdStShapeAttr, allowed 32-bit signless integer cases: 0, 1, 2, 3, 4

Operands

  • tmemAddr - Single, LLVM_PointerTensor, LLVM pointer in address space 6
  • val - Single, anonymous/composite constraint, vector of 32-bit signless integer values of length 1/2/4/8/16/32/64/128
  • offset - Optional, I64, 64-bit signless integer

Description

Instruction tcgen05.st asynchronously stores data from the source register r into the Tensor Memory at the location specified by the 32-bit address operand tmemAddr, collectively across all threads of the warps.

The shape and the num attribute together determines the total dimension of the data which is stored to the Tensor Memory. The shape indicates the base dimension of data to be accessed. The num attribute indicates the repeat factor on the base dimension resulting in the total dimension of the data that is accessed.

The shape 16x32bx2 performs two accesses into Tensor Memory of the shape 16x32b. The base address of the first access is specified by tmemAddr and the base address of the second access is specified by tmemAddr + offset, where offset is an immediate argument.

The unit attribute unpack can be used to unpack a 32-bit element in the register into two 16-bit elements and store them in adjacent columns.

The following table describes the size of the vector for various combinations of num and shape attributes:

|=====================================================================|
| num/shape      |     16x32bx2/16x64b/32x32b |  16x128b   | 16x256b  |
|=====================================================================|
| x1             |          1                 |    2       |    4     |
| x2             |          2                 |    4       |    8     |
| x4             |          4                 |    8       |    16    |
| x8             |          8                 |    16      |    32    |
| x16            |          16                |    32      |    64    |
| x32            |          32                |    64      |    128   |
| x64            |          64                |    128     |    NA    |
| x128           |          128               |    NA      |    NA    |
|=====================================================================|

Example:

  nvvm.tcgen05.st %tmemAddr, %val, %offset unpack {
    shape = #nvvm.tcgen05_ldst_shape<shape_16x32bx2>,
  } : <2xi32>

For more information, see PTX ISA

tcgen05_wait()

Return op name nvvm.tcgen05.wait as a bitstring.

tcgen05_wait(ssa)

nvvm.tcgen05.wait - Tcgen05 wait operations

Attributes

  • kind - Single, Tcgen05WaitKindAttr, NVVM Tcgen05 wait kind

Description

The tcgen05.wait<load> causes the executing thread to block until all prior tcgen05.ld operations issued by the executing thread have completed. Similarly, the tcgen05.wait<store> causes the executing thread to block until all prior tcgen05.st operations issued by the executing thread have completed. For more information, see PTX ISA

tensormap_replace()

Return op name nvvm.tensormap.replace as a bitstring.

tensormap_replace(ssa)

nvvm.tensormap.replace - Modifies a field of the tensor-map object

Attributes

  • field - Single, TensormapFieldAttr, NVVM Tensormap Field Kind
  • ord - Optional, I32Attr, 32-bit signless integer attribute whose minimum value is 0 whose maximum value is 4
  • new_value_attr - Optional, TensormapFieldValueAttr, NVVM Tensormap Elemtype or NVVM Tensormap Interleave Layout or NVVM Tensormap Swizzle Mode or NVVM Tensormap Swizzle Atomicity or NVVM Tensormap Fill Mode

Operands

  • addr - Single, anonymous/composite constraint, LLVM pointer in address space 1 or LLVM pointer in address space 3
  • new_value - Optional, anonymous/composite constraint, 64-bit signless integer or 32-bit signless integer

Description

The nvvm.tensormap.replace replaces the specified field of the tensor-map object at the location specified by addr with a new value (specified by new_value or new_value_attr).

The field argument specifies the field of the tensor-map object to replace.

new_value is an i32/i64 argument that specifies the new value to replace the field with for the global_address, rank, box_dim, global_dim, global_stride, and element_stride fields. It must be an i64 for the global_address and global_stride fields and i32 for the remaining fields.

For rank, new_value must be one less than the desired tensor rank as this field uses zero-based numbering.

new_value_attr is an attribute that specifies the new value to replace the field with for the elemtype, interleave_layout, swizzle_mode, swizzle_atomicity, and fill_mode fields. It takes the place of new_value for these fields. It must be a valid attribute corresponding to the field type.

The ordinal ord is an immediate integer argument that specifies the ordinal of the field across the tensor which needs to be replaced and is required only for the box_dim, global_dim, global_stride, and element_stride fields.

For more information, see PTX ISA.

vote_sync()

Return op name nvvm.vote.sync as a bitstring.

vote_sync(ssa)

nvvm.vote.sync - Vote across thread group

This op has support for result type inference.

Attributes

  • kind - Single, VoteSyncKindAttr, NVVM vote sync kind

Operands

  • mask - Single, I32, 32-bit signless integer
  • pred - Single, I1, 1-bit signless integer

Results

  • res - Single, anonymous/composite constraint, 32-bit signless integer or 1-bit signless integer

Description

The vote.sync op will cause executing thread to wait until all non-exited threads corresponding to membermask have executed vote.sync with the same qualifiers and same membermask value before resuming execution.

The vote operation kinds are:

  • any: True if source predicate is True for some thread in membermask.
  • all: True if source predicate is True for all non-exited threads in membermask.
  • uni: True if source predicate has the same value in all non-exited threads in membermask.
  • ballot: In the ballot form, the destination result is a 32 bit integer. In this form, the predicate from each thread in membermask are copied into the corresponding bit position of the result, where the bit position corresponds to the thread's lane id.

For more information, see PTX ISA

wgmma_commit_group_sync_aligned()

Return op name nvvm.wgmma.commit.group.sync.aligned as a bitstring.

wgmma_commit_group_sync_aligned(ssa)

nvvm.wgmma.commit.group.sync.aligned

Description

Commits all prior uncommitted warpgroup level matrix multiplication operations.

For more information, see PTX ISA

wgmma_fence_aligned()

Return op name nvvm.wgmma.fence.aligned as a bitstring.

wgmma_fence_aligned(ssa)

nvvm.wgmma.fence.aligned

Description

Enforce an ordering of register accesses between warpgroup level matrix multiplication and other operations.

For more information, see PTX ISA

wgmma_mma_async()

Return op name nvvm.wgmma.mma_async as a bitstring.

wgmma_mma_async(ssa)

nvvm.wgmma.mma_async

Attributes

  • shape - Single, NVVM_MMAShapeAttr, Attribute for MMA operation shape.
  • typeA - Single, WGMMATypesAttr, NVVM WGMMA types
  • typeB - Single, WGMMATypesAttr, NVVM WGMMA types
  • typeD - Single, WGMMATypesAttr, NVVM WGMMA types
  • scaleD - Single, WGMMAScaleOutAttr, WGMMA input predicate
  • scaleA - Single, WGMMAScaleInAttr, WGMMA overflow options
  • scaleB - Single, WGMMAScaleInAttr, WGMMA overflow options
  • layoutA - Single, MMALayoutAttr, NVVM MMA layout
  • layoutB - Single, MMALayoutAttr, NVVM MMA layout
  • satfinite - Optional, MMAIntOverflowAttr, MMA overflow options

Operands

  • inouts - Single, LLVM_AnyStruct, LLVM structure type
  • descriptorA - Single, I64, 64-bit signless integer
  • descriptorB - Single, I64, 64-bit signless integer

Results

  • results - Single, LLVM_AnyStruct, LLVM structure type

Description

The warpgroup (128 threads) level matrix multiply and accumulate operation has either of the following forms, where matrix D is called accumulator: D = A B + D D = A B, where the input from accumulator D is disabled.

Supported shapes:

|--------------|--------------|------------|--------------|---------------|
|              |              |            |              |f16+=e4m3*e4m3 |
|              |              |            |              |f16+=e5m2*e5m2 |
|f32+=tf32*tf32|f16+=f16 *f16 | s32+=s8*s8 |s32 += b1 * b1|f16+=e5m2*e4m3 |
|              |f32+=f16 *f16 | s32+=u8*u8 |              |f16+=e4m3*e5m2 |
|              |f32+=bf16*bf16| s32+=u8*u8 |              |f16+=e4m3*e5m2 |
|              |f32+=bf16*bf16| s32+=s8*u8 |              |f32+=e4m3*e4m3 |
|              |              | s32+=u8*s8 |              |f32+=e5m2*e5m2 |
|              |              |            |              |f32+=e4m3*e5m2 |
|              |              |            |              |f32+=e4m3*e5m2 |
|--------------|--------------|------------|--------------|---------------|
|   .m64n8k8   |  .m64n8k16   | .m64n8k32  | .m64n8k256   | .m64n8k32     |
|   .m64n16k8  |  .m64n16k16  | .m64n16k32 | .m64n16k256  | .m64n16k32    |
|   .m64n24k8  |  .m64n24k16  | .m64n24k32 | .m64n24k256  | .m64n24k32    |
|   .m64n32k8  |  .m64n32k16  | .m64n32k32 | .m64n32k256  | .m64n32k32    |
|   .m64n40k8  |  .m64n40k16  | .m64n48k32 | .m64n48k256  | .m64n40k32    |
|   .m64n48k8  |  .m64n48k16  | .m64n64k32 | .m64n64k256  | .m64n48k32    |
|   .m64n56k8  |  .m64n56k16  | .m64n80k32 | .m64n80k256  | .m64n56k32    |
|   .m64n64k8  |  .m64n64k16  | .m64n96k32 | .m64n96k256  | .m64n64k32    |
|   .m64n72k8  |  .m64n72k16  | .m64n112k32| .m64n112k256 | .m64n72k32    |
|   .m64n80k8  |  .m64n80k16  | .m64n128k32| .m64n128k256 | .m64n80k32    |
|   .m64n88k8  |  .m64n88k16  | .m64n144k32| .m64n144k256 | .m64n88k32    |
|   .m64n96k8  |  .m64n96k16  | .m64n160k32| .m64n160k256 | .m64n96k32    |
|   .m64n104k8 |  .m64n104k16 | .m64n176k32| .m64n176k256 | .m64n104k32   |
|   .m64n112k8 |  .m64n112k16 | .m64n192k32| .m64n192k256 | .m64n112k32   |
|   .m64n120k8 |  .m64n120k16 | .m64n208k32| .m64n208k256 | .m64n120k32   |
|   .m64n128k8 |  .m64n128k16 | .m64n224k32| .m64n224k256 | .m64n128k32   |
|   .m64n136k8 |  .m64n136k16 | .m64n240k32| .m64n240k256 | .m64n136k32   |
|   .m64n144k8 |  .m64n144k16 | .m64n256k32| .m64n256k256 | .m64n144k32   |
|   .m64n152k8 |  .m64n152k16 |            |              | .m64n152k32   |
|   .m64n160k8 |  .m64n160k16 |            |              | .m64n160k32   |
|   .m64n168k8 |  .m64n168k16 |            |              | .m64n168k32   |
|   .m64n176k8 |  .m64n176k16 |            |              | .m64n176k32   |
|   .m64n184k8 |  .m64n184k16 |            |              | .m64n184k32   |
|   .m64n192k8 |  .m64n192k16 |            |              | .m64n192k32   |
|   .m64n200k8 |  .m64n200k16 |            |              | .m64n200k32   |
|   .m64n208k8 |  .m64n208k16 |            |              | .m64n208k32   |
|   .m64n216k8 |  .m64n216k16 |            |              | .m64n216k32   |
|   .m64n224k8 |  .m64n224k16 |            |              | .m64n224k32   |
|   .m64n232k8 |  .m64n232k16 |            |              | .m64n232k32   |
|   .m64n240k8 |  .m64n240k16 |            |              | .m64n240k32   |
|   .m64n248k8 |  .m64n248k16 |            |              | .m64n248k32   |
|   .m64n256k8 |  .m64n256k16 |            |              | .m64n256k32   |
|--------------|--------------|------------|--------------|---------------|

For more information, see PTX ISA

wgmma_wait_group_sync_aligned()

Return op name nvvm.wgmma.wait.group.sync.aligned as a bitstring.

wgmma_wait_group_sync_aligned(ssa)

nvvm.wgmma.wait.group.sync.aligned

Attributes

  • group - Single, I64Attr, 64-bit signless integer attribute

Description

Signal the completion of a preceding warpgroup operation.

For more information, see PTX ISA

wmma_load()

Return op name nvvm.wmma.load as a bitstring.

wmma_load(ssa)

nvvm.wmma.load - Warp synchronous matrix load

Attributes

  • m - Single, I32Attr, 32-bit signless integer attribute
  • n - Single, I32Attr, 32-bit signless integer attribute
  • k - Single, I32Attr, 32-bit signless integer attribute
  • layout - Single, MMALayoutAttr, NVVM MMA layout
  • eltype - Single, MMATypesAttr, NVVM MMA types
  • frag - Single, MMAFragAttr, NVVM MMA frag type

Operands

  • ptr - Single, LLVM_AnyPointer, LLVM pointer type
  • stride - Single, I32, 32-bit signless integer

Results

  • res - Single, anonymous/composite constraint, LLVM structure type or 64-bit float

wmma_mma()

Return op name nvvm.wmma.mma as a bitstring.

wmma_mma(ssa)

nvvm.wmma.mma - Warp synchronous matrix-multiply accumulate using tensor cores.

Attributes

  • m - Single, I32Attr, 32-bit signless integer attribute
  • n - Single, I32Attr, 32-bit signless integer attribute
  • k - Single, I32Attr, 32-bit signless integer attribute
  • layoutA - Single, MMALayoutAttr, NVVM MMA layout
  • layoutB - Single, MMALayoutAttr, NVVM MMA layout
  • eltypeA - Single, MMATypesAttr, NVVM MMA types
  • eltypeB - Single, MMATypesAttr, NVVM MMA types

Operands

  • args - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type

Results

  • res - Single, LLVM_AnyStruct, LLVM structure type

wmma_store()

Return op name nvvm.wmma.store as a bitstring.

wmma_store(ssa)

nvvm.wmma.store - Warp synchronous matrix store

Attributes

  • m - Single, I32Attr, 32-bit signless integer attribute
  • n - Single, I32Attr, 32-bit signless integer attribute
  • k - Single, I32Attr, 32-bit signless integer attribute
  • layout - Single, MMALayoutAttr, NVVM MMA layout
  • eltype - Single, MMATypesAttr, NVVM MMA types

Operands

  • ptr - Single, LLVM_AnyPointer, LLVM pointer type
  • args - Variadic, LLVM_Type, variadic of LLVM dialect-compatible type
  • stride - Single, I32, 32-bit signless integer