Skip to content

Commit 2e17f71

Browse files
author
Siyuan Feng
committed
[Docs] Introduce Relax API and move legacy part to standalone page
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.
1 parent 1ca9833 commit 2e17f71

21 files changed

+525
-93
lines changed

docs/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@ driving its costs down.
5151

5252
.. toctree::
5353
:maxdepth: 1
54-
:caption: Architecture Guide
54+
:caption: API Reference
5555

56-
arch/index
56+
reference/api/python/index
57+
reference/api/links
5758

5859
.. toctree::
5960
:maxdepth: 1
60-
:caption: Topic Guides
61+
:caption: Legacy
6162

63+
reference/langref/index
64+
arch/index
6265
topic/microtvm/index
6366
topic/vta/index
6467

6568
.. toctree::
6669
:maxdepth: 1
67-
:caption: Reference Guide
70+
:caption: About
6871

69-
reference/langref/index
70-
reference/api/python/index
71-
reference/api/links
7272
reference/publications
73-
genindex
73+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.dlight
19+
----------
20+
.. automodule:: tvm.dlight
21+
:members:
22+
:imported-members:

docs/reference/api/python/index.rst

Lines changed: 84 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,89 @@
1818
Python API
1919
==========
2020

21+
.. toctree::
22+
:maxdepth: 1
23+
:caption: tvm
24+
25+
error
26+
ir
27+
instrument
28+
transform
29+
target
30+
driver
31+
32+
.. toctree::
33+
:maxdepth: 1
34+
:caption: tvm.runtime
35+
36+
runtime/runtime
37+
runtime/ndarray
38+
runtime/relax_vm
39+
runtime/disco
40+
runtime/profiling
41+
42+
.. toctree::
43+
:maxdepth: 1
44+
:caption: tvm.relax
45+
46+
relax/relax
47+
relax/analysis
48+
relax/block_builder
49+
relax/frontend
50+
relax/op
51+
relax/transform
52+
53+
.. toctree::
54+
:maxdepth: 1
55+
:caption: tvm.tir
56+
57+
tir/tir
58+
tir/analysis
59+
tir/schedule
60+
tir/stmt_functor
61+
tir/transform
62+
63+
.. toctree::
64+
:maxdepth: 1
65+
:caption: tvm.te
66+
67+
te
68+
topi
69+
70+
.. toctree::
71+
:maxdepth: 1
72+
:caption: tvm.meta_schedule
73+
74+
meta_schedule
75+
76+
.. toctree::
77+
:maxdepth: 1
78+
:caption: tvm.dlight
79+
80+
dlight
81+
82+
.. toctree::
83+
:maxdepth: 1
84+
:caption: Misc
85+
86+
rpc
87+
contrib
2188

2289
.. toctree::
23-
:maxdepth: 2
24-
25-
runtime
26-
ndarray
27-
error
28-
ir
29-
target
30-
tir
31-
te
32-
driver
33-
relay/index
34-
relay/frontend
35-
relay/nn
36-
relay/vision
37-
relay/image
38-
relay/transform
39-
relay/analysis
40-
relay/backend
41-
relay/dataflow_pattern
42-
relay/testing
43-
autotvm
44-
auto_scheduler
45-
meta_schedule
46-
rpc
47-
micro
48-
contrib
49-
graph_executor
50-
topi
51-
vta/index
90+
:maxdepth: 1
91+
:caption: Legacy
92+
93+
relay/index
94+
relay/frontend
95+
relay/nn
96+
relay/vision
97+
relay/image
98+
relay/transform
99+
relay/analysis
100+
relay/backend
101+
relay/dataflow_pattern
102+
relay/testing
103+
autotvm
104+
auto_scheduler
105+
micro
106+
graph_executor
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.instrument
19+
--------------
20+
.. automodule:: tvm.instrument
21+
:members:
22+
:imported-members:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.relax.analysis
19+
------------------
20+
.. automodule:: tvm.relax.analysis
21+
:members:
22+
:imported-members:
23+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.relax.block_builder
19+
-----------------------
20+
.. automodule:: tvm.relax.block_builder
21+
:members:
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.relax.frontend
19+
------------------
20+
.. automodule:: tvm.relax.frontend
21+
:members:
22+
:imported-members:
23+
24+
tvm.relax.frontend.nn
25+
*********************
26+
.. automodule:: tvm.relax.frontend.nn
27+
:members:
28+
:imported-members:
29+
:exclude-members: BlockBuilder
30+
:noindex:
31+
32+
tvm.relax.frontend.onnx
33+
***********************
34+
.. automodule:: tvm.relax.frontend.onnx
35+
:members:
36+
:imported-members:
37+
38+
tvm.relax.frontend.stablehlo
39+
****************************
40+
.. automodule:: tvm.relax.frontend.stablehlo
41+
:members:
42+
:imported-members:
43+
44+
tvm.relax.frontend.torch
45+
************************
46+
.. automodule:: tvm.relax.frontend.torch
47+
:members:
48+
:imported-members:
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.relax.op
19+
------------
20+
21+
tvm.relax.op
22+
************
23+
.. automodule:: tvm.relax.op
24+
:members:
25+
:imported-members:
26+
27+
tvm.relax.op.nn
28+
***************
29+
.. automodule:: tvm.relax.op.nn
30+
:members:
31+
:imported-members:
32+
33+
tvm.relax.op.builtin
34+
********************
35+
.. automodule:: tvm.relax.op.builtin
36+
:members:
37+
:imported-members:
38+
39+
tvm.relax.op.ccl
40+
****************
41+
.. automodule:: tvm.relax.op.ccl
42+
:members:
43+
:imported-members:
44+
45+
tvm.relax.op.distributed
46+
************************
47+
.. automodule:: tvm.relax.op.distributed
48+
:members:
49+
:imported-members:
50+
51+
tvm.relax.op.grad
52+
*****************
53+
.. automodule:: tvm.relax.op.grad
54+
:members:
55+
:imported-members:
56+
57+
tvm.relax.op.image
58+
******************
59+
.. automodule:: tvm.relax.op.image
60+
:members:
61+
:imported-members:
62+
63+
tvm.relax.op.memory
64+
*******************
65+
.. automodule:: tvm.relax.op.memory
66+
:members:
67+
:imported-members:
68+
69+
tvm.relax.op.op_attrs
70+
*********************
71+
.. automodule:: tvm.relax.op.op_attrs
72+
:members:
73+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
or more contributor license agreements. See the NOTICE file
3+
distributed with this work for additional information
4+
regarding copyright ownership. The ASF licenses this file
5+
to you under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
software distributed under the License is distributed on an
13+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
KIND, either express or implied. See the License for the
15+
specific language governing permissions and limitations
16+
under the License.
17+
18+
tvm.relax
19+
---------
20+
.. automodule:: tvm.relax
21+
:members:
22+
:imported-members:
23+
:exclude-members: BlockBuilder, Span, GlobalVar, SourceName, TupleType, Type, FuncType

0 commit comments

Comments
 (0)