Skip to content

Commit

Permalink
[gh-pages] Manually update (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
chhzh123 authored Mar 7, 2024
1 parent 52af66b commit de5b5da
Show file tree
Hide file tree
Showing 39 changed files with 1,732 additions and 1,494 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6e6272ebf5ac258b4d3b0017646b7761
config: 84a439e06ccf80b9b6ea0d718369643a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.1"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.1"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def gemm(A: float32[M, K], B: float32[K, N]) -> float32[M, N]:
# Next, we create a new buffer for the output tensor ``C``.
# We provide a ``.buffer_at()`` primitive for users to quickly create a new buffer
# along a specific axis. Since Allo has attached all the tensors to the function,
# we can directly use ``<func>.<tensor>`` to access a specific tensor in the schedule.
# we can directly use ``<schedule>.<tensor>`` to access a specific tensor in the schedule.

s.buffer_at(gemm.C, axis="i")
s.buffer_at(s.C, axis="i")
print(s.module)

# %%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, we create a new buffer for the output tensor ``C``.\nWe provide a ``.buffer_at()`` primitive for users to quickly create a new buffer\nalong a specific axis. Since Allo has attached all the tensors to the function,\nwe can directly use ``<func>.<tensor>`` to access a specific tensor in the schedule.\n\n"
"Next, we create a new buffer for the output tensor ``C``.\nWe provide a ``.buffer_at()`` primitive for users to quickly create a new buffer\nalong a specific axis. Since Allo has attached all the tensors to the function,\nwe can directly use ``<schedule>.<tensor>`` to access a specific tensor in the schedule.\n\n"
]
},
{
Expand All @@ -112,7 +112,7 @@
},
"outputs": [],
"source": [
"s.buffer_at(gemm.C, axis=\"i\")\nprint(s.module)"
"s.buffer_at(s.C, axis=\"i\")\nprint(s.module)"
]
},
{
Expand Down Expand Up @@ -214,7 +214,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.1"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.1"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down
18 changes: 8 additions & 10 deletions _sources/gallery/developer_01_ir_builder.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ addition example to demonstrate the process.

.. GENERATED FROM PYTHON SOURCE LINES 14-18
.. code-block:: default
.. code-block:: Python
import allo
Expand All @@ -54,7 +54,7 @@ step is to parse the Python code to the

.. GENERATED FROM PYTHON SOURCE LINES 26-37
.. code-block:: default
.. code-block:: Python
M, N = 1024, 1024
Expand Down Expand Up @@ -84,7 +84,7 @@ an API to access the source code of a Python function. We can call

.. GENERATED FROM PYTHON SOURCE LINES 43-49
.. code-block:: default
.. code-block:: Python
import inspect
Expand Down Expand Up @@ -120,7 +120,7 @@ be installed through ``pip`` separately. Otherwise, you can just use

.. GENERATED FROM PYTHON SOURCE LINES 55-61
.. code-block:: default
.. code-block:: Python
import ast, astpretty
Expand Down Expand Up @@ -255,6 +255,7 @@ be installed through ``pip`` separately. Otherwise, you can just use
ctx=Load(),
),
type_comment=None,
type_params=[],
),
],
type_ignores=[],
Expand Down Expand Up @@ -409,7 +410,7 @@ you can follow the definitions and add more amazing facilities to the new Allo f

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.006 seconds)
**Total running time of the script:** (0 minutes 0.012 seconds)


.. _sphx_glr_download_gallery_developer_01_ir_builder.py:
Expand All @@ -418,17 +419,14 @@ you can follow the definitions and add more amazing facilities to the new Allo f

.. container:: sphx-glr-footer sphx-glr-footer-example

.. container:: sphx-glr-download sphx-glr-download-jupyter


:download:`Download Jupyter notebook: developer_01_ir_builder.ipynb <developer_01_ir_builder.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: developer_01_ir_builder.py <developer_01_ir_builder.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: developer_01_ir_builder.ipynb <developer_01_ir_builder.ipynb>`


.. only:: html

Expand Down
35 changes: 16 additions & 19 deletions _sources/gallery/developer_02_mlir.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ verify the correctness of a handwritten or generated MLIR program.

.. GENERATED FROM PYTHON SOURCE LINES 13-17
.. code-block:: default
.. code-block:: Python
import allo
Expand Down Expand Up @@ -56,7 +56,7 @@ for specific backends.

.. GENERATED FROM PYTHON SOURCE LINES 28-40
.. code-block:: default
.. code-block:: Python
test_mlir_program = """
Expand Down Expand Up @@ -90,7 +90,7 @@ program.

.. GENERATED FROM PYTHON SOURCE LINES 48-52
.. code-block:: default
.. code-block:: Python
mod = allo.invoke_mlir_parser(test_mlir_program)
Expand All @@ -106,11 +106,11 @@ program.
module {
func.func @matmul(%arg0: memref<32x32xi32>, %arg1: memref<32x32xi32>) -> memref<32x32xi32> {
%0 = memref.alloc() : memref<32x32xi32>
%alloc = memref.alloc() : memref<32x32xi32>
%c0_i32 = arith.constant 0 : i32
linalg.fill ins(%c0_i32 : i32) outs(%0 : memref<32x32xi32>)
linalg.matmul ins(%arg0, %arg1 : memref<32x32xi32>, memref<32x32xi32>) outs(%0 : memref<32x32xi32>)
return %0 : memref<32x32xi32>
linalg.fill ins(%c0_i32 : i32) outs(%alloc : memref<32x32xi32>)
linalg.matmul ins(%arg0, %arg1 : memref<32x32xi32>, memref<32x32xi32>) outs(%alloc : memref<32x32xi32>)
return %alloc : memref<32x32xi32>
}
}
Expand Down Expand Up @@ -160,7 +160,7 @@ Then we can directly invoke the module with random inputs, and see if the result

.. GENERATED FROM PYTHON SOURCE LINES 90-97
.. code-block:: default
.. code-block:: Python
llvm_mod = allo.LLVMModule(mod, "matmul")
Expand Down Expand Up @@ -205,7 +205,7 @@ shows an example of how to use the tensor dialect to define a matmul program:

.. GENERATED FROM PYTHON SOURCE LINES 121-135
.. code-block:: default
.. code-block:: Python
tensor_program = """
Expand Down Expand Up @@ -236,7 +236,7 @@ Again, we can invoke the MLIR parser to check if the program is valid.

.. GENERATED FROM PYTHON SOURCE LINES 139-143
.. code-block:: default
.. code-block:: Python
mod = allo.invoke_mlir_parser(tensor_program)
Expand All @@ -252,13 +252,13 @@ Again, we can invoke the MLIR parser to check if the program is valid.
module {
func.func @matmul(%arg0: tensor<32x32xi32>, %arg1: tensor<32x32xi32>) -> tensor<32x32xi32> {
%0 = tensor.generate {
%generated = tensor.generate {
^bb0(%arg2: index, %arg3: index):
%c0_i32 = arith.constant 0 : i32
tensor.yield %c0_i32 : i32
} : tensor<32x32xi32>
%1 = linalg.matmul ins(%arg0, %arg1 : tensor<32x32xi32>, tensor<32x32xi32>) outs(%0 : tensor<32x32xi32>) -> tensor<32x32xi32>
return %1 : tensor<32x32xi32>
%0 = linalg.matmul ins(%arg0, %arg1 : tensor<32x32xi32>, tensor<32x32xi32>) outs(%generated : tensor<32x32xi32>) -> tensor<32x32xi32>
return %0 : tensor<32x32xi32>
}
}
Expand Down Expand Up @@ -289,7 +289,7 @@ the lowering pass from tensor dialect to LLVM dialect, and that is something we

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.095 seconds)
**Total running time of the script:** (0 minutes 0.058 seconds)


.. _sphx_glr_download_gallery_developer_02_mlir.py:
Expand All @@ -298,17 +298,14 @@ the lowering pass from tensor dialect to LLVM dialect, and that is something we

.. container:: sphx-glr-footer sphx-glr-footer-example

.. container:: sphx-glr-download sphx-glr-download-jupyter


:download:`Download Jupyter notebook: developer_02_mlir.ipynb <developer_02_mlir.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: developer_02_mlir.py <developer_02_mlir.py>`

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: developer_02_mlir.ipynb <developer_02_mlir.ipynb>`


.. only:: html

Expand Down
49 changes: 38 additions & 11 deletions _sources/gallery/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,41 @@

Computation times
=================
**00:00.307** total execution time for **gallery** files:

+-------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_gallery_tutorial_01_get_started.py` (``tutorial_01_get_started.py``) | 00:00.105 | 0.0 MB |
+-------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_gallery_tutorial_02_vhls.py` (``tutorial_02_vhls.py``) | 00:00.100 | 0.0 MB |
+-------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_gallery_developer_02_mlir.py` (``developer_02_mlir.py``) | 00:00.095 | 0.0 MB |
+-------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_gallery_developer_01_ir_builder.py` (``developer_01_ir_builder.py``) | 00:00.006 | 0.0 MB |
+-------------------------------------------------------------------------------------+-----------+--------+
**00:00.608** total execution time for 4 files **from gallery**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_gallery_tutorial_02_vhls.py` (``tutorial_02_vhls.py``)
- 00:00.309
- 0.0
* - :ref:`sphx_glr_gallery_tutorial_01_get_started.py` (``tutorial_01_get_started.py``)
- 00:00.228
- 0.0
* - :ref:`sphx_glr_gallery_developer_02_mlir.py` (``developer_02_mlir.py``)
- 00:00.058
- 0.0
* - :ref:`sphx_glr_gallery_developer_01_ir_builder.py` (``developer_01_ir_builder.py``)
- 00:00.012
- 0.0
Loading

0 comments on commit de5b5da

Please sign in to comment.