Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions docs/reference/api/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ Python API
s_tir/transform
s_tir/dlight

.. toctree::
:maxdepth: 1
:caption: tvm.script

script/script
script/parser
script/ir_builder
script/printer

.. toctree::
:maxdepth: 1
:caption: tvm.te
Expand Down
46 changes: 46 additions & 0 deletions docs/reference/api/python/script/ir_builder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

tvm.script.ir_builder
---------------------

tvm.script.ir_builder
*********************
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section header tvm.script.ir_builder is redundant as it is identical to the page title. This creates repetitive entries in the table of contents. It is better to place the automodule directive directly under the main title.

.. automodule:: tvm.script.ir_builder
:members:
:imported-members:

tvm.script.ir_builder.ir
************************
.. automodule:: tvm.script.ir_builder.ir
:members:
:imported-members:

tvm.script.ir_builder.relax
***************************
.. automodule:: tvm.script.ir_builder.relax
:members:

tvm.script.ir_builder.relax.distributed
***************************************
.. automodule:: tvm.script.ir_builder.relax.distributed
:members:

tvm.script.ir_builder.tirx
**************************
.. automodule:: tvm.script.ir_builder.tirx
:members:
37 changes: 37 additions & 0 deletions docs/reference/api/python/script/parser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

tvm.script.parser
-----------------

tvm.script.parser
*****************
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section header tvm.script.parser is redundant as it is identical to the page title. Consider removing it to avoid repetitive entries in the table of contents.

.. automodule:: tvm.script.parser
:members:
:imported-members:

tvm.script.parser.ir
********************
.. automodule:: tvm.script.parser.ir

tvm.script.parser.relax
***********************
.. automodule:: tvm.script.parser.relax

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The tvm.script.parser.relax.distributed submodule is missing from the parser documentation. Since it is included in the ir_builder documentation, it should likely be included here as well for consistency.

Suggested change
tvm.script.parser.relax.distributed
***********************************
.. automodule:: tvm.script.parser.relax.distributed
:members:
:imported-members:

tvm.script.parser.tirx
**********************
.. automodule:: tvm.script.parser.tirx
25 changes: 25 additions & 0 deletions docs/reference/api/python/script/printer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

tvm.script.printer
------------------

tvm.script.printer
******************
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section header tvm.script.printer is redundant as it is identical to the page title. Consider removing it.

.. automodule:: tvm.script.printer
:members:
:imported-members:
35 changes: 35 additions & 0 deletions docs/reference/api/python/script/script.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

tvm.script
----------

tvm.script
**********
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section header tvm.script is redundant as it is identical to the page title. Consider removing it.

.. automodule:: tvm.script
:members:
:imported-members:

Comment thread
tlopex marked this conversation as resolved.
tvm.script.relax
****************
.. automodule:: tvm.script.relax
:members:

tvm.script.tirx
***************
.. automodule:: tvm.script.tirx
:members:
2 changes: 2 additions & 0 deletions python/tvm/script/ir_builder/ir/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def ir_module() -> IRModuleFrame:

def decl_function(func_name: str, func_signature: BaseFunc) -> GlobalVar:
"""Declare a Function without given the specific function implementation.

Parameters
----------
func_name : str
Expand All @@ -47,6 +48,7 @@ def decl_function(func_name: str, func_signature: BaseFunc) -> GlobalVar:
Note
----
It is usually used in cross-function call. And we can specify the function by `DefFunction`

Returns
-------
gv : GlobalVar
Expand Down
Loading