@@ -53,14 +53,16 @@ Module Contents
5353 - Accepts `Buffer `/`BufferRegion `/`BufferLoad ` on either side. Extents are
5454 derived as follows: `Buffer -> shape `, `BufferRegion -> [r.extent] `,
5555 `BufferLoad -> extents from its inferred/encoded region `.
56- - If both `src ` and `dst ` are scalar `BufferLoad ` without region extents,
57- lowers to a direct store: `dst[...] = src `.
58- - If one side is missing extents, it is treated as all-ones with the other
59- side's rank to enable broadcasting.
60- - Extents are right-aligned and legalized via `legalize_pairwise_extents `:
61- per tail-dimension, equal keeps as-is, a `1 ` broadcasts to the other,
62- otherwise a conservative `tir.max ` is used to remain safe for dynamic
63- shapes.
56+ - Normally, we require the extents of both sides to be the same. If they
57+ differ, the copy instruction follows an internal rule to select one side
58+ as the base range and create iteration space. This may generate unexpected
59+ code. And if some dimensions are 1, unexpected errors may happen.
60+ - Small Optimization: If both `src ` and `dst ` are scalar `BufferLoad ` without
61+ region extents, lowers to a direct store: `dst[...] = src[...] `.
62+ - Syntactic Sugar: TileLang supports passing the head address of a buffer to represent
63+ the whole buffer if there are no ambiguity. For example, T.copy(A, A_shared[i, j]).
64+ To support this, we need some special shape checking. But remember currently we don't
65+ support something like "broadcast".
6466 - The finalized extents are encoded with `tl.region ` via `to_buffer_region `
6567 and passed through to the backend; low-level loop construction and any
6668 scope-specific decisions happen during lowering.
0 commit comments