Skip to content

Commit

Permalink
[Docs] Introduce Relax API and move legacy part to standalone page
Browse files Browse the repository at this point in the history
As the TVM project evolves, the Unity strategy has been the recommended
way to use Apache TVM applications. Hence, we are pushing documentation
for the Relax API to the forefront and moving the legacy part to a
standalone page, which may be removed in the future.
  • Loading branch information
Hzfengsy committed Aug 20, 2024
1 parent 1ca9833 commit 2e17f71
Show file tree
Hide file tree
Showing 21 changed files with 525 additions and 93 deletions.
16 changes: 8 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ driving its costs down.

.. toctree::
:maxdepth: 1
:caption: Architecture Guide
:caption: API Reference

arch/index
reference/api/python/index
reference/api/links

.. toctree::
:maxdepth: 1
:caption: Topic Guides
:caption: Legacy

reference/langref/index
arch/index
topic/microtvm/index
topic/vta/index

.. toctree::
:maxdepth: 1
:caption: Reference Guide
:caption: About

reference/langref/index
reference/api/python/index
reference/api/links
reference/publications
genindex

22 changes: 22 additions & 0 deletions docs/reference/api/python/dlight.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. 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.dlight
----------
.. automodule:: tvm.dlight
:members:
:imported-members:
113 changes: 84 additions & 29 deletions docs/reference/api/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,89 @@
Python API
==========

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

error
ir
instrument
transform
target
driver

.. toctree::
:maxdepth: 1
:caption: tvm.runtime

runtime/runtime
runtime/ndarray
runtime/relax_vm
runtime/disco
runtime/profiling

.. toctree::
:maxdepth: 1
:caption: tvm.relax

relax/relax
relax/analysis
relax/block_builder
relax/frontend
relax/op
relax/transform

.. toctree::
:maxdepth: 1
:caption: tvm.tir

tir/tir
tir/analysis
tir/schedule
tir/stmt_functor
tir/transform

.. toctree::
:maxdepth: 1
:caption: tvm.te

te
topi

.. toctree::
:maxdepth: 1
:caption: tvm.meta_schedule

meta_schedule

.. toctree::
:maxdepth: 1
:caption: tvm.dlight

dlight

.. toctree::
:maxdepth: 1
:caption: Misc

rpc
contrib

.. toctree::
:maxdepth: 2

runtime
ndarray
error
ir
target
tir
te
driver
relay/index
relay/frontend
relay/nn
relay/vision
relay/image
relay/transform
relay/analysis
relay/backend
relay/dataflow_pattern
relay/testing
autotvm
auto_scheduler
meta_schedule
rpc
micro
contrib
graph_executor
topi
vta/index
:maxdepth: 1
:caption: Legacy

relay/index
relay/frontend
relay/nn
relay/vision
relay/image
relay/transform
relay/analysis
relay/backend
relay/dataflow_pattern
relay/testing
autotvm
auto_scheduler
micro
graph_executor
22 changes: 22 additions & 0 deletions docs/reference/api/python/instrument.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. 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.instrument
--------------
.. automodule:: tvm.instrument
:members:
:imported-members:
23 changes: 23 additions & 0 deletions docs/reference/api/python/relax/analysis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. 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.relax.analysis
------------------
.. automodule:: tvm.relax.analysis
:members:
:imported-members:

21 changes: 21 additions & 0 deletions docs/reference/api/python/relax/block_builder.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. 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.relax.block_builder
-----------------------
.. automodule:: tvm.relax.block_builder
:members:
48 changes: 48 additions & 0 deletions docs/reference/api/python/relax/frontend.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.. 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.relax.frontend
------------------
.. automodule:: tvm.relax.frontend
:members:
:imported-members:

tvm.relax.frontend.nn
*********************
.. automodule:: tvm.relax.frontend.nn
:members:
:imported-members:
:exclude-members: BlockBuilder
:noindex:

tvm.relax.frontend.onnx
***********************
.. automodule:: tvm.relax.frontend.onnx
:members:
:imported-members:

tvm.relax.frontend.stablehlo
****************************
.. automodule:: tvm.relax.frontend.stablehlo
:members:
:imported-members:

tvm.relax.frontend.torch
************************
.. automodule:: tvm.relax.frontend.torch
:members:
:imported-members:
73 changes: 73 additions & 0 deletions docs/reference/api/python/relax/op.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.. 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.relax.op
------------

tvm.relax.op
************
.. automodule:: tvm.relax.op
:members:
:imported-members:

tvm.relax.op.nn
***************
.. automodule:: tvm.relax.op.nn
:members:
:imported-members:

tvm.relax.op.builtin
********************
.. automodule:: tvm.relax.op.builtin
:members:
:imported-members:

tvm.relax.op.ccl
****************
.. automodule:: tvm.relax.op.ccl
:members:
:imported-members:

tvm.relax.op.distributed
************************
.. automodule:: tvm.relax.op.distributed
:members:
:imported-members:

tvm.relax.op.grad
*****************
.. automodule:: tvm.relax.op.grad
:members:
:imported-members:

tvm.relax.op.image
******************
.. automodule:: tvm.relax.op.image
:members:
:imported-members:

tvm.relax.op.memory
*******************
.. automodule:: tvm.relax.op.memory
:members:
:imported-members:

tvm.relax.op.op_attrs
*********************
.. automodule:: tvm.relax.op.op_attrs
:members:

23 changes: 23 additions & 0 deletions docs/reference/api/python/relax/relax.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. 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.relax
---------
.. automodule:: tvm.relax
:members:
:imported-members:
:exclude-members: BlockBuilder, Span, GlobalVar, SourceName, TupleType, Type, FuncType
Loading

0 comments on commit 2e17f71

Please sign in to comment.