Skip to content

Commit af54df5

Browse files
authored
Documentation touchups to README and package files. (#621)
Miscellaneous changes found from scanning some of the files. More to come, especially with the `shark-turbine` -> `iree-turbine` switch in progress. --- The `__init__.py` changes add descriptions when using `help()` in Python, e.g. ```python >>> help(iree.turbine) Help on package iree.turbine in iree: NAME iree.turbine DESCRIPTION The turbine package provides development tools for deploying PyTorch 2 machine learning models to cloud and edge devices. ``` ```python >>> import shark_turbine.aot as aot >>> help(aot) Help on package shark_turbine.aot in shark_turbine: NAME shark_turbine.aot - Toolkit for ahead-of-time (AOT) compilation and export of PyTorch programs. PACKAGE CONTENTS builtins (package) compiled_module decompositions exporter fx_programs params passes (package) tensor_traits ``` Without those changes, packages include the license header 🤦 ```python DESCRIPTION # Copyright 2023 Nod Labs, Inc # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ```
1 parent d1cd92f commit af54df5

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# SHARK Turbine
2+
23
![image](https://netl.doe.gov/sites/default/files/2020-11/Turbine-8412270026_83cfc8ee8f_c.jpg)
34

45
Turbine is the set of development tools that the [SHARK Team](https://github.com/nod-ai/SHARK)
56
is building for deploying all of our models for deployment to the cloud and devices. We
6-
are building it as we transition from our TorchScript-era 1-off export and compilation
7-
to a unified approach based on PyTorch 2 and Dynamo. While we use it heavily ourselves, it
7+
are building it as we transition from our TorchScript-era 1-off export and compilation
8+
to a unified approach based on PyTorch 2 and Dynamo. While we use it heavily ourselves, it
89
is intended to be a general purpose model compilation and execution tool.
910

10-
Turbine provides three primary tools:
11+
Turbine provides a collection of tools:
1112

1213
* *AOT Export*: For compiling one or more `nn.Module`s to compiled, deployment
1314
ready artifacts. This operates via both a simple one-shot export API (Already upstreamed to [torch-mlir](https://github.com/llvm/torch-mlir/blob/main/python/torch_mlir/extras/fx_importer.py))
@@ -20,6 +21,8 @@ Turbine provides three primary tools:
2021
native PyTorch constructs and tracing. It is intended to complement for simple
2122
cases where direct emission to the underlying, cross platform, vector programming model
2223
is desirable.
24+
* *Turbine-LLM*: a repository of layers, model recipes, and conversion tools
25+
from popular Large Language Model (LLM) quantization tooling.
2326

2427
Under the covers, Turbine is based heavily on [IREE](https://github.com/openxla/iree) and
2528
[torch-mlir](https://github.com/llvm/torch-mlir) and we use it to drive evolution
@@ -30,7 +33,7 @@ See [the roadmap](docs/roadmap.md) for upcoming work and places to contribute.
3033
## Contact Us
3134

3235
Turbine is under active development. If you would like to participate as it comes online,
33-
please reach out to us on the `#turbine` channel of the
36+
please reach out to us on the `#turbine` channel of the
3437
[nod-ai Discord server](https://discord.gg/QMmR6f8rGb).
3538

3639
## Quick Start for Users
@@ -53,7 +56,7 @@ pip install shark-turbine
5356

5457
2. Try one of the samples:
5558

56-
Generally, we use Turbine to produce valid, dynamic shaped Torch IR (from the
59+
Generally, we use Turbine to produce valid, dynamic shaped Torch IR (from the
5760
[`torch-mlir torch` dialect](https://github.com/llvm/torch-mlir/tree/main/include/torch-mlir/Dialect/Torch/IR)
5861
with various approaches to handling globals). Depending on the use-case and status of the
5962
compiler, these should be compilable via IREE with `--iree-input-type=torch` for
@@ -102,8 +105,8 @@ If doing native development of the compiler, it can be useful to switch to
102105
source builds for iree-compiler and iree-runtime.
103106

104107
In order to do this, check out [IREE](https://github.com/openxla/iree) and
105-
follow the instructions to [build from source](https://openxla.github.io/iree/building-from-source/getting-started/#configuration-settings), making
106-
sure to specify [additional options](https://openxla.github.io/iree/building-from-source/getting-started/#building-with-cmake):
108+
follow the instructions to [build from source](https://iree.dev/building-from-source/getting-started/), making
109+
sure to specify [additional options for the Python bindings](https://iree.dev/building-from-source/getting-started/#building-with-cmake):
107110

108111
```
109112
-DIREE_BUILD_PYTHON_BINDINGS=ON -DPython3_EXECUTABLE="$(which python)"
@@ -117,6 +120,7 @@ Uninstall existing packages:
117120
pip uninstall iree-compiler
118121
pip uninstall iree-runtime
119122
```
123+
120124
Copy the `.env` file from `iree/` to this source directory to get IDE
121125
support and add to your path for use from your shell:
122126

core/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Turbine-Core Sub-Project
22

3-
This directory contains the core infrastructure for the project, sonsisting
3+
This directory contains the core infrastructure for the project, consisting
44
of the model export, runtime, and kernel development APIs. It is packaged
5-
and released as the
6-
[`SHARK-Turbine` project on PyPi](https://pypi.org/project/shark-turbine/).
5+
and released as the
6+
[`iree-turbine` project on PyPI](https://pypi.org/project/iree-turbine/)
7+
(previously [`SHARK-Turbine`](https://pypi.org/project/shark-turbine/)).
78

89
It depends purely on PyTorch and the IREE compiler/runtime.
910

core/iree/turbine/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
The turbine package provides development tools for deploying PyTorch 2 machine
3+
learning models to cloud and edge devices.
4+
"""
5+
16
# Copyright 2024 Advanced Micro Devices, Inc.
27
#
38
# Licensed under the Apache License v2.0 with LLVM Exceptions.

core/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Stella Laurenzo
1+
# Copyright 2023 Advanced Micro Devices, Inc.
22
#
33
# Licensed under the Apache License v2.0 with LLVM Exceptions.
44
# See https://llvm.org/LICENSE.txt for license information.

core/shark_turbine/aot/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Toolkit for ahead-of-time (AOT) compilation and export of PyTorch programs.
3+
"""
4+
15
# Copyright 2023 Nod Labs, Inc
26
#
37
# Licensed under the Apache License v2.0 with LLVM Exceptions.

0 commit comments

Comments
 (0)