tilelang.language.copyΒΆ
The language interface for tl programs.
FunctionsΒΆ
|
Copy data between memory regions. |
|
Perform im2col transformation for 2D convolution. |
Module ContentsΒΆ
- tilelang.language.copy.copy(src, dst, coalesced_width=None, disable_tma=False, eviction_policy=None)ΒΆ
Copy data between memory regions.
- Parameters:
src (Union[tir.Buffer, tir.BufferLoad, tir.BufferRegion]) β Source memory region
dst (Union[tir.Buffer, tir.BufferLoad]) β Destination memory region
coalesced_width (Optional[int], optional) β Width for coalesced memory access. Defaults to None.
disable_tma (bool)
eviction_policy (Literal['evict_normal', 'evict_first', 'evict_last'] | None)
- Raises:
TypeError β If copy extents cannot be deduced from arguments
- Returns:
A handle to the copy operation
- Return type:
tir.Call
- tilelang.language.copy.c2d_im2col(img, col, nhw_step, c_step, kernel, stride, dilation, pad, eviction_policy=None)ΒΆ
Perform im2col transformation for 2D convolution.
- Parameters:
img (tir.Buffer) β Input image buffer
col (tir.Buffer) β Output column buffer
nhw_step (tir.PrimExpr) β Step size for batch and spatial dimensions
c_step (tir.PrimExpr) β Step size for channel dimension
kernel (int) β Kernel size
stride (int) β Stride of the convolution
dilation (int) β Dilation rate
pad (int) β Padding size
eviction_policy (Literal['evict_normal', 'evict_first', 'evict_last'] | None)
- Returns:
A handle to the im2col operation
- Return type:
tir.Call