Skip to content

Commit 453a501

Browse files
Update docs
1 parent d2d5ae9 commit 453a501

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

_sources/autoapi/tilelang/jit/adapter/wrapper/index.rst.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,34 @@ Module Contents
579579
.. py:class:: TLCPUSourceWrapper(scheduled_ir_module, source, target, device_mod = None, host_mod = None, pass_configs = None)
580580
581581
.. py:attribute:: INIT_FUNC
582+
:value: Multiline-String
583+
584+
.. raw:: html
585+
586+
<details><summary>Show Value</summary>
587+
588+
.. code-block:: python
589+
590+
"""
591+
#define ERROR_BUF_SIZE 1024
592+
static char error_buf[ERROR_BUF_SIZE];
593+
594+
extern "C" const char* get_last_error() {
595+
return error_buf;
596+
}
597+
598+
extern "C" int init() {
599+
error_buf[0] = '\0';
600+
601+
return 0;
602+
}
603+
"""
604+
605+
.. raw:: html
606+
607+
</details>
608+
609+
582610

583611

584612
.. py:attribute:: CALL_PREFIX

autoapi/tilelang/jit/adapter/wrapper/index.html

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,24 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
11511151
</dl>
11521152
<dl class="py attribute">
11531153
<dt class="sig sig-object py" id="tilelang.jit.adapter.wrapper.TLCPUSourceWrapper.INIT_FUNC">
1154-
<span class="sig-name descname"><span class="pre">INIT_FUNC</span></span><a class="headerlink" href="#tilelang.jit.adapter.wrapper.TLCPUSourceWrapper.INIT_FUNC" title="Link to this definition"></a></dt>
1155-
<dd></dd></dl>
1154+
<span class="sig-name descname"><span class="pre">INIT_FUNC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">Multiline-String</span></em><a class="headerlink" href="#tilelang.jit.adapter.wrapper.TLCPUSourceWrapper.INIT_FUNC" title="Link to this definition"></a></dt>
1155+
<dd><details><summary>Show Value</summary><div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;</span>
1156+
<span class="sd">#define ERROR_BUF_SIZE 1024</span>
1157+
<span class="sd">static char error_buf[ERROR_BUF_SIZE];</span>
1158+
1159+
<span class="sd">extern &quot;C&quot; const char* get_last_error() {</span>
1160+
<span class="sd"> return error_buf;</span>
1161+
<span class="sd">}</span>
1162+
1163+
<span class="sd">extern &quot;C&quot; int init() {</span>
1164+
<span class="sd"> error_buf[0] = &#39;\0&#39;;</span>
1165+
1166+
<span class="sd"> return 0;</span>
1167+
<span class="sd">}</span>
1168+
<span class="sd">&quot;&quot;&quot;</span>
1169+
</pre></div>
1170+
</div>
1171+
</details></dd></dl>
11561172

11571173
<dl class="py attribute">
11581174
<dt class="sig sig-object py" id="tilelang.jit.adapter.wrapper.TLCPUSourceWrapper.CALL_PREFIX">

0 commit comments

Comments
 (0)