Skip to content

Commit c586cba

Browse files
Update docs
1 parent 3e8720b commit c586cba

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

_sources/autoapi/tilelang/language/copy/index.rst.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ Module Contents
3737
:returns: A handle to the copy operation
3838
:rtype: tir.Call
3939

40+
Range handling notes:
41+
- Accepts `Buffer`/`BufferRegion`/`BufferLoad` on either side. Extents are
42+
derived as follows: `Buffer -> shape`, `BufferRegion -> [r.extent]`,
43+
`BufferLoad -> extents from its inferred/encoded region`.
44+
- If both `src` and `dst` are scalar `BufferLoad` without region extents,
45+
lowers to a direct store: `dst[...] = src`.
46+
- If one side is missing extents, it is treated as all-ones with the other
47+
side's rank to enable broadcasting.
48+
- Extents are right-aligned and legalized via `legalize_pairwise_extents`:
49+
per tail-dimension, equal keeps as-is, a `1` broadcasts to the other,
50+
otherwise a conservative `tir.max` is used to remain safe for dynamic
51+
shapes.
52+
- The finalized extents are encoded with `tl.region` via `to_buffer_region`
53+
and passed through to the backend; low-level loop construction and any
54+
scope-specific decisions happen during lowering.
55+
4056

4157
.. py:function:: c2d_im2col(img, col, nhw_step, c_step, kernel, stride, dilation, pad, eviction_policy = None)
4258

autoapi/tilelang/language/copy/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,25 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
543543
<dd class="field-even"><p>tir.Call</p>
544544
</dd>
545545
</dl>
546+
<p>Range handling notes:
547+
- Accepts <cite>Buffer</cite>/<cite>BufferRegion</cite>/<cite>BufferLoad</cite> on either side. Extents are</p>
548+
<blockquote>
549+
<div><p>derived as follows: <cite>Buffer -&gt; shape</cite>, <cite>BufferRegion -&gt; [r.extent]</cite>,
550+
<cite>BufferLoad -&gt; extents from its inferred/encoded region</cite>.</p>
551+
</div></blockquote>
552+
<ul class="simple">
553+
<li><p>If both <cite>src</cite> and <cite>dst</cite> are scalar <cite>BufferLoad</cite> without region extents,
554+
lowers to a direct store: <cite>dst[…] = src</cite>.</p></li>
555+
<li><p>If one side is missing extents, it is treated as all-ones with the other
556+
side’s rank to enable broadcasting.</p></li>
557+
<li><p>Extents are right-aligned and legalized via <cite>legalize_pairwise_extents</cite>:
558+
per tail-dimension, equal keeps as-is, a <cite>1</cite> broadcasts to the other,
559+
otherwise a conservative <cite>tir.max</cite> is used to remain safe for dynamic
560+
shapes.</p></li>
561+
<li><p>The finalized extents are encoded with <cite>tl.region</cite> via <cite>to_buffer_region</cite>
562+
and passed through to the backend; low-level loop construction and any
563+
scope-specific decisions happen during lowering.</p></li>
564+
</ul>
546565
</dd></dl>
547566

548567
<dl class="py function">

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)