33 #ifndef TVM_TIR_BUILTIN_H_
34 #define TVM_TIR_BUILTIN_H_
Managed reference class to OpNode.
Definition: op.h:131
Primitive operators(builtin intrinsics) and registry for them.
const Op & q_multiply_shift()
Execute a multiplication between two Q-numbers x and y followed by a right shift s The default roundi...
const Op & tvm_warp_shuffle_up()
const Op & cuda_thread_rank()
tvm intrinsic that returns cooperative_groups::thread_rank() for the enclosing CTA (linear thread ind...
const Op & ptx_reduce3_min_f32()
tvm intrinsic for PTX 3-input min instruction (sm_100a+)
const Op & dma_end_group()
End a group of DMA copies.
const Op & tvm_stack_make_array()
Allocate a Tensor(DLTensor) on stack, return the handle.
const Op & vscale()
Get the target's vscale value. It will be lowered to llvm.vscale intrinsic (https://llvm....
const Op & simdgroup_multiply_accumulate()
tvm intrinsic for multiply and accumulate two matrices in simdgroup
const Op & tvm_call_cpacked_lowered()
Lowered version of call c-packed, the space of value and type codes are explicitly allocated.
const Op & cuda_thread_fence()
tvm intrinsic for cuda thread fence instruction
const Op & cuda_runtime_instr_desc()
tvm intrinsic to modify runtime instruction descriptor
const Op & tvm_access_ptr()
Get head access address with memory access pattern info.
const Op & dp4a()
Dot product of two int8x4 vectors and add an optional accumulator.
const Op & bitwise_xor()
Bitwise xor operator.
const Op & tvm_thread_allreduce()
See pesudo code.
const Op & buffer_offset()
Get the element offset of a buffer given logical indices.
const Op & cuda_atomic_cas()
tvm intrinsic for cuda atomic compare and swap instruction
const Op & cuda_bfloat162float()
tvm intrinsic for cuda bfloat16 to float conversion
const Op & tvm_call_packed_lowered()
Lowered version of call packed, the space of value and type codes are explicitly allocated.
const Op & address_of()
Returns the address of an element in the buffer (see pseudocode below).
const Op & undef()
Returns an initialized but arbitrary value.
const Op & tvm_call_trace_packed()
See pesudo code.
const Op & tvm_call_cpacked()
See pesudo code.
const Op & tvm_context_id()
Return a unique context id, used for hint of workspace separation. Different context id ganrantees no...
const Op & ptx_any_sync()
tvm intrinsic for PTX warp-wide any predicate (__any_sync)
const Op & texture2d_store()
Store to texture 2d memory.
const Op & anylist_setitem_call_cpacked()
Same as anylist_setitem_call_packed but use C calling convention.
const Op & cuda_warp_reduce()
Warp-level butterfly shuffle-XOR reduction.
const Op & timer_end_cuda()
tvm intrinsic for ending the timer for profiling a specific event, and storing profiling result in a ...
const Op & ptx_rcp()
tvm intrinsic for PTX fast reciprocal approximation (rcp.approx.ftz.f32)
const Op & tvm_call_trace_packed_lowered()
Lowered version of trace intrinsic, the space of value and type codes are explicitly allocated....
const Op & timer_start_cuda()
tvm intrinsic for starting the timer for profiling a specific event, and storing profiling result in ...
const Op & simdgroup_load()
tvm intrinsic for loading data from device memory or threadgroup memory to simdgroup.
const Op & cuda_cta_reduce()
CTA-wide reduction via warp shuffle + shared memory.
const Op & cooperative_tensor_multiply_accumulate()
Multiply and accumulate two matrices using cooperative_tensor (MetalPerformancePrimitives matmul2d).
const Op & tvm_tuple()
tvm_tuple is not an actual function and cannot codegen. It is used to represent tuple structure in va...
const Op & cooperative_tensor_store()
Store data from a cooperative_tensor to device or threadgroup memory.
const Op & call_extern()
Call an extern C function with given name and signature from the types of args in the runtime environ...
const Op & texture2d_load()
Load from texture 2d memory.
const Op & cuda_get_tmem_addr()
tvm intrinsic for cuda tmem address calculation
const Op & tvm_warp_activemask()
const Op & tvm_call_packed()
See pesudo code.
const Op & cuda_warp_sync()
tvm intrinsic for cuda warp sync instruction
const Op & lookup_param()
See pseudo code Type lookup_param(ffi::String param_name) { return __tvm_param__param_name; }.
const Op & continue_loop()
Loop continue.
const Op & cuda_syncthreads_or()
tvm intrinsic for cuda syncthreads_or instruction
const Op & cuda_trap_when_assert_failed()
tvm intrinsic to trap when an assertion failed (cond == false)
const Op & prefetch()
same signature as llvm.prefetch
const Op & cuda_float22half2()
tvm intrinsic for a helper converting float2 to half2 with rounding
const Op & timer_init_cuda()
tvm intrinsic for initializing the CUDA profiler, and store profiling result in a buffer.
const Op & tvm_struct_set()
See pesudo code.
const Op & selector()
Analysis-only active-thread selector.
const Op & cuda_grid_sync()
tvm intrinsic for cuda grid-wide sync (cooperative groups)
const Op & thread_return()
Return from a GPU thread.
const Op & get_active_lane_mask()
Calculate a predicate mask given an upper bound (limit) and a current value (base).
const Op & if_then_else()
Same as select, used for unsafe memory access.
const Op & cuda_printf()
tvm intrinsic for cuda printf instruction
const Op & ret()
Return value.
const Op & end_profile_intrinsic()
Profiling intrinsic.
const Op & ptx_exp2()
tvm intrinsic for PTX fast exp2 approximation (ex2.approx.ftz.f32)
const Op & call_spirv_pure_glsl450()
Call an SPIRV pure GLSL450 intrinsic.
const Op & bitwise_not()
Bitwise not operator.
const Op & cooperative_tensor_load()
Load data from device or threadgroup memory into a cooperative_tensor.
const Op & tvm_stack_alloca()
See pesudo code.
const Op & ptx_sub_packed_f32x2()
tvm intrinsic for PTX packed subtract instruction (sm_100a+)
const Op & break_loop()
Loop break.
const Op & bitwise_and()
Bitwise and operator.
const Op & print_buffer()
Print the content of a buffer during runtime.
const Op & assume()
Provide a true statement that can be used for simplifications.
const Op & large_uint_imm()
See pesudo code.
const Op & tvm_thread_invariant()
Mark a condition to be thread invariant. This means the condition must be the same for all threads.
const Op & start_profile_intrinsic()
Profiling intrinsic.
const Op & cuda_cta_sync()
tvm intrinsic for cuda block-wide sync (syncthreads)
const Op & handle_add_byte_offset()
See pesudo code.
const Op & call_llvm_pure_intrin()
Call an LLVM pure intrinsic with a given intrinsic id and signature from the types of args in the run...
const Op & filter()
Thread-set filter predicate. Used as the condition of an IfThenElse to narrow the active thread set A...
const Op & tvm_global_barrier_kinit()
Initialize the global barrier. Call this at beginning of kernel that need global barrier.
const Op & fma()
Fused multiply add.
const Op & cuda_half2float()
tvm intrinsic for cuda half to float conversion
const Op & cuda_half8tofloat8()
tvm intrinsic to convert 8 half2 lanes to 8 float2 lanes
const Op & call_pure_extern()
Call an pure extern C function with given name and signature from the types of args in the runtime en...
const Op & tvm_throw_last_error()
See pesudo code.
const Op & shift_left()
Left shift.
const Op & tvm_warp_shuffle_down()
const Op & dma_start_group()
Start a group of DMA copies.
const Op & cuda_ldg()
tvm intrinsic for cuda ldg instruction
const Op & cuda_copy_bytes()
Typed load/store copy of num_bytes bytes.
const Op & dma_copy()
Initiate a non-blocking DMA copy from source to destination.
const Op & tvm_storage_sync()
See pseudo code.
const Op & call_llvm_intrin()
Call an LLVM intrinsic with a given intrinsic id and signature from the types of args in the runtime ...
const Op & likely()
Marks a condition is likely going to happen.
const Op & make_filled_simdgroup_matrix()
tvm intrinsic for initializing and simdgroup with given value.
const Op & ignore_loop_partition()
Annotate a predicate not be considered as target condition of loop partition.
const Op & vectorhigh()
Get the high level half of the vector.
const Op & anylist_setitem_call_packed()
Set an item into any list by running packed function call.
const Op & cuda_nano_sleep()
tvm intrinsic for cuda nano sleep instruction
const Op & simdgroup_store()
tvm intrinsic for storing data from simdgroup to device memory or threadgroup memory.
const Op & shift_right()
Right shift.
const Op & anylist_getitem()
Get a item from any list and return it.
const Op & ptx_fma_packed_f32x2()
tvm intrinsic for PTX packed FMA instruction (sm_100a+)
const Op & cooperative_tensor_fill()
Fill a cooperative_tensor with a given value.
const Op & timer_finalize_cuda()
tvm intrinsic for finalize the timer for profiling, and storing profiling result in a buffer.
const Op & tvm_static_handle()
Create a function local static handle that iniitalizes to nullptr. can be used to cache function loca...
const Op & vectorcombine()
Concat two vectors.
const Op & tvm_warp_shuffle_xor()
TVMStructFieldKind
The kind of structure field info used in intrinsic.
Definition: builtin.h:816
@ kDLTensorNDim
Definition: builtin.h:822
@ kTVMFFIAnyUnionValue
Definition: builtin.h:834
@ kTVMFFIAnyTypeIndex
Definition: builtin.h:832
@ kDLTensorDeviceId
Definition: builtin.h:827
@ kDLTensorKindBound_
Definition: builtin.h:829
@ kDLTensorTypeLanes
Definition: builtin.h:825
@ kTVMValueKindBound_
Definition: builtin.h:835
@ kTVMValueContent
Definition: builtin.h:831
@ kDLTensorStrides
Definition: builtin.h:821
@ kDLTensorTypeCode
Definition: builtin.h:823
@ kDLTensorAddr
Definition: builtin.h:818
@ kDLTensorByteOffset
Definition: builtin.h:826
@ kDLTensorShape
Definition: builtin.h:820
@ kInt64ArrayElem
Definition: builtin.h:837
@ kDLTensorDeviceType
Definition: builtin.h:828
@ kTVMFFIAnyZeroPadding
Definition: builtin.h:833
@ kDLTensorData
Definition: builtin.h:819
@ kDLTensorTypeBits
Definition: builtin.h:824
const Op & tvm_stack_make_shape()
Allocate a shape tuple on stack, return the handle.
const Op & isnullptr()
See pesudo code.
const Op & ptx_reduce3_max_f32()
tvm intrinsic for PTX 3-input max instruction (sm_100a+)
const Op & dma_wait()
Wait until the number of DMA groups in flight is less than or equal to some maximum.
const Op & atomic_add()
atomic add instruction, corresponding e.g. to atomicAdd in CUDA
const Op & ptx_mul_packed_f32x2()
tvm intrinsic for PTX packed multiply instruction (sm_100a+)
const Op & tvm_struct_get()
See pesudo code.
const Op & reinterpret()
Reinterpret the value using the target type.
const Op & isnan()
Check if value is nan.
const Op & vectorlow()
Get the low-level half of the vector.
const Op & cuda_syncthreads_and()
tvm intrinsic for cuda syncthreads_and instruction
const Op & cuda_float8tohalf8()
tvm intrinsic to convert 8 float2 lanes to 8 half2 lanes with rounding
const Op & cuda_atomic_add()
tvm intrinsic for cuda atomic add instruction
const Op & ptx_add_packed_f32x2()
tvm intrinsic for PTX packed add instruction (sm_100a+)
const Op & tvm_warp_shuffle()
See pseudo code.
const Op & anylist_resetitem()
Reset and clear a item in any list.
const Op & popcount()
Popcount.
const Op & nd_mem_alloc_with_scope()
Create an Nd memory allocation with storage scope.
const Op & bitwise_or()
Bitwise or operator.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:37