Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tilelang/language/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def clamp(dst: PrimExpr, min_val: PrimExpr, max_val: PrimExpr) -> PrimExpr:
return dst


def reshape(src: Buffer, shape: list[PrimExpr]) -> Buffer:
def reshape(src: Buffer, shape: list[PrimExpr] | tuple[PrimExpr, ...]) -> Buffer:
"""Reshapes the input buffer to the specified shape.

Args:
Expand All @@ -53,7 +53,7 @@ def reshape(src: Buffer, shape: list[PrimExpr]) -> Buffer:
return T.Tensor(shape, src.dtype, src.data)


def view(src: Buffer, shape: list[PrimExpr] | None = None, dtype: str | None = None) -> Buffer:
def view(src: Buffer, shape: list[PrimExpr] | tuple[PrimExpr, ...] | None = None, dtype: str | object | None = None) -> Buffer:
"""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).
Expand Down