tilelang.language.customize¶
Some customized operations frequently used in tensor programming, exposed on the TileLang language surface.
函式¶
|
Perform a 4-element dot product with accumulation (DP4A). |
|
Clamps the input value dst between [min_val, max_val] |
|
Reshapes the input buffer to the specified shape. |
|
Return a Tensor view of the input buffer with an optional new shape and dtype. |
Break out of the current loop. |
Module Contents¶
- tilelang.language.customize.dp4a(A, B, C)¶
Perform a 4-element dot product with accumulation (DP4A).
- 參數:
A (Buffer) -- First input buffer
B (Buffer) -- Second input buffer
C (Buffer) -- Accumulation buffer
- 回傳:
Handle to the DP4A operation
- 回傳型別:
PrimExpr
- tilelang.language.customize.clamp(dst, min_val, max_val)¶
Clamps the input value dst between [min_val, max_val]
- 參數:
dst (tvm.tir.PrimExpr) -- Input value to be clamped
min_val (tvm.tir.PrimExpr) -- Minimum value
max_val (tvm.tir.PrimExpr) -- Maximum value
- 回傳:
Value clamped to the specified range
- 回傳型別:
tvm.tir.PrimExpr
- tilelang.language.customize.reshape(src, shape)¶
Reshapes the input buffer to the specified shape.
- 參數:
src (Buffer) -- Input buffer to be reshaped
shape (ShapeType) -- New shape for the buffer
- 回傳:
A new buffer view with the specified shape
- 回傳型別:
Buffer
- tilelang.language.customize.view(src, shape=None, dtype=None)¶
Return a Tensor view of the input buffer with an optional new shape and dtype.
If shape is None the source buffer's shape is used; if dtype is None the source buffer's dtype is used. The returned buffer shares the same underlying data as src (no copy).
- 參數:
src (tvm.tir.Buffer)
shape (tilelang._typing.ShapeType | None)
dtype (tilelang._typing.DType | None)
- 回傳型別:
tvm.tir.Buffer
- tilelang.language.customize.loop_break()¶
Break out of the current loop.
- 回傳:
A call to the tl.loop_break intrinsic.
- 回傳型別:
tir.Call