diff --git a/docs/index.rst b/docs/index.rst index 95b1937671eae..30c96885b66fd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 + diff --git a/docs/reference/api/python/dlight.rst b/docs/reference/api/python/dlight.rst new file mode 100644 index 0000000000000..37859ed790f4d --- /dev/null +++ b/docs/reference/api/python/dlight.rst @@ -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: diff --git a/docs/reference/api/python/index.rst b/docs/reference/api/python/index.rst index 5dc1ed806dfd9..e64ea304cbee1 100644 --- a/docs/reference/api/python/index.rst +++ b/docs/reference/api/python/index.rst @@ -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 diff --git a/docs/reference/api/python/instrument.rst b/docs/reference/api/python/instrument.rst new file mode 100644 index 0000000000000..270a19690b9ee --- /dev/null +++ b/docs/reference/api/python/instrument.rst @@ -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: diff --git a/docs/reference/api/python/relax/analysis.rst b/docs/reference/api/python/relax/analysis.rst new file mode 100644 index 0000000000000..44c0586d69100 --- /dev/null +++ b/docs/reference/api/python/relax/analysis.rst @@ -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: + diff --git a/docs/reference/api/python/relax/block_builder.rst b/docs/reference/api/python/relax/block_builder.rst new file mode 100644 index 0000000000000..a1c2a7c4354b5 --- /dev/null +++ b/docs/reference/api/python/relax/block_builder.rst @@ -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: diff --git a/docs/reference/api/python/relax/frontend.rst b/docs/reference/api/python/relax/frontend.rst new file mode 100644 index 0000000000000..c037f323ed1a4 --- /dev/null +++ b/docs/reference/api/python/relax/frontend.rst @@ -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: diff --git a/docs/reference/api/python/relax/op.rst b/docs/reference/api/python/relax/op.rst new file mode 100644 index 0000000000000..c5b91866af912 --- /dev/null +++ b/docs/reference/api/python/relax/op.rst @@ -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: + diff --git a/docs/reference/api/python/relax/relax.rst b/docs/reference/api/python/relax/relax.rst new file mode 100644 index 0000000000000..4df1f1279b59c --- /dev/null +++ b/docs/reference/api/python/relax/relax.rst @@ -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 diff --git a/docs/reference/api/python/relax/transform.rst b/docs/reference/api/python/relax/transform.rst new file mode 100644 index 0000000000000..dcb41e80fd67a --- /dev/null +++ b/docs/reference/api/python/relax/transform.rst @@ -0,0 +1,24 @@ +.. 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. + +.. _api-relax-transformation: + +tvm.relax.transform +------------------- +.. automodule:: tvm.relax.transform + :members: + :imported-members: diff --git a/docs/reference/api/python/runtime/disco.rst b/docs/reference/api/python/runtime/disco.rst new file mode 100644 index 0000000000000..b2661c094f2d4 --- /dev/null +++ b/docs/reference/api/python/runtime/disco.rst @@ -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.runtime.disco +----------------- +.. automodule:: tvm.runtime.disco + :members: + :imported-members: \ No newline at end of file diff --git a/docs/reference/api/python/runtime/ndarray.rst b/docs/reference/api/python/runtime/ndarray.rst new file mode 100644 index 0000000000000..8c794f04b193f --- /dev/null +++ b/docs/reference/api/python/runtime/ndarray.rst @@ -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.runtime.ndarray +------------------- +.. automodule:: tvm.runtime.ndarray + :members: diff --git a/docs/reference/api/python/runtime/profiling.rst b/docs/reference/api/python/runtime/profiling.rst new file mode 100644 index 0000000000000..d943f1ed33e0d --- /dev/null +++ b/docs/reference/api/python/runtime/profiling.rst @@ -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.runtime.profiling +--------------------- +.. automodule:: tvm.runtime.profiling + :members: \ No newline at end of file diff --git a/docs/reference/api/python/vta/index.rst b/docs/reference/api/python/runtime/relax_vm.rst similarity index 61% rename from docs/reference/api/python/vta/index.rst rename to docs/reference/api/python/runtime/relax_vm.rst index 479b8394f0cb1..7633ae45a50e0 100644 --- a/docs/reference/api/python/vta/index.rst +++ b/docs/reference/api/python/runtime/relax_vm.rst @@ -15,31 +15,7 @@ specific language governing permissions and limitations under the License. -vta -=== - -This document contains the python API to VTA compiler toolchain. - -.. automodule:: vta - -Hardware Information +tvm.runtime.relax_vm -------------------- - -.. autofunction:: vta.Environment -.. autofunction:: vta.get_env - -RPC Utilities -------------- - -.. autofunction:: vta.reconfig_runtime -.. autofunction:: vta.program_fpga - - -Compiler API ------------- -We program VTA using TVM, so the compiler API in vta package -is only a thin wrapper to provide VTA specific extensions. - -.. autofunction:: vta.build_config -.. autofunction:: vta.build -.. autofunction:: vta.lower +.. automodule:: tvm.runtime.relax_vm + :members: \ No newline at end of file diff --git a/docs/reference/api/python/runtime.rst b/docs/reference/api/python/runtime/runtime.rst similarity index 98% rename from docs/reference/api/python/runtime.rst rename to docs/reference/api/python/runtime/runtime.rst index c51a2d452065c..1175f75136d63 100644 --- a/docs/reference/api/python/runtime.rst +++ b/docs/reference/api/python/runtime/runtime.rst @@ -17,9 +17,7 @@ tvm.runtime ----------- - .. automodule:: tvm.runtime :members: :imported-members: :exclude-members: NDArray - :autosummary: diff --git a/docs/reference/api/python/tir/analysis.rst b/docs/reference/api/python/tir/analysis.rst new file mode 100644 index 0000000000000..aa777358bcf28 --- /dev/null +++ b/docs/reference/api/python/tir/analysis.rst @@ -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.tir.analysis +---------------- +.. automodule:: tvm.tir.analysis.analysis + :members: diff --git a/docs/reference/api/python/tir/schedule.rst b/docs/reference/api/python/tir/schedule.rst new file mode 100644 index 0000000000000..17e4a4593a471 --- /dev/null +++ b/docs/reference/api/python/tir/schedule.rst @@ -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.tir.schedule +----------------- +.. automodule:: tvm.tir.schedule + :members: + :imported-members: diff --git a/docs/reference/api/python/tir/stmt_functor.rst b/docs/reference/api/python/tir/stmt_functor.rst new file mode 100644 index 0000000000000..3b6c9bb64a89d --- /dev/null +++ b/docs/reference/api/python/tir/stmt_functor.rst @@ -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.tir.stmt_functor +-------------------- +.. automodule:: tvm.tir.stmt_functor + :members: diff --git a/docs/reference/api/python/tir/tir.rst b/docs/reference/api/python/tir/tir.rst new file mode 100644 index 0000000000000..71f909891c050 --- /dev/null +++ b/docs/reference/api/python/tir/tir.rst @@ -0,0 +1,24 @@ +.. 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.tir +------- +.. automodule:: tvm.tir + :members: + :imported-members: + :exclude-members: PrimExpr, const, StmtSRef, BlockScope, ScheduleState, Schedule, ScheduleError + diff --git a/docs/reference/api/python/tir.rst b/docs/reference/api/python/tir/transform.rst similarity index 68% rename from docs/reference/api/python/tir.rst rename to docs/reference/api/python/tir/transform.rst index 2152be69ea6f5..8ce641b6d3f66 100644 --- a/docs/reference/api/python/tir.rst +++ b/docs/reference/api/python/tir/transform.rst @@ -15,36 +15,9 @@ specific language governing permissions and limitations under the License. -.. _api-python-tir: - -tvm.tir -------- -.. automodule:: tvm.tir - :members: - :imported-members: - :exclude-members: PrimExpr, const - :autosummary: - tvm.tir.transform ----------------- .. automodule:: tvm.tir.transform :members: :imported-members: - :autosummary: - - -tvm.tir.analysis ----------------- -.. automodule:: tvm.tir.analysis - :members: - :imported-members: - :noindex: Buffer, Stmt - :autosummary: - - -tvm.tir.stmt_functor --------------------- -.. automodule:: tvm.tir.stmt_functor - :members: - :autosummary: diff --git a/docs/reference/api/python/transform.rst b/docs/reference/api/python/transform.rst new file mode 100644 index 0000000000000..d200dfdd11391 --- /dev/null +++ b/docs/reference/api/python/transform.rst @@ -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.transform +------------- +.. automodule:: tvm.transform + :members: + :imported-members: