tilelang.cuda.language.prefetch¶

Functions¶

prefetch_l1(addr)

Prefetch the global or local memory cache line containing addr into L1.

prefetchu_l1(addr)

Prefetch the memory cache line containing addr into uniform L1.

prefetch_l2(addr[, eviction_policy])

Prefetch the global or local memory cache line containing addr into L2.

Module Contents¶

tilelang.cuda.language.prefetch.prefetch_l1(addr)¶

Prefetch the global or local memory cache line containing addr into L1.

Parameters:

addr (tvm.tirx.BufferLoad)

Return type:

tvm.tirx.Call

tilelang.cuda.language.prefetch.prefetchu_l1(addr)¶

Prefetch the memory cache line containing addr into uniform L1.

Parameters:

addr (tvm.tirx.BufferLoad)

Return type:

tvm.tirx.Call

tilelang.cuda.language.prefetch.prefetch_l2(addr, eviction_policy=None)¶

Prefetch the global or local memory cache line containing addr into L2.

Parameters:
  • addr (tvm.tirx.BufferLoad) – A global or local buffer element, such as x[i]. Only its address is used.

  • eviction_policy (Literal['evict_normal', 'evict_last'] | None) – Compile-time cache eviction priority. None leaves the priority unspecified. “evict_normal” and “evict_last” require global memory and sm_80 or later.

Returns:

A call to the L2 prefetch intrinsic. Prefetch is a performance hint and does not guarantee cache residency or synchronize memory accesses.

Return type:

tvm.tirx.Call