This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/tvm-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 122146c1483 deploying tirx docs
(d6cd4dbd3397c5e58578a4accf889d7329e83671)
122146c1483 is described below
commit 122146c14834bf76faece4c2e6c116d533de15a5
Author: tvm-bot <[email protected]>
AuthorDate: Sun Nov 8 00:37:05 2026 +0000
deploying tirx docs (d6cd4dbd3397c5e58578a4accf889d7329e83671)
---
tirx/_sources/advanced/defining_ir_extensions.rst | 4 +-
.../_sources/ir_guides/working_with_ir_in_rust.rst | 6 +-
.../generated/file_tvm_ir_prim_pattern_match.h.rst | 12 +-
.../cpp/generated/file_tvm_tirx_op_math.h.rst | 4 +-
.../reference/cpp/generated/namespace_tvm.rst | 8 +-
tirx/_sources/reference/rust/index.rst | 6 +-
tirx/advanced/defining_ir_extensions.html | 4 +-
tirx/commit_hash | 2 +-
tirx/ir_guides/working_with_ir_in_rust.html | 6 +-
.../file_tvm_ir_prim_pattern_match.h.html | 6 +-
.../cpp/generated/file_tvm_tirx_op_math.h.html | 2 +-
tirx/reference/cpp/generated/namespace_tvm.html | 4 +-
.../generated/tvm_tirx.tirx.tile.Operand.html | 2 +-
.../rust/generated/src/tvm_tirx/ir/op.rs.html | 2 +-
.../rust/generated/src/tvm_tirx/lib.rs.html | 375 +++++++++++----------
...tructural_visit_with_constraint_context.rs.html | 2 +-
tirx/reference/rust/generated/tvm_tirx/index.html | 11 +-
tirx/reference/rust/index.html | 6 +-
tirx/searchindex.js | 2 +-
19 files changed, 233 insertions(+), 231 deletions(-)
diff --git a/tirx/_sources/advanced/defining_ir_extensions.rst
b/tirx/_sources/advanced/defining_ir_extensions.rst
index 9a872488c98..24de828b196 100644
--- a/tirx/_sources/advanced/defining_ir_extensions.rst
+++ b/tirx/_sources/advanced/defining_ir_extensions.rst
@@ -283,10 +283,10 @@ The rewrites are:
:start-after: // begin lowering
:end-before: // end lowering
:prepend: struct Lowering {
- bindings: Vec<(Var, Var, Var)>,
+ bindings: Vec<(Var, PrimVar, PrimVar)>,
}
impl Lowering {
- fn parts(&self, expr: &Expr) -> Result<(Expr, Expr)> { ... }
+ fn parts(&self, expr: &Expr) -> Result<(PrimExpr, PrimExpr)> {
... }
}
#[dispatch(map, (AnyView<'_>,), Result<UnchangedOr<Any>>)]
impl Lowering {
diff --git a/tirx/_sources/ir_guides/working_with_ir_in_rust.rst
b/tirx/_sources/ir_guides/working_with_ir_in_rust.rst
index 89f29a15548..4a2364532cc 100644
--- a/tirx/_sources/ir_guides/working_with_ir_in_rust.rst
+++ b/tirx/_sources/ir_guides/working_with_ir_in_rust.rst
@@ -41,9 +41,9 @@ The examples are packaged as ``tirx_ir_guide_examples`` under
`examples/ir_guides
<https://github.com/apache/tvm-tirx/tree/main/examples/ir_guides>`__.
When cargo is available, installing the package builds the Rust crate in
``rust/`` into a library; ``CMakeLists.txt`` and ``pyproject.toml`` in the
-same directory show how. The crate uses the bindings from this checkout,
-so install TIRx from the same source tree. We install without build isolation
-to build against that installation instead of fetching one from PyPI:
+same directory show how. The crate depends on the ``tvm-tirx`` crate of this
+checkout, so install TIRx from the same source tree. We install without build
+isolation to build against that installation instead of fetching one from PyPI:
.. code-block:: bash
diff --git
a/tirx/_sources/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.rst
b/tirx/_sources/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.rst
index c179dcdbc3d..e4776285a7e 100644
--- a/tirx/_sources/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.rst
+++ b/tirx/_sources/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.rst
@@ -152,12 +152,12 @@ Functions
- :ref:`exhale_function_namespacetvm_1a02224802057577e4a98e692b72a47225`
-- :ref:`exhale_function_namespacetvm_1a9376cf5684d043ff86fdd43767deaa59`
-
- :ref:`exhale_function_namespacetvm_1ad6f2b9d9c6ac80579866e62f53756e25`
- :ref:`exhale_function_namespacetvm_1aba7b9587003dda3fe9f353c80c2f5dfd`
+- :ref:`exhale_function_namespacetvm_1a9376cf5684d043ff86fdd43767deaa59`
+
- :ref:`exhale_function_namespacetvm_1a66ed8401a553ad5d4f444283cd619e85`
- :ref:`exhale_function_namespacetvm_1a6d6a1c629c51224ea66b141ff966b93f`
@@ -218,12 +218,12 @@ Functions
- :ref:`exhale_function_namespacetvm_1ae07cb4d386babd74a5e42d143882bfd3`
-- :ref:`exhale_function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15`
-
- :ref:`exhale_function_namespacetvm_1a06c876d86dd675819633003200a04c3a`
- :ref:`exhale_function_namespacetvm_1a0116e9743c4fd5d3ee6b660870e5bf4f`
+- :ref:`exhale_function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15`
+
- :ref:`exhale_function_namespacetvm_1ac559d7393509db4ce67a54d4edfbe8b0`
- :ref:`exhale_function_namespacetvm_1a7351c7ad62e6febd0cfff024204afd7c`
@@ -270,10 +270,10 @@ Functions
- :ref:`exhale_function_namespacetvm_1a34d3774087ee1b5cddd400921762235f`
-- :ref:`exhale_function_namespacetvm_1aafc5e5fa4393becb77c4b6d7da3ace2d`
-
- :ref:`exhale_function_namespacetvm_1a98593b4c0d2622859925df160ca32f3d`
+- :ref:`exhale_function_namespacetvm_1aafc5e5fa4393becb77c4b6d7da3ace2d`
+
- :ref:`exhale_function_namespacetvm_1a3fa4f9842f6f0d7c651561a15d29f47a`
- :ref:`exhale_function_namespacetvm_1a7e76c8a0d99d28429fd531bdf9f7598e`
diff --git a/tirx/_sources/reference/cpp/generated/file_tvm_tirx_op_math.h.rst
b/tirx/_sources/reference/cpp/generated/file_tvm_tirx_op_math.h.rst
index 70041408a6c..c3d3a5d8832 100644
--- a/tirx/_sources/reference/cpp/generated/file_tvm_tirx_op_math.h.rst
+++ b/tirx/_sources/reference/cpp/generated/file_tvm_tirx_op_math.h.rst
@@ -57,9 +57,9 @@ Functions
-
:ref:`exhale_function_namespacetvm_1_1tirx_1aed615c151b18908d314e2f4fd62ae9f7`
--
:ref:`exhale_function_namespacetvm_1_1tirx_1a4f5fb501032540c31b8249d4b63160c2`
-
-
:ref:`exhale_function_namespacetvm_1_1tirx_1ac66dc986673e79d2d9f6bbc4a7dc2d6f`
-
:ref:`exhale_function_namespacetvm_1_1tirx_1a232ca4bffb36db0d70b967ce516639cd`
+-
:ref:`exhale_function_namespacetvm_1_1tirx_1a4f5fb501032540c31b8249d4b63160c2`
+
diff --git a/tirx/_sources/reference/cpp/generated/namespace_tvm.rst
b/tirx/_sources/reference/cpp/generated/namespace_tvm.rst
index 5f2349b6919..d9a5a51692d 100644
--- a/tirx/_sources/reference/cpp/generated/namespace_tvm.rst
+++ b/tirx/_sources/reference/cpp/generated/namespace_tvm.rst
@@ -648,14 +648,14 @@ Functions
- :ref:`exhale_function_namespacetvm_1a03983cf66713724c138f9697bb8e0e97`
-- :ref:`exhale_function_namespacetvm_1ab25738e50b37cd07b2d171ca74ba9321`
-
- :ref:`exhale_function_namespacetvm_1afcdbd1fab3bdd58534c7fa93f3443d91`
- :ref:`exhale_function_namespacetvm_1a15550334ba622451f41e2f04d386c1a2`
- :ref:`exhale_function_namespacetvm_1ab09a39be17461ad9a4f0ec0b3cb963d9`
+- :ref:`exhale_function_namespacetvm_1ab25738e50b37cd07b2d171ca74ba9321`
+
- :ref:`exhale_function_namespacetvm_1a253689828377e1e885a14b913f37a1c8`
- :ref:`exhale_function_namespacetvm_1a92e2cae35b1e48f130b76f42c6ee3106`
@@ -738,12 +738,12 @@ Functions
- :ref:`exhale_function_namespacetvm_1a164d454c519fecaa5611c86b65469acc`
-- :ref:`exhale_function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15`
-
- :ref:`exhale_function_namespacetvm_1a06c876d86dd675819633003200a04c3a`
- :ref:`exhale_function_namespacetvm_1a0116e9743c4fd5d3ee6b660870e5bf4f`
+- :ref:`exhale_function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15`
+
- :ref:`exhale_function_namespacetvm_1a18256ba1213ce5ff3cf8037a314354b7`
- :ref:`exhale_function_namespacetvm_1a136427374941fbf8e50f53b1cab39e38`
diff --git a/tirx/_sources/reference/rust/index.rst
b/tirx/_sources/reference/rust/index.rst
index 07cfed0f161..6e2adf60f1e 100644
--- a/tirx/_sources/reference/rust/index.rst
+++ b/tirx/_sources/reference/rust/index.rst
@@ -46,8 +46,8 @@ Crates
- Description
* - 📦 `tvm-tirx <generated/tvm_tirx/index.html>`_
- The IR, TIRx, symbolic analysis, target, backend, runtime, codegen and
script
- bindings, the Rust IR constructors and operators, and the definition of
new
+ modules, their IR constructors and operators, and the definition of new
types, operators, and passes.
* - 📦 `tvm-ffi <generated/tvm_ffi/index.html>`_
- - The TVM FFI objects, functions, containers and ``static_init_block!``
the
- bindings are built on, re-exported as ``tvm_tirx::tvm_ffi``.
+ - The TVM FFI objects, functions, containers and ``static_init_block!``
that
+ ``tvm-tirx`` is built on, re-exported as ``tvm_tirx::tvm_ffi``.
diff --git a/tirx/advanced/defining_ir_extensions.html
b/tirx/advanced/defining_ir_extensions.html
index 27cb345efd4..165ae253174 100644
--- a/tirx/advanced/defining_ir_extensions.html
+++ b/tirx/advanced/defining_ir_extensions.html
@@ -668,10 +668,10 @@ the operators that <code class="docutils literal
notranslate"><span class="pre">
The rewrites are:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button
aria-controls="panel-3-UnVzdA==" aria-selected="true" class="sphinx-tabs-tab
group-tab" id="tab-3-UnVzdA==" name="UnVzdA==" role="tab"
tabindex="0">Rust</button><button aria-controls="panel-3-UHl0aG9u"
aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-UHl0aG9u"
name="UHl0aG9u" role="tab" tabindex="-1">Python</button></div><div
aria-labelledby="tab-3-UnVzdA==" class="sphinx-tabs-panel group-tab" id=" [...]
-<span class="w"> </span><span class="n">bindings</span><span
class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span
class="o"><</span><span class="p">(</span><span class="n">Var</span><span
class="p">,</span><span class="w"> </span><span class="n">Var</span><span
class="p">,</span><span class="w"> </span><span class="n">Var</span><span
class="p">)</span><span class="o">></span><span class="p">,</span>
+<span class="w"> </span><span class="n">bindings</span><span
class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span
class="o"><</span><span class="p">(</span><span class="n">Var</span><span
class="p">,</span><span class="w"> </span><span class="n">PrimVar</span><span
class="p">,</span><span class="w"> </span><span class="n">PrimVar</span><span
class="p">)</span><span class="o">></span><span class="p">,</span>
<span class="p">}</span>
<span class="k">impl</span><span class="w"> </span><span
class="n">Lowering</span><span class="w"> </span><span class="p">{</span>
-<span class="w"> </span><span class="k">fn</span><span class="w">
</span><span class="nf">parts</span><span class="p">(</span><span
class="o">&</span><span class="bp">self</span><span class="p">,</span><span
class="w"> </span><span class="n">expr</span><span class="p">:</span><span
class="w"> </span><span class="kp">&</span><span
class="nc">Expr</span><span class="p">)</span><span class="w"> </span><span
class="p">-></span><span class="w"> </span><span class="nb">Result</sp [...]
+<span class="w"> </span><span class="k">fn</span><span class="w">
</span><span class="nf">parts</span><span class="p">(</span><span
class="o">&</span><span class="bp">self</span><span class="p">,</span><span
class="w"> </span><span class="n">expr</span><span class="p">:</span><span
class="w"> </span><span class="kp">&</span><span
class="nc">Expr</span><span class="p">)</span><span class="w"> </span><span
class="p">-></span><span class="w"> </span><span class="nb">Result</sp [...]
<span class="p">}</span>
<span class="cp">#[dispatch(map, (AnyView<'_>,),
Result<UnchangedOr<Any>>)]</span>
<span class="k">impl</span><span class="w"> </span><span
class="n">Lowering</span><span class="w"> </span><span class="p">{</span>
diff --git a/tirx/commit_hash b/tirx/commit_hash
index 6b32cdfbeb5..b8509a02ba4 100644
--- a/tirx/commit_hash
+++ b/tirx/commit_hash
@@ -1 +1 @@
-56762d15d457ea94c5c95a4bc52941cd971ded5e
+d6cd4dbd3397c5e58578a4accf889d7329e83671
diff --git a/tirx/ir_guides/working_with_ir_in_rust.html
b/tirx/ir_guides/working_with_ir_in_rust.html
index bd16b92da3c..83785761ae1 100644
--- a/tirx/ir_guides/working_with_ir_in_rust.html
+++ b/tirx/ir_guides/working_with_ir_in_rust.html
@@ -426,9 +426,9 @@ in the repository.</p>
<a class="reference external"
href="https://github.com/apache/tvm-tirx/tree/main/examples/ir_guides">examples/ir_guides</a>.
When cargo is available, installing the package builds the Rust crate in
<code class="docutils literal notranslate"><span
class="pre">rust/</span></code> into a library; <code class="docutils literal
notranslate"><span class="pre">CMakeLists.txt</span></code> and <code
class="docutils literal notranslate"><span
class="pre">pyproject.toml</span></code> in the
-same directory show how. The crate uses the bindings from this checkout,
-so install TIRx from the same source tree. We install without build isolation
-to build against that installation instead of fetching one from PyPI:</p>
+same directory show how. The crate depends on the <code class="docutils
literal notranslate"><span class="pre">tvm-tirx</span></code> crate of this
+checkout, so install TIRx from the same source tree. We install without build
+isolation to build against that installation instead of fetching one from
PyPI:</p>
<div class="highlight-bash notranslate"><div
class="highlight"><pre><span></span>pip<span class="w"> </span>install<span
class="w"> </span>scikit-build-core
pip<span class="w"> </span>install<span class="w">
</span>--no-build-isolation<span class="w"> </span>-e<span class="w">
</span>examples/ir_guides
</pre></div>
diff --git a/tirx/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.html
b/tirx/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.html
index 8560a686ee1..19e9b544391 100644
--- a/tirx/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.html
+++ b/tirx/reference/cpp/generated/file_tvm_ir_prim_pattern_match.h.html
@@ -477,9 +477,9 @@
<li><p><a class="reference internal"
href="function_namespacetvm_1a7be71ed571f41ce0a36e87446aa04f35.html#exhale-function-namespacetvm-1a7be71ed571f41ce0a36e87446aa04f35"><span
class="std std-ref">Template Function tvm::div(const Pattern<TA>&,
const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a5ca8906ddad2083a761664c49de0213f.html#exhale-function-namespacetvm-1a5ca8906ddad2083a761664c49de0213f"><span
class="std std-ref">Template Function tvm::div(const Pattern<TA>&,
int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a02224802057577e4a98e692b72a47225.html#exhale-function-namespacetvm-1a02224802057577e4a98e692b72a47225"><span
class="std std-ref">Template Function tvm::div(int64_t, const
Pattern<TA>&)</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1a9376cf5684d043ff86fdd43767deaa59.html#exhale-function-namespacetvm-1a9376cf5684d043ff86fdd43767deaa59"><span
class="std std-ref">Template Function tvm::floordiv(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1ad6f2b9d9c6ac80579866e62f53756e25.html#exhale-function-namespacetvm-1ad6f2b9d9c6ac80579866e62f53756e25"><span
class="std std-ref">Template Function tvm::floordiv(int64_t, const
Pattern<TA>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1aba7b9587003dda3fe9f353c80c2f5dfd.html#exhale-function-namespacetvm-1aba7b9587003dda3fe9f353c80c2f5dfd"><span
class="std std-ref">Template Function tvm::floordiv(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1a9376cf5684d043ff86fdd43767deaa59.html#exhale-function-namespacetvm-1a9376cf5684d043ff86fdd43767deaa59"><span
class="std std-ref">Template Function tvm::floordiv(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a66ed8401a553ad5d4f444283cd619e85.html#exhale-function-namespacetvm-1a66ed8401a553ad5d4f444283cd619e85"><span
class="std std-ref">Template Function tvm::floormod(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a6d6a1c629c51224ea66b141ff966b93f.html#exhale-function-namespacetvm-1a6d6a1c629c51224ea66b141ff966b93f"><span
class="std std-ref">Template Function tvm::floormod(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1aaa57296cf5633ae36e8f6c1685db5d63.html#exhale-function-namespacetvm-1aaa57296cf5633ae36e8f6c1685db5d63"><span
class="std std-ref">Template Function tvm::floormod(int64_t, const
Pattern<TA>&)</span></a></p></li>
@@ -510,9 +510,9 @@
<li><p><a class="reference internal"
href="function_namespacetvm_1a3d07a3069da44d3ae5b57d2e4040d4ff.html#exhale-function-namespacetvm-1a3d07a3069da44d3ae5b57d2e4040d4ff"><span
class="std std-ref">Template Function tvm::operator-(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1ad63e0f4007b232f08e7c15c04c170cff.html#exhale-function-namespacetvm-1ad63e0f4007b232f08e7c15c04c170cff"><span
class="std std-ref">Template Function tvm::operator-(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1ae07cb4d386babd74a5e42d143882bfd3.html#exhale-function-namespacetvm-1ae07cb4d386babd74a5e42d143882bfd3"><span
class="std std-ref">Template Function tvm::operator-(int64_t, const
Pattern<TA>&)</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15.html#exhale-function-namespacetvm-1a850a6f663cf645bf1d5de9e46c074c15"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a06c876d86dd675819633003200a04c3a.html#exhale-function-namespacetvm-1a06c876d86dd675819633003200a04c3a"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a0116e9743c4fd5d3ee6b660870e5bf4f.html#exhale-function-namespacetvm-1a0116e9743c4fd5d3ee6b660870e5bf4f"><span
class="std std-ref">Template Function tvm::operator/(int64_t, const
Pattern<TA>&)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15.html#exhale-function-namespacetvm-1a850a6f663cf645bf1d5de9e46c074c15"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1ac559d7393509db4ce67a54d4edfbe8b0.html#exhale-function-namespacetvm-1ac559d7393509db4ce67a54d4edfbe8b0"><span
class="std std-ref">Template Function tvm::operator<(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a7351c7ad62e6febd0cfff024204afd7c.html#exhale-function-namespacetvm-1a7351c7ad62e6febd0cfff024204afd7c"><span
class="std std-ref">Template Function tvm::operator<(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a1eaa18dbddaa07d70c9279e0bcdac05a.html#exhale-function-namespacetvm-1a1eaa18dbddaa07d70c9279e0bcdac05a"><span
class="std std-ref">Template Function tvm::operator<(int64_t, const
Pattern<TA>&)</span></a></p></li>
@@ -536,8 +536,8 @@
<li><p><a class="reference internal"
href="function_namespacetvm_1ab042ef46f754a15ae6c332babcd67907.html#exhale-function-namespacetvm-1ab042ef46f754a15ae6c332babcd67907"><span
class="std std-ref">Template Function tvm::operator||(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1aa99dbf24a4d6e8c09587296bda16ff0d.html#exhale-function-namespacetvm-1aa99dbf24a4d6e8c09587296bda16ff0d"><span
class="std std-ref">Template Function tvm::operator||(int64_t, const
Pattern<TA>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a34d3774087ee1b5cddd400921762235f.html#exhale-function-namespacetvm-1a34d3774087ee1b5cddd400921762235f"><span
class="std std-ref">Template Function tvm::operator~(const
Pattern<TA>&)</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1aafc5e5fa4393becb77c4b6d7da3ace2d.html#exhale-function-namespacetvm-1aafc5e5fa4393becb77c4b6d7da3ace2d"><span
class="std std-ref">Template Function tvm::ramp(const
Pattern<TBase>&, const Pattern<TStride>&, const
Pattern<TLanes>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a98593b4c0d2622859925df160ca32f3d.html#exhale-function-namespacetvm-1a98593b4c0d2622859925df160ca32f3d"><span
class="std std-ref">Template Function tvm::ramp(const
Pattern<TBase>&, int, int)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1aafc5e5fa4393becb77c4b6d7da3ace2d.html#exhale-function-namespacetvm-1aafc5e5fa4393becb77c4b6d7da3ace2d"><span
class="std std-ref">Template Function tvm::ramp(const
Pattern<TBase>&, const Pattern<TStride>&, const
Pattern<TLanes>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a3fa4f9842f6f0d7c651561a15d29f47a.html#exhale-function-namespacetvm-1a3fa4f9842f6f0d7c651561a15d29f47a"><span
class="std std-ref">Template Function tvm::select</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a7e76c8a0d99d28429fd531bdf9f7598e.html#exhale-function-namespacetvm-1a7e76c8a0d99d28429fd531bdf9f7598e"><span
class="std std-ref">Template Function tvm::truncdiv(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a44086a55195e22d4a22d637beb37963a.html#exhale-function-namespacetvm-1a44086a55195e22d4a22d637beb37963a"><span
class="std std-ref">Template Function tvm::truncdiv(int64_t, const
Pattern<TA>&)</span></a></p></li>
diff --git a/tirx/reference/cpp/generated/file_tvm_tirx_op_math.h.html
b/tirx/reference/cpp/generated/file_tvm_tirx_op_math.h.html
index c5f3f7f45c4..54e6935745b 100644
--- a/tirx/reference/cpp/generated/file_tvm_tirx_op_math.h.html
+++ b/tirx/reference/cpp/generated/file_tvm_tirx_op_math.h.html
@@ -408,9 +408,9 @@
<h2>Functions<a class="headerlink" href="#functions" title="Link to this
heading">#</a></h2>
<ul class="simple">
<li><p><a class="reference internal"
href="function_namespacetvm_1_1tirx_1aed615c151b18908d314e2f4fd62ae9f7.html#exhale-function-namespacetvm-1-1tirx-1aed615c151b18908d314e2f4fd62ae9f7"><span
class="std std-ref">Function tvm::tirx::fast_erf_float_expr</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1_1tirx_1a4f5fb501032540c31b8249d4b63160c2.html#exhale-function-namespacetvm-1-1tirx-1a4f5fb501032540c31b8249d4b63160c2"><span
class="std std-ref">Function tvm::tirx::logaddexp(const PrimExpr&, int,
Location)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1_1tirx_1ac66dc986673e79d2d9f6bbc4a7dc2d6f.html#exhale-function-namespacetvm-1-1tirx-1ac66dc986673e79d2d9f6bbc4a7dc2d6f"><span
class="std std-ref">Function tvm::tirx::logaddexp(int, const PrimExpr&,
Location)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1_1tirx_1a232ca4bffb36db0d70b967ce516639cd.html#exhale-function-namespacetvm-1-1tirx-1a232ca4bffb36db0d70b967ce516639cd"><span
class="std std-ref">Function tvm::tirx::logaddexp(PrimExpr, PrimExpr,
Location)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1_1tirx_1a4f5fb501032540c31b8249d4b63160c2.html#exhale-function-namespacetvm-1-1tirx-1a4f5fb501032540c31b8249d4b63160c2"><span
class="std std-ref">Function tvm::tirx::logaddexp(const PrimExpr&, int,
Location)</span></a></p></li>
</ul>
</section>
</section>
diff --git a/tirx/reference/cpp/generated/namespace_tvm.html
b/tirx/reference/cpp/generated/namespace_tvm.html
index 429f94de2c5..700c33ce5fd 100644
--- a/tirx/reference/cpp/generated/namespace_tvm.html
+++ b/tirx/reference/cpp/generated/namespace_tvm.html
@@ -709,10 +709,10 @@
<li><p><a class="reference internal"
href="function_namespacetvm_1af7b8be795dd2e9889636e2383c554c67.html#exhale-function-namespacetvm-1af7b8be795dd2e9889636e2383c554c67"><span
class="std std-ref">Template Function tvm::operator!=(int64_t, const
Pattern<TA>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a56fac2bf30a61d8dd727f7b1956dd0db.html#exhale-function-namespacetvm-1a56fac2bf30a61d8dd727f7b1956dd0db"><span
class="std std-ref">Function tvm::operator!=(const PrimType&, const
PrimType&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a03983cf66713724c138f9697bb8e0e97.html#exhale-function-namespacetvm-1a03983cf66713724c138f9697bb8e0e97"><span
class="std std-ref">Function tvm::operator!=(PrimExpr,
PrimExpr)</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1ab25738e50b37cd07b2d171ca74ba9321.html#exhale-function-namespacetvm-1ab25738e50b37cd07b2d171ca74ba9321"><span
class="std std-ref">Template Function tvm::operator%(const PrimExpr&,
const TB&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1afcdbd1fab3bdd58534c7fa93f3443d91.html#exhale-function-namespacetvm-1afcdbd1fab3bdd58534c7fa93f3443d91"><span
class="std std-ref">Template Function tvm::operator%(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a15550334ba622451f41e2f04d386c1a2.html#exhale-function-namespacetvm-1a15550334ba622451f41e2f04d386c1a2"><span
class="std std-ref">Template Function tvm::operator%(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1ab09a39be17461ad9a4f0ec0b3cb963d9.html#exhale-function-namespacetvm-1ab09a39be17461ad9a4f0ec0b3cb963d9"><span
class="std std-ref">Template Function tvm::operator%(int64_t, const
Pattern<TA>&)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1ab25738e50b37cd07b2d171ca74ba9321.html#exhale-function-namespacetvm-1ab25738e50b37cd07b2d171ca74ba9321"><span
class="std std-ref">Template Function tvm::operator%(const PrimExpr&,
const TB&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a253689828377e1e885a14b913f37a1c8.html#exhale-function-namespacetvm-1a253689828377e1e885a14b913f37a1c8"><span
class="std std-ref">Template Function tvm::operator&(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a92e2cae35b1e48f130b76f42c6ee3106.html#exhale-function-namespacetvm-1a92e2cae35b1e48f130b76f42c6ee3106"><span
class="std std-ref">Function tvm::operator&(PrimExpr,
PrimExpr)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a4ff6afc90cabb820cf2f2fda6daefd92.html#exhale-function-namespacetvm-1a4ff6afc90cabb820cf2f2fda6daefd92"><span
class="std std-ref">Function tvm::operator&(const PrimExpr&,
int)</span></a></p></li>
@@ -754,9 +754,9 @@
<li><p><a class="reference internal"
href="function_namespacetvm_1af7c46ff33a2727f48b10d7d563f4a746.html#exhale-function-namespacetvm-1af7c46ff33a2727f48b10d7d563f4a746"><span
class="std std-ref">Function tvm::operator-(const PrimExpr&,
int)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a028ba217f99b6cb1592a6a56b2bc9ee5.html#exhale-function-namespacetvm-1a028ba217f99b6cb1592a6a56b2bc9ee5"><span
class="std std-ref">Function tvm::operator-(const PrimExpr&,
double)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a164d454c519fecaa5611c86b65469acc.html#exhale-function-namespacetvm-1a164d454c519fecaa5611c86b65469acc"><span
class="std std-ref">Function tvm::operator-=</span></a></p></li>
-<li><p><a class="reference internal"
href="function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15.html#exhale-function-namespacetvm-1a850a6f663cf645bf1d5de9e46c074c15"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a06c876d86dd675819633003200a04c3a.html#exhale-function-namespacetvm-1a06c876d86dd675819633003200a04c3a"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, const Pattern<TB>&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a0116e9743c4fd5d3ee6b660870e5bf4f.html#exhale-function-namespacetvm-1a0116e9743c4fd5d3ee6b660870e5bf4f"><span
class="std std-ref">Template Function tvm::operator/(int64_t, const
Pattern<TA>&)</span></a></p></li>
+<li><p><a class="reference internal"
href="function_namespacetvm_1a850a6f663cf645bf1d5de9e46c074c15.html#exhale-function-namespacetvm-1a850a6f663cf645bf1d5de9e46c074c15"><span
class="std std-ref">Template Function tvm::operator/(const
Pattern<TA>&, int64_t)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a18256ba1213ce5ff3cf8037a314354b7.html#exhale-function-namespacetvm-1a18256ba1213ce5ff3cf8037a314354b7"><span
class="std std-ref">Function tvm::operator/(PrimExpr,
PrimExpr)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a136427374941fbf8e50f53b1cab39e38.html#exhale-function-namespacetvm-1a136427374941fbf8e50f53b1cab39e38"><span
class="std std-ref">Template Function tvm::operator/(const PrimExpr&,
const TB&)</span></a></p></li>
<li><p><a class="reference internal"
href="function_namespacetvm_1a51dc569142bf8ce8ea55f73029d3807d.html#exhale-function-namespacetvm-1a51dc569142bf8ce8ea55f73029d3807d"><span
class="std std-ref">Template Function tvm::operator/=</span></a></p></li>
diff --git a/tirx/reference/python/generated/tvm_tirx.tirx.tile.Operand.html
b/tirx/reference/python/generated/tvm_tirx.tirx.tile.Operand.html
index dc2bee646ff..7b39ac576af 100644
--- a/tirx/reference/python/generated/tvm_tirx.tirx.tile.Operand.html
+++ b/tirx/reference/python/generated/tvm_tirx.tirx.tile.Operand.html
@@ -430,7 +430,7 @@
<h1>tvm_tirx.tirx.tile.Operand<a class="headerlink"
href="#tvm-tirx-tirx-tile-operand" title="Link to this heading">#</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="tvm_tirx.tirx.tile.Operand">
-<span class="property"><span class="k"><span
class="pre">class</span></span><span class="w"> </span></span><span
class="sig-prename descclassname"><span
class="pre">tvm_tirx.tirx.tile.</span></span><span class="sig-name
descname"><span class="pre">Operand</span></span><span
class="sig-paren">(</span><em class="sig-param"><span class="n"><span
class="pre">name</span></span><span class="p"><span
class="pre">:</span></span><span class="w"> </span><span class="n"><span
class="pre">str</span> [...]
+<span class="property"><span class="k"><span
class="pre">class</span></span><span class="w"> </span></span><span
class="sig-prename descclassname"><span
class="pre">tvm_tirx.tirx.tile.</span></span><span class="sig-name
descname"><span class="pre">Operand</span></span><span
class="sig-paren">(</span><em class="sig-param"><span class="n"><span
class="pre">name</span></span><span class="p"><span
class="pre">:</span></span><span class="w"> </span><span class="n"><span
class="pre">str</span> [...]
<dd><p>Bases: <code class="xref py py-class docutils literal
notranslate"><span class="pre">object</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
diff --git a/tirx/reference/rust/generated/src/tvm_tirx/ir/op.rs.html
b/tirx/reference/rust/generated/src/tvm_tirx/ir/op.rs.html
index 8b7158f0f04..4a478f08575 100644
--- a/tirx/reference/rust/generated/src/tvm_tirx/ir/op.rs.html
+++ b/tirx/reference/rust/generated/src/tvm_tirx/ir/op.rs.html
@@ -24,7 +24,7 @@
<a href=#24 id=24 data-nosnippet>24</a></span><span class="comment">//
tvm-ffi-stubgen(missing-docs): allow
<a href=#25 id=25 data-nosnippet>25</a>// `ir.Op` has three unreflected
members, so its complete layout is hand-written below.
<a href=#26 id=26 data-nosnippet>26</a>// tvm-ffi-stubgen(ty-map): ir.Op ->
crate::ir::op::Op
-<a href=#27 id=27 data-nosnippet>27</a>// Names the hand-written `Op` binding
uses: the import section keeps them even when no
+<a href=#27 id=27 data-nosnippet>27</a>// Names the hand-written `Op`
definition uses: the import section keeps them even when no
<a href=#28 id=28 data-nosnippet>28</a>// generated block does.
<a href=#29 id=29 data-nosnippet>29</a>// tvm-ffi-stubgen(import-object):
std::ops::Deref
<a href=#30 id=30 data-nosnippet>30</a>// tvm-ffi-stubgen(import-object):
tvm_ffi::Any
diff --git a/tirx/reference/rust/generated/src/tvm_tirx/lib.rs.html
b/tirx/reference/rust/generated/src/tvm_tirx/lib.rs.html
index b9cc0d49ab2..26ecdb844a1 100644
--- a/tirx/reference/rust/generated/src/tvm_tirx/lib.rs.html
+++ b/tirx/reference/rust/generated/src/tvm_tirx/lib.rs.html
@@ -33,194 +33,195 @@
<a href=#33 id=33 data-nosnippet>33</a>//! - [`codegen`]: compiling IR modules
into runtime modules.
<a href=#34 id=34 data-nosnippet>34</a>//! - [`script`]: printing IR objects
as TVMScript.
<a href=#35 id=35 data-nosnippet>35</a>//!
-<a href=#36 id=36 data-nosnippet>36</a>//! # Using the bindings
+<a href=#36 id=36 data-nosnippet>36</a>//! # Using the crate
<a href=#37 id=37 data-nosnippet>37</a>//!
<a href=#38 id=38 data-nosnippet>38</a>//! The crate links
`libtvm_tirx_compiler`, which the build script finds through
<a href=#39 id=39 data-nosnippet>39</a>//! `tvm-tirx-config --libdir`;
`tvm-tirx-config` and `tvm-ffi-config` must be on `PATH` when the
-<a href=#40 id=40 data-nosnippet>40</a>//! crate is built. Native functions
have Rust wrappers, such as [`target::Target::new`] for
-<a href=#41 id=41 data-nosnippet>41</a>//! `target.Target`, and any of them
can be called through [`tvm_ffi::Function::get_global`]. A
-<a href=#42 id=42 data-nosnippet>42</a>//! program that uses only `tvm_ffi`,
without calling a wrapper, must link the library itself
-<a href=#43 id=43 data-nosnippet>43</a>//! (`tvm-tirx-config --libs compiler`).
-<a href=#44 id=44 data-nosnippet>44</a>//!
-<a href=#45 id=45 data-nosnippet>45</a>//! ```
-<a href=#46 id=46 data-nosnippet>46</a>//! use tvm_tirx::target::Target;
-<a href=#47 id=47 data-nosnippet>47</a>//! use tvm_tirx::tvm_ffi::{Function,
String};
-<a href=#48 id=48 data-nosnippet>48</a>//!
-<a href=#49 id=49 data-nosnippet>49</a>//! let target = Target::new("llvm")?;
-<a href=#50 id=50 data-nosnippet>50</a>//! assert_eq!(target.kind()?.name()?,
"llvm");
-<a href=#51 id=51 data-nosnippet>51</a>//!
-<a href=#52 id=52 data-nosnippet>52</a>//! let same =
Function::get_global("target.Target")?.call_tuple((String::from("llvm"),))?;
-<a href=#53 id=53 data-nosnippet>53</a>//!
assert_eq!(Target::try_from(same)?.kind()?.name()?, "llvm");
-<a href=#54 id=54 data-nosnippet>54</a>//! # Ok::<(),
tvm_tirx::tvm_ffi::Error>(())
-<a href=#55 id=55 data-nosnippet>55</a>//! ```
-<a href=#56 id=56 data-nosnippet>56</a>//!
-<a href=#57 id=57 data-nosnippet>57</a>//! A handle such as [`ir::Expr`] is a
reference-counted pointer to its object, [`ir::ExprObj`], so
-<a href=#58 id=58 data-nosnippet>58</a>//! cloning it does not copy the IR. A
constructor `new` checks its arguments and fills in defaults,
-<a href=#59 id=59 data-nosnippet>59</a>//! and returns a `Result` when a check
can fail; `from_fields` stores the fields as given.
-<a href=#60 id=60 data-nosnippet>60</a>//!
-<a href=#61 id=61 data-nosnippet>61</a>//! # Defining operators and types
-<a href=#62 id=62 data-nosnippet>62</a>//!
-<a href=#63 id=63 data-nosnippet>63</a>//! Operators and types are defined in
a [`tvm_ffi::static_init_block!`], which runs when the
-<a href=#64 id=64 data-nosnippet>64</a>//! program or library loads: an
operator by an [`ir::OpDef`] chain, a type by
-<a href=#65 id=65 data-nosnippet>65</a>//! [`tvm_ffi::rs_object`] and
[`ir::register_type`].
-<a href=#66 id=66 data-nosnippet>66</a>//!
-<a href=#67 id=67 data-nosnippet>67</a>//! ```
-<a href=#68 id=68 data-nosnippet>68</a>//! use
tvm_tirx::ir::op_attr::CALL_EFFECT_KIND;
-<a href=#69 id=69 data-nosnippet>69</a>//! use tvm_tirx::ir::sig::{self,
IntExpr};
-<a href=#70 id=70 data-nosnippet>70</a>//! use tvm_tirx::ir::{register_type,
CallEffectKind, CallObj, Op, OpDef, Type};
-<a href=#71 id=71 data-nosnippet>71</a>//! use tvm_tirx::tvm_ffi::{self,
Result};
-<a href=#72 id=72 data-nosnippet>72</a>//! # use tvm_tirx::ir::TypeObj;
-<a href=#73 id=73 data-nosnippet>73</a>//! # use
tvm_tirx::tvm_ffi::{rs_object, ObjectRefCore};
-<a href=#74 id=74 data-nosnippet>74</a>//! # #[rs_object("my_ext.PairType",
final, immutable)]
-<a href=#75 id=75 data-nosnippet>75</a>//! # pub struct PairTypeObj { base_:
TypeObj, pub first: Type, pub second: Type }
-<a href=#76 id=76 data-nosnippet>76</a>//! # #[derive(Clone,
tvm_ffi::derive::ObjectRef)]
-<a href=#77 id=77 data-nosnippet>77</a>//! # #[object_ref(parent = Type)]
-<a href=#78 id=78 data-nosnippet>78</a>//! # pub struct PairType {
-<a href=#79 id=79 data-nosnippet>79</a>//! # data_:
tvm_ffi::ObjectArc<PairTypeObj>,
-<a href=#80 id=80 data-nosnippet>80</a>//! # }
-<a href=#81 id=81 data-nosnippet>81</a>//!
-<a href=#82 id=82 data-nosnippet>82</a>//! fn index_type(call: &CallObj)
-> Result<Type> {
-<a href=#83 id=83 data-nosnippet>83</a>//! Ok(call.args.get(0)?.ty.clone())
-<a href=#84 id=84 data-nosnippet>84</a>//! }
-<a href=#85 id=85 data-nosnippet>85</a>//!
-<a href=#86 id=86 data-nosnippet>86</a>//! tvm_ffi::static_init_block! {
-<a href=#87 id=87 data-nosnippet>87</a>//! OpDef::new("my_ext.clamp",
"Clamp an index to the range `[0, bound)`.")
-<a href=#88 id=88 data-nosnippet>88</a>//! .signature((
-<a href=#89 id=89 data-nosnippet>89</a>//!
sig::arg::<IntExpr>("index", "The index."),
-<a href=#90 id=90 data-nosnippet>90</a>//!
sig::arg::<IntExpr>("bound", "The exclusive upper bound."),
-<a href=#91 id=91 data-nosnippet>91</a>//! ))
-<a href=#92 id=92 data-nosnippet>92</a>//! .set_infer_type(index_type)
-<a href=#93 id=93 data-nosnippet>93</a>//! .set_attr(CALL_EFFECT_KIND,
CallEffectKind::Pure);
-<a href=#94 id=94 data-nosnippet>94</a>//!
register_type::<PairType>()?;
-<a href=#95 id=95 data-nosnippet>95</a>//! }
-<a href=#96 id=96 data-nosnippet>96</a>//!
-<a href=#97 id=97 data-nosnippet>97</a>//! let clamp =
Op::get("my_ext.clamp")?;
-<a href=#98 id=98 data-nosnippet>98</a>//! # Ok::<(), tvm_ffi::Error>(())
-<a href=#99 id=99 data-nosnippet>99</a>//! ```
-<a href=#100 id=100 data-nosnippet>100</a>//!
-<a href=#101 id=101 data-nosnippet>101</a>//! A type extends [`ir::TypeObj`];
its fields are reflected, so Python and the TVMScript printer
-<a href=#102 id=102 data-nosnippet>102</a>//! see them. The generated code
names `tvm_ffi`, which `use tvm_tirx::tvm_ffi` brings into scope.
-<a href=#103 id=103 data-nosnippet>103</a>//!
-<a href=#104 id=104 data-nosnippet>104</a>//! ```
-<a href=#105 id=105 data-nosnippet>105</a>//! use tvm_tirx::ir::{PrimType,
Type, TypeObj, UNKNOWN_LOC};
-<a href=#106 id=106 data-nosnippet>106</a>//! use tvm_tirx::tvm_ffi::{self,
rs_object, IntoObjectRef, ObjectRefCore};
-<a href=#107 id=107 data-nosnippet>107</a>//!
-<a href=#108 id=108 data-nosnippet>108</a>//! #[rs_object("my_ext.PairType",
final, immutable)]
-<a href=#109 id=109 data-nosnippet>109</a>//! pub struct PairTypeObj {
-<a href=#110 id=110 data-nosnippet>110</a>//! base_: TypeObj,
-<a href=#111 id=111 data-nosnippet>111</a>//! pub first: Type,
-<a href=#112 id=112 data-nosnippet>112</a>//! pub second: Type,
-<a href=#113 id=113 data-nosnippet>113</a>//! #[reflect(seq_hash_ignore)]
-<a href=#114 id=114 data-nosnippet>114</a>//! pub note: tvm_ffi::String,
-<a href=#115 id=115 data-nosnippet>115</a>//! }
-<a href=#116 id=116 data-nosnippet>116</a>//!
-<a href=#117 id=117 data-nosnippet>117</a>//! #[derive(Clone,
tvm_ffi::derive::ObjectRef)]
-<a href=#118 id=118 data-nosnippet>118</a>//! #[object_ref(parent = Type)]
-<a href=#119 id=119 data-nosnippet>119</a>//! pub struct PairType {
-<a href=#120 id=120 data-nosnippet>120</a>//! data_:
tvm_ffi::ObjectArc<PairTypeObj>,
-<a href=#121 id=121 data-nosnippet>121</a>//! }
-<a href=#122 id=122 data-nosnippet>122</a>//!
-<a href=#123 id=123 data-nosnippet>123</a>//! impl PairType {
-<a href=#124 id=124 data-nosnippet>124</a>//! pub fn new(first: impl
IntoObjectRef<Type>, second: impl IntoObjectRef<Type>) -> Self {
-<a href=#125 id=125 data-nosnippet>125</a>//! let (first, second) =
(first.into_owned_object_ref(), second.into_owned_object_ref());
-<a href=#126 id=126 data-nosnippet>126</a>//!
Self::from_object(PairTypeObj::new(TypeObj::new(UNKNOWN_LOC.into()), first,
second, ""))
-<a href=#127 id=127 data-nosnippet>127</a>//! }
-<a href=#128 id=128 data-nosnippet>128</a>//! }
-<a href=#129 id=129 data-nosnippet>129</a>//!
-<a href=#130 id=130 data-nosnippet>130</a>//! fn main() {
-<a href=#131 id=131 data-nosnippet>131</a>//! let pair =
PairType::new(PrimType::int(32), PrimType::float(32));
-<a href=#132 id=132 data-nosnippet>132</a>//! let ty: Type = pair.into();
-<a href=#133 id=133 data-nosnippet>133</a>//!
assert!(ty.downcast_ref::<PairTypeObj>().is_some());
-<a href=#134 id=134 data-nosnippet>134</a>//! }
-<a href=#135 id=135 data-nosnippet>135</a>//! ```
-<a href=#136 id=136 data-nosnippet>136</a>//!
-<a href=#137 id=137 data-nosnippet>137</a>//! # The library Python loads
-<a href=#138 id=138 data-nosnippet>138</a>//!
-<a href=#139 id=139 data-nosnippet>139</a>//! The crate is also built as
`libtvm_tirx_rust`, which `import tvm_tirx` loads, so Python uses the
-<a href=#140 id=140 data-nosnippet>140</a>//! operators and types the crate
defines as it uses the native ones. A `cdylib` of operators of its
-<a href=#141 id=141 data-nosnippet>141</a>//! own, such as
`examples/define_ir.rs`, registers them when Python loads it; a crate it
depends on
-<a href=#142 id=142 data-nosnippet>142</a>//! but never names is not linked
in, so name it, as `use my_ops as _;` does.
-<a href=#143 id=143 data-nosnippet>143</a>//!
-<a href=#144 id=144 data-nosnippet>144</a>//! # Generated code
-<a href=#145 id=145 data-nosnippet>145</a>//!
-<a href=#146 id=146 data-nosnippet>146</a>//! The code between `//
tvm-ffi-stubgen(begin)` and `// tvm-ffi-stubgen(end)` is generated, and
-<a href=#147 id=147 data-nosnippet>147</a>//! the rest is hand-written.
Regenerate it with the `tvm-ffi-stubgen` of `3rdparty/tvm-ffi` after
-<a href=#148 id=148 data-nosnippet>148</a>//! rebuilding
`libtvm_tirx_compiler` (`--check` only reports stale blocks):
-<a href=#149 id=149 data-nosnippet>149</a>//!
-<a href=#150 id=150 data-nosnippet>150</a>//! ```bash
-<a href=#151 id=151 data-nosnippet>151</a>//! tvm-ffi-stubgen rust/src
--target rust --dlls build/lib/libtvm_tirx_compiler.so
-<a href=#152 id=152 data-nosnippet>152</a>//! ```
-<a href=#153 id=153 data-nosnippet>153</a>//!
-<a href=#154 id=154 data-nosnippet>154</a>//! # Tests
-<a href=#155 id=155 data-nosnippet>155</a>//!
-<a href=#156 id=156 data-nosnippet>156</a>//! Build `libtvm_tirx_compiler`
first. The tests of `src/<path>.rs` are in `tests/<path>.rs`:
-<a href=#157 id=157 data-nosnippet>157</a>//!
-<a href=#158 id=158 data-nosnippet>158</a>//! ```bash
-<a href=#159 id=159 data-nosnippet>159</a>//! uv run --no-sync cargo test
--manifest-path rust/Cargo.toml
-<a href=#160 id=160 data-nosnippet>160</a>//! ```
-<a href=#161 id=161 data-nosnippet>161</a>
-<a href=#162 id=162 data-nosnippet>162</a></span><span
class="attr">#![warn(missing_docs)]
-<a href=#163 id=163 data-nosnippet>163</a>
-<a href=#164 id=164 data-nosnippet>164</a></span><span class="kw">pub mod
</span>backend;
-<a href=#165 id=165 data-nosnippet>165</a><span class="kw">pub mod
</span>codegen;
-<a href=#166 id=166 data-nosnippet>166</a><span class="kw">pub mod </span>ir;
-<a href=#167 id=167 data-nosnippet>167</a><span class="kw">mod </span>r#macro;
-<a href=#168 id=168 data-nosnippet>168</a><span class="kw">pub mod
</span>runtime;
-<a href=#169 id=169 data-nosnippet>169</a><span class="kw">pub mod
</span>script;
-<a href=#170 id=170 data-nosnippet>170</a><span class="kw">pub mod </span>sym;
-<a href=#171 id=171 data-nosnippet>171</a><span class="kw">pub mod
</span>target;
-<a href=#172 id=172 data-nosnippet>172</a><span class="kw">pub mod </span>tirx;
-<a href=#173 id=173 data-nosnippet>173</a>
-<a href=#174 id=174 data-nosnippet>174</a><span class="kw">pub use
</span>tvm_ffi;
-<a href=#175 id=175 data-nosnippet>175</a>
-<a href=#176 id=176 data-nosnippet>176</a><span class="comment">// The errors
of the static init blocks of every library built on the crate, which
-<a href=#177 id=177 data-nosnippet>177</a>// `import tvm_tirx` raises for
`libtvm_tirx_rust`: `__tvm_ffi_tirx_register_ir`, the TVM FFI
-<a href=#178 id=178 data-nosnippet>178</a>// function `tirx_register_ir` of
the library as `tvm_ffi.load_module` loads it. The module keeps
-<a href=#179 id=179 data-nosnippet>179</a>// the symbol, which `#[no_mangle]`
exports from wherever it is, out of the crate's documentation.
-<a href=#180 id=180 data-nosnippet>180</a></span><span
class="attr">#[doc(hidden)]
-<a href=#181 id=181 data-nosnippet>181</a></span><span class="kw">pub mod
</span>exports {
-<a href=#182 id=182 data-nosnippet>182</a> <span
class="macro">tvm_ffi::tvm_ffi_dll_export_typed_func!</span>(tirx_register_ir,
tvm_ffi::run_static_init_blocks);
-<a href=#183 id=183 data-nosnippet>183</a>}
-<a href=#184 id=184 data-nosnippet>184</a>
-<a href=#185 id=185 data-nosnippet>185</a><span class="comment">// The crate
reaches `libtvm_tirx_compiler` through the FFI registry, so a linker that drops
-<a href=#186 id=186 data-nosnippet>186</a>// unreferenced libraries
(`--as-needed`) would drop the library the build script links, and its
-<a href=#187 id=187 data-nosnippet>187</a>// registrations would never run.
Each TIRx shared library exports a `<library>_link_anchor`
-<a href=#188 id=188 data-nosnippet>188</a>// function that does nothing,
defined in the `link_anchor.cc` of its sources (for the compiler,
-<a href=#189 id=189 data-nosnippet>189</a>// `src/ir/link_anchor.cc`) and
declared by whoever references it. The static below holds the
-<a href=#190 id=190 data-nosnippet>190</a>// anchor's address: a relocation
against the symbol in the object of this module, which costs
-<a href=#191 id=191 data-nosnippet>191</a>// nothing at run time and is what
makes the linker keep the library.
-<a href=#192 id=192 data-nosnippet>192</a>//
-<a href=#193 id=193 data-nosnippet>193</a>// A program pulls in only the
objects of the crate it references, so the static keeps the
-<a href=#194 id=194 data-nosnippet>194</a>// library only when the object of
this module is pulled. It is, because the objects of the crate
-<a href=#195 id=195 data-nosnippet>195</a>// reference one another densely and
`sym::analyzer` references `ExitOnDrop::new` below. The test
-<a href=#196 id=196 data-nosnippet>196</a>// binaries rely on the same
mechanism and fail at their first registry lookup if that changes. A
-<a href=#197 id=197 data-nosnippet>197</a>// program that uses the registry
only through `tvm_ffi` itself, without calling a wrapper, must
-<a href=#198 id=198 data-nosnippet>198</a>// keep the library by other means,
such as the linker arguments `tvm-tirx-config --libs compiler`
-<a href=#199 id=199 data-nosnippet>199</a>// prints.
-<a href=#200 id=200 data-nosnippet>200</a></span><span class="kw">extern
</span><span class="string">"C" </span>{
-<a href=#201 id=201 data-nosnippet>201</a> <span class="kw">fn
</span>tvm_tirx_compiler_link_anchor() -> i32;
-<a href=#202 id=202 data-nosnippet>202</a>}
-<a href=#203 id=203 data-nosnippet>203</a>
-<a href=#204 id=204 data-nosnippet>204</a><span class="attr">#[used]
-<a href=#205 id=205 data-nosnippet>205</a></span><span class="kw">static
</span>TVM_TIRX_COMPILER_LINK_ANCHOR: <span class="kw">unsafe extern
</span><span class="string">"C" </span><span class="kw">fn</span>() -> i32 =
tvm_tirx_compiler_link_anchor;
-<a href=#206 id=206 data-nosnippet>206</a>
-<a href=#207 id=207 data-nosnippet>207</a><span class="doccomment">/// Makes a
scope guard neither `Send` nor `Sync`: the native scopes keep their state per
thread,
-<a href=#208 id=208 data-nosnippet>208</a>/// or in an object that is not
synchronized, so a scope must end on the thread that opened it.
-<a href=#209 id=209 data-nosnippet>209</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type
</span>ThreadBound = std::marker::PhantomData<<span class="kw-2">*const
</span>()>;
-<a href=#210 id=210 data-nosnippet>210</a>
-<a href=#211 id=211 data-nosnippet>211</a><span class="doccomment">/// Calls a
native exit function when dropped: the end of a scope a native enter function
opened.
-<a href=#212 id=212 data-nosnippet>212</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct
</span>ExitOnDrop(tvm_ffi::Function, ThreadBound);
-<a href=#213 id=213 data-nosnippet>213</a>
-<a href=#214 id=214 data-nosnippet>214</a><span class="kw">impl
</span>ExitOnDrop {
-<a href=#215 id=215 data-nosnippet>215</a> <span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn
</span>new(exit: tvm_ffi::Function) -> <span class="self">Self </span>{
-<a href=#216 id=216 data-nosnippet>216</a> <span
class="self">Self</span>(exit, ThreadBound::default())
-<a href=#217 id=217 data-nosnippet>217</a> }
-<a href=#218 id=218 data-nosnippet>218</a>}
-<a href=#219 id=219 data-nosnippet>219</a>
-<a href=#220 id=220 data-nosnippet>220</a><span class="kw">impl </span>Drop
<span class="kw">for </span>ExitOnDrop {
-<a href=#221 id=221 data-nosnippet>221</a> <span class="kw">fn
</span>drop(<span class="kw-2">&mut </span><span class="self">self</span>) {
-<a href=#222 id=222 data-nosnippet>222</a> <span class="comment">// A
destructor cannot report the error, and the native exit functions do not fail.
-<a href=#223 id=223 data-nosnippet>223</a> </span><span class="kw">let
_ </span>= <span class="self">self</span>.<span
class="number">0</span>.call_packed(<span class="kw-2">&</span>[]);
-<a href=#224 id=224 data-nosnippet>224</a> }
-<a href=#225 id=225 data-nosnippet>225</a>}
+<a href=#40 id=40 data-nosnippet>40</a>//! crate is built. Many of its APIs
call global functions of that library, as
+<a href=#41 id=41 data-nosnippet>41</a>//! [`target::Target::new`] calls
`target.Target`, and any global function can also be called
+<a href=#42 id=42 data-nosnippet>42</a>//! through
[`tvm_ffi::Function::get_global`]. A program that calls them only through
`tvm_ffi`,
+<a href=#43 id=43 data-nosnippet>43</a>//! without an API of this crate, must
link the library itself
+<a href=#44 id=44 data-nosnippet>44</a>//! (`tvm-tirx-config --libs compiler`).
+<a href=#45 id=45 data-nosnippet>45</a>//!
+<a href=#46 id=46 data-nosnippet>46</a>//! ```
+<a href=#47 id=47 data-nosnippet>47</a>//! use tvm_tirx::target::Target;
+<a href=#48 id=48 data-nosnippet>48</a>//! use tvm_tirx::tvm_ffi::{Function,
String};
+<a href=#49 id=49 data-nosnippet>49</a>//!
+<a href=#50 id=50 data-nosnippet>50</a>//! let target = Target::new("llvm")?;
+<a href=#51 id=51 data-nosnippet>51</a>//! assert_eq!(target.kind()?.name()?,
"llvm");
+<a href=#52 id=52 data-nosnippet>52</a>//!
+<a href=#53 id=53 data-nosnippet>53</a>//! let same =
Function::get_global("target.Target")?.call_tuple((String::from("llvm"),))?;
+<a href=#54 id=54 data-nosnippet>54</a>//!
assert_eq!(Target::try_from(same)?.kind()?.name()?, "llvm");
+<a href=#55 id=55 data-nosnippet>55</a>//! # Ok::<(),
tvm_tirx::tvm_ffi::Error>(())
+<a href=#56 id=56 data-nosnippet>56</a>//! ```
+<a href=#57 id=57 data-nosnippet>57</a>//!
+<a href=#58 id=58 data-nosnippet>58</a>//! A handle such as [`ir::Expr`] is a
reference-counted pointer to its object, [`ir::ExprObj`], so
+<a href=#59 id=59 data-nosnippet>59</a>//! cloning it does not copy the IR. A
constructor `new` checks its arguments and fills in defaults,
+<a href=#60 id=60 data-nosnippet>60</a>//! and returns a `Result` when a check
can fail; `from_fields` stores the fields as given.
+<a href=#61 id=61 data-nosnippet>61</a>//!
+<a href=#62 id=62 data-nosnippet>62</a>//! # Defining operators and types
+<a href=#63 id=63 data-nosnippet>63</a>//!
+<a href=#64 id=64 data-nosnippet>64</a>//! Operators and types are defined in
a [`tvm_ffi::static_init_block!`], which runs when the
+<a href=#65 id=65 data-nosnippet>65</a>//! program or library loads: an
operator by an [`ir::OpDef`] chain, a type by
+<a href=#66 id=66 data-nosnippet>66</a>//! [`tvm_ffi::rs_object`] and
[`ir::register_type`].
+<a href=#67 id=67 data-nosnippet>67</a>//!
+<a href=#68 id=68 data-nosnippet>68</a>//! ```
+<a href=#69 id=69 data-nosnippet>69</a>//! use
tvm_tirx::ir::op_attr::CALL_EFFECT_KIND;
+<a href=#70 id=70 data-nosnippet>70</a>//! use tvm_tirx::ir::sig::{self,
IntExpr};
+<a href=#71 id=71 data-nosnippet>71</a>//! use tvm_tirx::ir::{register_type,
CallEffectKind, CallObj, Op, OpDef, Type};
+<a href=#72 id=72 data-nosnippet>72</a>//! use tvm_tirx::tvm_ffi::{self,
Result};
+<a href=#73 id=73 data-nosnippet>73</a>//! # use tvm_tirx::ir::TypeObj;
+<a href=#74 id=74 data-nosnippet>74</a>//! # use
tvm_tirx::tvm_ffi::{rs_object, ObjectRefCore};
+<a href=#75 id=75 data-nosnippet>75</a>//! # #[rs_object("my_ext.PairType",
final, immutable)]
+<a href=#76 id=76 data-nosnippet>76</a>//! # pub struct PairTypeObj { base_:
TypeObj, pub first: Type, pub second: Type }
+<a href=#77 id=77 data-nosnippet>77</a>//! # #[derive(Clone,
tvm_ffi::derive::ObjectRef)]
+<a href=#78 id=78 data-nosnippet>78</a>//! # #[object_ref(parent = Type)]
+<a href=#79 id=79 data-nosnippet>79</a>//! # pub struct PairType {
+<a href=#80 id=80 data-nosnippet>80</a>//! # data_:
tvm_ffi::ObjectArc<PairTypeObj>,
+<a href=#81 id=81 data-nosnippet>81</a>//! # }
+<a href=#82 id=82 data-nosnippet>82</a>//!
+<a href=#83 id=83 data-nosnippet>83</a>//! fn index_type(call: &CallObj)
-> Result<Type> {
+<a href=#84 id=84 data-nosnippet>84</a>//! Ok(call.args.get(0)?.ty.clone())
+<a href=#85 id=85 data-nosnippet>85</a>//! }
+<a href=#86 id=86 data-nosnippet>86</a>//!
+<a href=#87 id=87 data-nosnippet>87</a>//! tvm_ffi::static_init_block! {
+<a href=#88 id=88 data-nosnippet>88</a>//! OpDef::new("my_ext.clamp",
"Clamp an index to the range `[0, bound)`.")
+<a href=#89 id=89 data-nosnippet>89</a>//! .signature((
+<a href=#90 id=90 data-nosnippet>90</a>//!
sig::arg::<IntExpr>("index", "The index."),
+<a href=#91 id=91 data-nosnippet>91</a>//!
sig::arg::<IntExpr>("bound", "The exclusive upper bound."),
+<a href=#92 id=92 data-nosnippet>92</a>//! ))
+<a href=#93 id=93 data-nosnippet>93</a>//! .set_infer_type(index_type)
+<a href=#94 id=94 data-nosnippet>94</a>//! .set_attr(CALL_EFFECT_KIND,
CallEffectKind::Pure);
+<a href=#95 id=95 data-nosnippet>95</a>//!
register_type::<PairType>()?;
+<a href=#96 id=96 data-nosnippet>96</a>//! }
+<a href=#97 id=97 data-nosnippet>97</a>//!
+<a href=#98 id=98 data-nosnippet>98</a>//! let clamp =
Op::get("my_ext.clamp")?;
+<a href=#99 id=99 data-nosnippet>99</a>//! # Ok::<(), tvm_ffi::Error>(())
+<a href=#100 id=100 data-nosnippet>100</a>//! ```
+<a href=#101 id=101 data-nosnippet>101</a>//!
+<a href=#102 id=102 data-nosnippet>102</a>//! A type extends [`ir::TypeObj`];
its fields are reflected, so Python and the TVMScript printer
+<a href=#103 id=103 data-nosnippet>103</a>//! see them. The generated code
names `tvm_ffi`, which `use tvm_tirx::tvm_ffi` brings into scope.
+<a href=#104 id=104 data-nosnippet>104</a>//!
+<a href=#105 id=105 data-nosnippet>105</a>//! ```
+<a href=#106 id=106 data-nosnippet>106</a>//! use tvm_tirx::ir::{PrimType,
Type, TypeObj, UNKNOWN_LOC};
+<a href=#107 id=107 data-nosnippet>107</a>//! use tvm_tirx::tvm_ffi::{self,
rs_object, IntoObjectRef, ObjectRefCore};
+<a href=#108 id=108 data-nosnippet>108</a>//!
+<a href=#109 id=109 data-nosnippet>109</a>//! #[rs_object("my_ext.PairType",
final, immutable)]
+<a href=#110 id=110 data-nosnippet>110</a>//! pub struct PairTypeObj {
+<a href=#111 id=111 data-nosnippet>111</a>//! base_: TypeObj,
+<a href=#112 id=112 data-nosnippet>112</a>//! pub first: Type,
+<a href=#113 id=113 data-nosnippet>113</a>//! pub second: Type,
+<a href=#114 id=114 data-nosnippet>114</a>//! #[reflect(seq_hash_ignore)]
+<a href=#115 id=115 data-nosnippet>115</a>//! pub note: tvm_ffi::String,
+<a href=#116 id=116 data-nosnippet>116</a>//! }
+<a href=#117 id=117 data-nosnippet>117</a>//!
+<a href=#118 id=118 data-nosnippet>118</a>//! #[derive(Clone,
tvm_ffi::derive::ObjectRef)]
+<a href=#119 id=119 data-nosnippet>119</a>//! #[object_ref(parent = Type)]
+<a href=#120 id=120 data-nosnippet>120</a>//! pub struct PairType {
+<a href=#121 id=121 data-nosnippet>121</a>//! data_:
tvm_ffi::ObjectArc<PairTypeObj>,
+<a href=#122 id=122 data-nosnippet>122</a>//! }
+<a href=#123 id=123 data-nosnippet>123</a>//!
+<a href=#124 id=124 data-nosnippet>124</a>//! impl PairType {
+<a href=#125 id=125 data-nosnippet>125</a>//! pub fn new(first: impl
IntoObjectRef<Type>, second: impl IntoObjectRef<Type>) -> Self {
+<a href=#126 id=126 data-nosnippet>126</a>//! let (first, second) =
(first.into_owned_object_ref(), second.into_owned_object_ref());
+<a href=#127 id=127 data-nosnippet>127</a>//!
Self::from_object(PairTypeObj::new(TypeObj::new(UNKNOWN_LOC.into()), first,
second, ""))
+<a href=#128 id=128 data-nosnippet>128</a>//! }
+<a href=#129 id=129 data-nosnippet>129</a>//! }
+<a href=#130 id=130 data-nosnippet>130</a>//!
+<a href=#131 id=131 data-nosnippet>131</a>//! fn main() {
+<a href=#132 id=132 data-nosnippet>132</a>//! let pair =
PairType::new(PrimType::int(32), PrimType::float(32));
+<a href=#133 id=133 data-nosnippet>133</a>//! let ty: Type = pair.into();
+<a href=#134 id=134 data-nosnippet>134</a>//!
assert!(ty.downcast_ref::<PairTypeObj>().is_some());
+<a href=#135 id=135 data-nosnippet>135</a>//! }
+<a href=#136 id=136 data-nosnippet>136</a>//! ```
+<a href=#137 id=137 data-nosnippet>137</a>//!
+<a href=#138 id=138 data-nosnippet>138</a>//! # The library Python loads
+<a href=#139 id=139 data-nosnippet>139</a>//!
+<a href=#140 id=140 data-nosnippet>140</a>//! The crate is also built as
`libtvm_tirx_rust`, which `import tvm_tirx` loads, so Python uses the
+<a href=#141 id=141 data-nosnippet>141</a>//! operators and types the crate
defines as it uses the native ones. A `cdylib` of operators of its
+<a href=#142 id=142 data-nosnippet>142</a>//! own, such as
`examples/define_ir.rs`, registers them when Python loads it; a crate it
depends on
+<a href=#143 id=143 data-nosnippet>143</a>//! but never names is not linked
in, so name it, as `use my_ops as _;` does.
+<a href=#144 id=144 data-nosnippet>144</a>//!
+<a href=#145 id=145 data-nosnippet>145</a>//! # Generated code
+<a href=#146 id=146 data-nosnippet>146</a>//!
+<a href=#147 id=147 data-nosnippet>147</a>//! The code between `//
tvm-ffi-stubgen(begin)` and `// tvm-ffi-stubgen(end)` is generated, and
+<a href=#148 id=148 data-nosnippet>148</a>//! the rest is hand-written.
Regenerate it with the `tvm-ffi-stubgen` of `3rdparty/tvm-ffi` after
+<a href=#149 id=149 data-nosnippet>149</a>//! rebuilding
`libtvm_tirx_compiler` (`--check` only reports stale blocks):
+<a href=#150 id=150 data-nosnippet>150</a>//!
+<a href=#151 id=151 data-nosnippet>151</a>//! ```bash
+<a href=#152 id=152 data-nosnippet>152</a>//! tvm-ffi-stubgen rust/src
--target rust --dlls build/lib/libtvm_tirx_compiler.so
+<a href=#153 id=153 data-nosnippet>153</a>//! ```
+<a href=#154 id=154 data-nosnippet>154</a>//!
+<a href=#155 id=155 data-nosnippet>155</a>//! # Tests
+<a href=#156 id=156 data-nosnippet>156</a>//!
+<a href=#157 id=157 data-nosnippet>157</a>//! Build `libtvm_tirx_compiler`
first. The tests of `src/<path>.rs` are in `tests/<path>.rs`:
+<a href=#158 id=158 data-nosnippet>158</a>//!
+<a href=#159 id=159 data-nosnippet>159</a>//! ```bash
+<a href=#160 id=160 data-nosnippet>160</a>//! uv run --no-sync cargo test
--manifest-path rust/Cargo.toml
+<a href=#161 id=161 data-nosnippet>161</a>//! ```
+<a href=#162 id=162 data-nosnippet>162</a>
+<a href=#163 id=163 data-nosnippet>163</a></span><span
class="attr">#![warn(missing_docs)]
+<a href=#164 id=164 data-nosnippet>164</a>
+<a href=#165 id=165 data-nosnippet>165</a></span><span class="kw">pub mod
</span>backend;
+<a href=#166 id=166 data-nosnippet>166</a><span class="kw">pub mod
</span>codegen;
+<a href=#167 id=167 data-nosnippet>167</a><span class="kw">pub mod </span>ir;
+<a href=#168 id=168 data-nosnippet>168</a><span class="kw">mod </span>r#macro;
+<a href=#169 id=169 data-nosnippet>169</a><span class="kw">pub mod
</span>runtime;
+<a href=#170 id=170 data-nosnippet>170</a><span class="kw">pub mod
</span>script;
+<a href=#171 id=171 data-nosnippet>171</a><span class="kw">pub mod </span>sym;
+<a href=#172 id=172 data-nosnippet>172</a><span class="kw">pub mod
</span>target;
+<a href=#173 id=173 data-nosnippet>173</a><span class="kw">pub mod </span>tirx;
+<a href=#174 id=174 data-nosnippet>174</a>
+<a href=#175 id=175 data-nosnippet>175</a><span class="kw">pub use
</span>tvm_ffi;
+<a href=#176 id=176 data-nosnippet>176</a>
+<a href=#177 id=177 data-nosnippet>177</a><span class="comment">// The errors
of the static init blocks of every library built on the crate, which
+<a href=#178 id=178 data-nosnippet>178</a>// `import tvm_tirx` raises for
`libtvm_tirx_rust`: `__tvm_ffi_tirx_register_ir`, the TVM FFI
+<a href=#179 id=179 data-nosnippet>179</a>// function `tirx_register_ir` of
the library as `tvm_ffi.load_module` loads it. The module keeps
+<a href=#180 id=180 data-nosnippet>180</a>// the symbol, which `#[no_mangle]`
exports from wherever it is, out of the crate's documentation.
+<a href=#181 id=181 data-nosnippet>181</a></span><span
class="attr">#[doc(hidden)]
+<a href=#182 id=182 data-nosnippet>182</a></span><span class="kw">pub mod
</span>exports {
+<a href=#183 id=183 data-nosnippet>183</a> <span
class="macro">tvm_ffi::tvm_ffi_dll_export_typed_func!</span>(tirx_register_ir,
tvm_ffi::run_static_init_blocks);
+<a href=#184 id=184 data-nosnippet>184</a>}
+<a href=#185 id=185 data-nosnippet>185</a>
+<a href=#186 id=186 data-nosnippet>186</a><span class="comment">// The crate
reaches `libtvm_tirx_compiler` through the FFI registry, so a linker that drops
+<a href=#187 id=187 data-nosnippet>187</a>// unreferenced libraries
(`--as-needed`) would drop the library the build script links, and its
+<a href=#188 id=188 data-nosnippet>188</a>// registrations would never run.
Each TIRx shared library exports a `<library>_link_anchor`
+<a href=#189 id=189 data-nosnippet>189</a>// function that does nothing,
defined in the `link_anchor.cc` of its sources (for the compiler,
+<a href=#190 id=190 data-nosnippet>190</a>// `src/ir/link_anchor.cc`) and
declared by whoever references it. The static below holds the
+<a href=#191 id=191 data-nosnippet>191</a>// anchor's address: a relocation
against the symbol in the object of this module, which costs
+<a href=#192 id=192 data-nosnippet>192</a>// nothing at run time and is what
makes the linker keep the library.
+<a href=#193 id=193 data-nosnippet>193</a>//
+<a href=#194 id=194 data-nosnippet>194</a>// A program pulls in only the
objects of the crate it references, so the static keeps the
+<a href=#195 id=195 data-nosnippet>195</a>// library only when the object of
this module is pulled. It is, because the objects of the crate
+<a href=#196 id=196 data-nosnippet>196</a>// reference one another densely and
`sym::analyzer` references `ExitOnDrop::new` below. The test
+<a href=#197 id=197 data-nosnippet>197</a>// binaries rely on the same
mechanism and fail at their first registry lookup if that changes. A
+<a href=#198 id=198 data-nosnippet>198</a>// program that uses the registry
only through `tvm_ffi` itself, without calling a wrapper, must
+<a href=#199 id=199 data-nosnippet>199</a>// keep the library by other means,
such as the linker arguments `tvm-tirx-config --libs compiler`
+<a href=#200 id=200 data-nosnippet>200</a>// prints.
+<a href=#201 id=201 data-nosnippet>201</a></span><span class="kw">extern
</span><span class="string">"C" </span>{
+<a href=#202 id=202 data-nosnippet>202</a> <span class="kw">fn
</span>tvm_tirx_compiler_link_anchor() -> i32;
+<a href=#203 id=203 data-nosnippet>203</a>}
+<a href=#204 id=204 data-nosnippet>204</a>
+<a href=#205 id=205 data-nosnippet>205</a><span class="attr">#[used]
+<a href=#206 id=206 data-nosnippet>206</a></span><span class="kw">static
</span>TVM_TIRX_COMPILER_LINK_ANCHOR: <span class="kw">unsafe extern
</span><span class="string">"C" </span><span class="kw">fn</span>() -> i32 =
tvm_tirx_compiler_link_anchor;
+<a href=#207 id=207 data-nosnippet>207</a>
+<a href=#208 id=208 data-nosnippet>208</a><span class="doccomment">/// Makes a
scope guard neither `Send` nor `Sync`: the native scopes keep their state per
thread,
+<a href=#209 id=209 data-nosnippet>209</a>/// or in an object that is not
synchronized, so a scope must end on the thread that opened it.
+<a href=#210 id=210 data-nosnippet>210</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type
</span>ThreadBound = std::marker::PhantomData<<span class="kw-2">*const
</span>()>;
+<a href=#211 id=211 data-nosnippet>211</a>
+<a href=#212 id=212 data-nosnippet>212</a><span class="doccomment">/// Calls a
native exit function when dropped: the end of a scope a native enter function
opened.
+<a href=#213 id=213 data-nosnippet>213</a></span><span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct
</span>ExitOnDrop(tvm_ffi::Function, ThreadBound);
+<a href=#214 id=214 data-nosnippet>214</a>
+<a href=#215 id=215 data-nosnippet>215</a><span class="kw">impl
</span>ExitOnDrop {
+<a href=#216 id=216 data-nosnippet>216</a> <span
class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn
</span>new(exit: tvm_ffi::Function) -> <span class="self">Self </span>{
+<a href=#217 id=217 data-nosnippet>217</a> <span
class="self">Self</span>(exit, ThreadBound::default())
+<a href=#218 id=218 data-nosnippet>218</a> }
+<a href=#219 id=219 data-nosnippet>219</a>}
+<a href=#220 id=220 data-nosnippet>220</a>
+<a href=#221 id=221 data-nosnippet>221</a><span class="kw">impl </span>Drop
<span class="kw">for </span>ExitOnDrop {
+<a href=#222 id=222 data-nosnippet>222</a> <span class="kw">fn
</span>drop(<span class="kw-2">&mut </span><span class="self">self</span>) {
+<a href=#223 id=223 data-nosnippet>223</a> <span class="comment">// A
destructor cannot report the error, and the native exit functions do not fail.
+<a href=#224 id=224 data-nosnippet>224</a> </span><span class="kw">let
_ </span>= <span class="self">self</span>.<span
class="number">0</span>.call_packed(<span class="kw-2">&</span>[]);
+<a href=#225 id=225 data-nosnippet>225</a> }
+<a href=#226 id=226 data-nosnippet>226</a>}
</code></pre></div></section></main></body></html>
\ No newline at end of file
diff --git
a/tirx/reference/rust/generated/src/tvm_tirx/tirx/structural_visit_with_constraint_context.rs.html
b/tirx/reference/rust/generated/src/tvm_tirx/tirx/structural_visit_with_constraint_context.rs.html
index a90fe1ab9b9..56945590751 100644
---
a/tirx/reference/rust/generated/src/tvm_tirx/tirx/structural_visit_with_constraint_context.rs.html
+++
b/tirx/reference/rust/generated/src/tvm_tirx/tirx/structural_visit_with_constraint_context.rs.html
@@ -66,7 +66,7 @@
<a href=#66 id=66 data-nosnippet>66</a>}
<a href=#67 id=67 data-nosnippet>67</a>
<a href=#68 id=68 data-nosnippet>68</a><span class="comment">// SAFETY:
repr(C) mirrors the complete base in the matching native header.
-<a href=#69 id=69 data-nosnippet>69</a>// Stub generation cannot certify its
private tail; the binding requires the
+<a href=#69 id=69 data-nosnippet>69</a>// Stub generation cannot certify its
private tail; the definition requires the
<a href=#70 id=70 data-nosnippet>70</a>// matching native build. All fields
begin with the same state as the native
<a href=#71 id=71 data-nosnippet>71</a>// constructor. Native-mutated fields
use UnsafeCell. The type identity is the
<a href=#72 id=72 data-nosnippet>72</a>// registered specialized type, while
the shared engine installs its vtable and
diff --git a/tirx/reference/rust/generated/tvm_tirx/index.html
b/tirx/reference/rust/generated/tvm_tirx/index.html
index 300186dd330..f1f1b933e9e 100644
--- a/tirx/reference/rust/generated/tvm_tirx/index.html
+++ b/tirx/reference/rust/generated/tvm_tirx/index.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="The TIRx
compiler in Rust: its IR objects over TVM FFI, and the definition of new types,
operators and passes that extend it."><title>tvm_tirx -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2
[...]
+<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1.0"><meta
name="generator" content="rustdoc"><meta name="description" content="The TIRx
compiler in Rust: its IR objects over TVM FFI, and the definition of new types,
operators and passes that extend it."><title>tvm_tirx -
Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2
[...]
operators and passes that extend it.</p>
<p>The modules:</p>
<ul>
@@ -13,12 +13,13 @@ analyses.</li>
<li><a href="codegen/index.html" title="mod
tvm_tirx::codegen"><code>codegen</code></a>: compiling IR modules into runtime
modules.</li>
<li><a href="script/index.html" title="mod
tvm_tirx::script"><code>script</code></a>: printing IR objects as
TVMScript.</li>
</ul>
-<h2 id="using-the-bindings"><a class="doc-anchor"
href="#using-the-bindings">§</a>Using the bindings</h2>
+<h2 id="using-the-crate"><a class="doc-anchor"
href="#using-the-crate">§</a>Using the crate</h2>
<p>The crate links <code>libtvm_tirx_compiler</code>, which the build script
finds through
<code>tvm-tirx-config --libdir</code>; <code>tvm-tirx-config</code> and
<code>tvm-ffi-config</code> must be on <code>PATH</code> when the
-crate is built. Native functions have Rust wrappers, such as <a
href="target/struct.Target.html#method.new" title="associated function
tvm_tirx::target::Target::new"><code>target::Target::new</code></a> for
-<code>target.Target</code>, and any of them can be called through <a
href="../tvm_ffi/function/struct.Function.html#method.get_global"
title="associated function
tvm_ffi::function::Function::get_global"><code>tvm_ffi::Function::get_global</code></a>.
A
-program that uses only <code>tvm_ffi</code>, without calling a wrapper, must
link the library itself
+crate is built. Many of its APIs call global functions of that library, as
+<a href="target/struct.Target.html#method.new" title="associated function
tvm_tirx::target::Target::new"><code>target::Target::new</code></a> calls
<code>target.Target</code>, and any global function can also be called
+through <a href="../tvm_ffi/function/struct.Function.html#method.get_global"
title="associated function
tvm_ffi::function::Function::get_global"><code>tvm_ffi::Function::get_global</code></a>.
A program that calls them only through <code>tvm_ffi</code>,
+without an API of this crate, must link the library itself
(<code>tvm-tirx-config --libs compiler</code>).</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span
class="kw">use </span>tvm_tirx::target::Target;
diff --git a/tirx/reference/rust/index.html b/tirx/reference/rust/index.html
index 8d0c7733904..b47327664b8 100644
--- a/tirx/reference/rust/index.html
+++ b/tirx/reference/rust/index.html
@@ -414,12 +414,12 @@ TIRx is built with.</p>
<tbody>
<tr class="row-even"><td><p>📦 <a class="reference external"
href="generated/tvm_tirx/index.html">tvm-tirx</a></p></td>
<td><p>The IR, TIRx, symbolic analysis, target, backend, runtime, codegen and
script
-bindings, the Rust IR constructors and operators, and the definition of new
+modules, their IR constructors and operators, and the definition of new
types, operators, and passes.</p></td>
</tr>
<tr class="row-odd"><td><p>📦 <a class="reference external"
href="generated/tvm_ffi/index.html">tvm-ffi</a></p></td>
-<td><p>The TVM FFI objects, functions, containers and <code class="docutils
literal notranslate"><span class="pre">static_init_block!</span></code> the
-bindings are built on, re-exported as <code class="docutils literal
notranslate"><span class="pre">tvm_tirx::tvm_ffi</span></code>.</p></td>
+<td><p>The TVM FFI objects, functions, containers and <code class="docutils
literal notranslate"><span class="pre">static_init_block!</span></code> that
+<code class="docutils literal notranslate"><span
class="pre">tvm-tirx</span></code> is built on, re-exported as <code
class="docutils literal notranslate"><span
class="pre">tvm_tirx::tvm_ffi</span></code>.</p></td>
</tr>
</tbody>
</table>
diff --git a/tirx/searchindex.js b/tirx/searchindex.js
index be2b15926e7..86be4109d09 100644
--- a/tirx/searchindex.js
+++ b/tirx/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"A CUDA Function":[[23,"a-cuda-function"]],"A
Global-to-Shared Copy":[[30,"a-global-to-shared-copy"]],"A Load, Compute, and
Store Example":[[34,"a-load-compute-and-store-example"]],"A Shared-Memory
Exchange":[[32,"a-shared-memory-exchange"]],"A Tile Load, Computation, and
Store":[[35,"a-tile-load-computation-and-store"]],"API
Reference":[[10,null]],"Absolute value and
negation":[[1537,"absolute-value-and-negation"]],"Accumulation, transpose and
alpha/beta":[ [...]
\ No newline at end of file
+Search.setIndex({"alltitles":{"A CUDA Function":[[23,"a-cuda-function"]],"A
Global-to-Shared Copy":[[30,"a-global-to-shared-copy"]],"A Load, Compute, and
Store Example":[[34,"a-load-compute-and-store-example"]],"A Shared-Memory
Exchange":[[32,"a-shared-memory-exchange"]],"A Tile Load, Computation, and
Store":[[35,"a-tile-load-computation-and-store"]],"API
Reference":[[10,null]],"Absolute value and
negation":[[1537,"absolute-value-and-negation"]],"Accumulation, transpose and
alpha/beta":[ [...]
\ No newline at end of file