diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..8e54c2ce4 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,64 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +concurrency: + # A PR number if a pull request and otherwise the commit hash. This cancels + # queued and in-progress runs for the same PR (presubmit) or commit + # (postsubmit). The workflow name is prepended to avoid conflicts between + # different workflows. + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + test: + name: "Unit Tests and Type Checking" + strategy: + matrix: + version: [3.11] + os: [ubuntu-latest] + runs-on: ${{matrix.os}} + env: + PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" + steps: + - name: "Setting up Python" + id: setup_python + uses: actions/setup-python@v3 + with: + python-version: ${{matrix.version}} + + - name: "Checkout Code" + uses: actions/checkout@v3 + + - name: Cache Pip Packages + uses: actions/cache@v4 + id: cache-pip + with: + path: ${{ env.PIP_CACHE_DIR }} + key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }} + + - name: Install pip deps + run: | + python -m pip install --no-compile --upgrade pip + # Note: We install in three steps in order to satisfy requirements + # from non default locations first. Installing the PyTorch CPU + # wheels saves multiple minutes and a lot of bandwidth on runner setup. + pip install --no-compile -r pytorch-cpu-requirements.txt + pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \ + -e "git+https://github.com/nod-ai/SHARK-Turbine.git#egg=SHARK-Turbine&subdirectory=core" + pip install --no-compile -r requirements.txt -e . + + - name: Run unit tests + if: ${{ !cancelled() }} + run: | + pytest -n 4 . + + - name: MyPy Type Checking + if: ${{ !cancelled() }} + run: | + mypy diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 000000000..2b11178bf --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..b766af2d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Visual Studio files +.env +.vs/ +.vscode/ +*.sdf +*.opensdf +*.VC.opendb +*.suo +*.user + +# macOS files +.DS_Store + +# CMake artifacts +build/ +build-*/ + +# Python +__pycache__ +_python_build/ +deps/ +dist/ +wheelhouse +*.egg-info +*.whl +*.venv + +#Model artifacts +*.pt +*.safetensors +*.gguf +*.vmfb diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..8c682da53 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..7d9b66230 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# How to contribute + +We'd love to accept your patches and contributions to this project. + +To get started with contributing, please take a look at the +[Contributing](https://iree.dev/developers/general/contributing/) guide. + +## Getting in touch + +* [GitHub issues](https://github.com/iree-org/iree/issues): Feature requests, + bugs, and other work tracking +* [IREE Discord server](https://discord.gg/wEWh6Z9nMU): Daily development + discussions with the core team and collaborators +* [iree-discuss email list](https://groups.google.com/forum/#!forum/iree-discuss): + Announcements, general and low-priority discussion + +## Community guidelines + +This project follows the +[OpenXLA Code of Conduct](https://github.com/openxla/community/blob/main/CODE-OF-CONDUCT.md). diff --git a/README.md b/README.md index 42e8019dc..6ae56cd86 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,7 @@ ![image](https://netl.doe.gov/sites/default/files/2020-11/Turbine-8412270026_83cfc8ee8f_c.jpg) -Turbine is the set of development tools that the [SHARK Team](https://github.com/nod-ai/SHARK) -is building for deploying all of our models for deployment to the cloud and devices. We -are building it as we transition from our TorchScript-era 1-off export and compilation -to a unified approach based on PyTorch 2 and Dynamo. While we use it heavily ourselves, it -is intended to be a general purpose model compilation and execution tool. +Turbine is IREE's frontend for PyTorch. Turbine provides a collection of tools: @@ -21,20 +17,12 @@ Turbine provides a collection of tools: native PyTorch constructs and tracing. It is intended to complement for simple cases where direct emission to the underlying, cross platform, vector programming model is desirable. -* *Turbine-LLM*: a repository of layers, model recipes, and conversion tools - from popular Large Language Model (LLM) quantization tooling. - -Under the covers, Turbine is based heavily on [IREE](https://github.com/openxla/iree) and -[torch-mlir](https://github.com/llvm/torch-mlir) and we use it to drive evolution -of both, upstreaming infrastructure as it becomes timely to do so. - -See [the roadmap](docs/roadmap.md) for upcoming work and places to contribute. ## Contact Us -Turbine is under active development. If you would like to participate as it comes online, -please reach out to us on the `#turbine` channel of the -[nod-ai Discord server](https://discord.gg/QMmR6f8rGb). +Turbine is under active development. Feel free to reach out on one of +[IREE's communication channels](https://github.com/iree-org/iree?tab=readme-ov-file#communication-channels) (specifically, we monitor the +#pytorch channel on the IREE Discord server). ## Quick Start for Users @@ -48,7 +36,7 @@ pip install shark-turbine The above does install some unecessary cuda/cudnn packages for cpu use. To avoid this you can specify pytorch-cpu and install via: ``` -pip install -r core/pytorch-cpu-requirements.txt +pip install -r pytorch-cpu-requirements.txt pip install shark-turbine ``` @@ -63,42 +51,65 @@ compiler, these should be compilable via IREE with `--iree-input-type=torch` for end to end execution. Dynamic shape support in torch-mlir is a work in progress, and not everything works at head with release binaries at present. - * [AOT MLP With Static Shapes](https://github.com/nod-ai/SHARK-Turbine/blob/main/core/examples/aot_mlp/mlp_export_simple.py) - * [AOT MLP with a dynamic batch size](https://github.com/nod-ai/SHARK-Turbine/blob/main/core/examples/aot_mlp/mlp_export_dynamic.py) - * [AOT llama2](https://github.com/nod-ai/SHARK-Turbine/blob/main/core/examples/llama2_inference/llama2.ipynb): + * [AOT MLP With Static Shapes](examples/aot_mlp/mlp_export_simple.py) + * [AOT MLP with a dynamic batch size](examples/aot_mlp/mlp_export_dynamic.py) + * [AOT llama2](examples/llama2_inference/llama2.ipynb): Dynamic sequence length custom compiled module with state management internal to the model. - * [Eager MNIST with `torch.compile`](https://github.com/nod-ai/SHARK-Turbine/blob/main/core/examples/eager_mlp/mlp_eager_simple.py) + * [Eager MNIST with `torch.compile`](examples/eager_mlp/mlp_eager_simple.py) ## Developers -### Getting Up and Running +Use this as a guide to get started developing the project using pinned, +pre-release dependencies. You are welcome to deviate as you see fit, but +these canonical directions mirror what the CI does. + +### Setup a venv + +We recommend setting up a virtual environment (venv). The project is configured +to ignore `.venv` directories, and editors like VSCode pick them up by default. + +``` +python -m venv --prompt iree-turbine .venv +source .venv/bin/activate +``` + +### Install PyTorch for Your System -If only looking to develop against this project, then you need to install Python -deps for the following: +If no explicit action is taken, the default PyTorch version will be installed. +This will give you a current CUDA-based version. Install a different variant +by doing so explicitly first: -* PyTorch -* iree-compiler (with Torch input support) -* iree-runtime +*CPU:* -The pinned deps at HEAD require pre-release versions of all of the above, and -therefore require additional pip flags to install. Therefore, to satisfy -development, we provide a `requirements.txt` file which installs precise -versions and has all flags. This can be installed prior to the package: +``` +pip install -r pytorch-cpu-requirements.txt +``` + +*ROCM:* + +``` +pip install -r pytorch-rocm-requirements.txt +``` -Installing into a venv is highly recommended. +### Install Development Packages ``` -pip install -r core/pytorch-cpu-requirements.txt -pip install --upgrade -r core/requirements.txt -pip install --upgrade -e "core[torch-cpu-nightly,testing]" +# Install editable local projects. +pip install -r requirements -e . ``` -Run tests: +### Running Tests ``` -pytest core/ +pytest . ``` +### Optional: Pre-commits and developer settings + +This project is set up to use the `pre-commit` tooling. To install it in +your local repo, run: `pre-commit install`. After this point, when making +commits locally, hooks will run. See https://pre-commit.com/ + ### Using a development compiler If doing native development of the compiler, it can be useful to switch to diff --git a/core/README.md b/core/README.md deleted file mode 100644 index 52c232d9b..000000000 --- a/core/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Turbine-Core Sub-Project - -This directory contains the core infrastructure for the project, consisting -of the model export, runtime, and kernel development APIs. It is packaged -and released as the -[`iree-turbine` project on PyPI](https://pypi.org/project/iree-turbine/) -(previously [`SHARK-Turbine`](https://pypi.org/project/shark-turbine/)). - -It depends purely on PyTorch and the IREE compiler/runtime. - -See the repository-level README for further information. diff --git a/core/misc-requirements.txt b/core/misc-requirements.txt deleted file mode 100644 index becb775f9..000000000 --- a/core/misc-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -numpy>=1.26.3 -onnx>=1.15.0 -pytest>=8.0.0 -pytest-xdist>=3.5.0 diff --git a/core/pytorch-requirements.txt b/core/pytorch-requirements.txt deleted file mode 100644 index 63fc21602..000000000 --- a/core/pytorch-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -torch==2.3.0 -torchaudio -torchvision diff --git a/core/requirements.txt b/core/requirements.txt deleted file mode 100644 index 8fe18be63..000000000 --- a/core/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -# These requirements are here for one-stop development -# setup with pinned deps and will fulfill all install -# requirements for the package (which pins to minimum -# versions, not specific). --f https://iree.dev/pip-release-links.html - --r pytorch-requirements.txt --r iree-requirements.txt - -# From pyproject.toml. -setuptools -wheel diff --git a/core/examples/aot_mlp/mlp_export_dynamic.py b/examples/aot_mlp/mlp_export_dynamic.py similarity index 100% rename from core/examples/aot_mlp/mlp_export_dynamic.py rename to examples/aot_mlp/mlp_export_dynamic.py diff --git a/core/examples/aot_mlp/mlp_export_simple.py b/examples/aot_mlp/mlp_export_simple.py similarity index 100% rename from core/examples/aot_mlp/mlp_export_simple.py rename to examples/aot_mlp/mlp_export_simple.py diff --git a/core/examples/eager_mlp/mlp_eager_simple.py b/examples/eager_mlp/mlp_eager_simple.py similarity index 100% rename from core/examples/eager_mlp/mlp_eager_simple.py rename to examples/eager_mlp/mlp_eager_simple.py diff --git a/core/examples/llama2_inference/README.md b/examples/llama2_inference/README.md similarity index 100% rename from core/examples/llama2_inference/README.md rename to examples/llama2_inference/README.md diff --git a/core/examples/llama2_inference/llama2.ipynb b/examples/llama2_inference/llama2.ipynb similarity index 100% rename from core/examples/llama2_inference/llama2.ipynb rename to examples/llama2_inference/llama2.ipynb diff --git a/core/examples/llama2_inference/llama2_state_schema.json b/examples/llama2_inference/llama2_state_schema.json similarity index 100% rename from core/examples/llama2_inference/llama2_state_schema.json rename to examples/llama2_inference/llama2_state_schema.json diff --git a/core/examples/llama2_inference/requirements.txt b/examples/llama2_inference/requirements.txt similarity index 100% rename from core/examples/llama2_inference/requirements.txt rename to examples/llama2_inference/requirements.txt diff --git a/core/examples/resnet-18/README.md b/examples/resnet-18/README.md similarity index 100% rename from core/examples/resnet-18/README.md rename to examples/resnet-18/README.md diff --git a/core/examples/resnet-18/requirements.txt b/examples/resnet-18/requirements.txt similarity index 100% rename from core/examples/resnet-18/requirements.txt rename to examples/resnet-18/requirements.txt diff --git a/core/examples/resnet-18/resnet-18.py b/examples/resnet-18/resnet-18.py similarity index 100% rename from core/examples/resnet-18/resnet-18.py rename to examples/resnet-18/resnet-18.py diff --git a/core/iree-requirements.txt b/iree-requirements.txt similarity index 100% rename from core/iree-requirements.txt rename to iree-requirements.txt diff --git a/core/iree/turbine/__init__.py b/iree/turbine/__init__.py similarity index 100% rename from core/iree/turbine/__init__.py rename to iree/turbine/__init__.py diff --git a/mypy-requirements.txt b/mypy-requirements.txt deleted file mode 100644 index f2484e486..000000000 --- a/mypy-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Typing packages needed for full mypy execution at the project level. -mypy==1.8.0 -types-requests diff --git a/core/mypy.ini b/mypy.ini similarity index 100% rename from core/mypy.ini rename to mypy.ini diff --git a/core/pyproject.toml b/pyproject.toml similarity index 100% rename from core/pyproject.toml rename to pyproject.toml diff --git a/core/pytorch-cpu-requirements.txt b/pytorch-cpu-requirements.txt similarity index 62% rename from core/pytorch-cpu-requirements.txt rename to pytorch-cpu-requirements.txt index e4fa5c795..c7f8e8ce0 100644 --- a/core/pytorch-cpu-requirements.txt +++ b/pytorch-cpu-requirements.txt @@ -1,3 +1,5 @@ --pre --index-url https://download.pytorch.org/whl/test/cpu --r pytorch-requirements.txt +torch==2.3.0 +torchaudio +torchvision diff --git a/pytorch-rocm-requirements.txt b/pytorch-rocm-requirements.txt new file mode 100644 index 000000000..5c43013fd --- /dev/null +++ b/pytorch-rocm-requirements.txt @@ -0,0 +1,7 @@ +--pre +--index-url https://download.pytorch.org/whl/nightly/rocm6.0 +# TODO: PyTorch ROCM doesn't seem to have a 2.3 RC published, so we just +# get a nightly. +torch>=2.3.0.dev1,<2.4 +torchaudio +torchvision diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..b70793240 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +numpy==1.26.3 +pytest==8.0.0 +pytest-xdist==3.5.0 +mypy==1.8.0 + +# It is expected that you have installed a PyTorch version/variant specific +# to your needs, so we only include a minimum version spec. +# TODO: Use a versioned release once 2.3.0 drops. +torch>=2.3.0.dev1 +torchaudio +torchvision + +# Used for managing pre-commit flows. +pre-commit diff --git a/core/setup.cfg b/setup.cfg similarity index 100% rename from core/setup.cfg rename to setup.cfg diff --git a/core/setup.py b/setup.py similarity index 82% rename from core/setup.py rename to setup.py index e8bb08f8d..5071c5c48 100644 --- a/core/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import find_namespace_packages, setup THIS_DIR = os.path.realpath(os.path.dirname(__file__)) -REPO_DIR = os.path.dirname(THIS_DIR) +REPO_DIR = THIS_DIR VERSION_INFO_FILE = os.path.join(REPO_DIR, "version_info.json") # Transitional as we migrate from shark-turbine -> iree-turbine. @@ -58,9 +58,7 @@ def load_requirement_pins(requirements_file: str): requirement_pins.update(dict(pin_pairs)) -load_requirement_pins("iree-requirements.txt") -load_requirement_pins("misc-requirements.txt") -load_requirement_pins("pytorch-cpu-requirements.txt") +load_requirement_pins("requirements.txt") def get_version_spec(dep: str): @@ -105,19 +103,10 @@ def initialize_options(self): f"numpy{get_version_spec('numpy')}", f"iree-compiler{get_version_spec('iree-compiler')}", f"iree-runtime{get_version_spec('iree-runtime')}", - # Use the [torch-cpu-nightly] spec to get a more recent/specific version. - # Note that during the transition to torch 2.3.0 we technically support - # back to torch 2.1, which is why we pin here in this way. However, - # the CI tests on 2.3. - "torch>=2.1.0", + "torch>=2.3.0", ], extras_require={ - "torch-cpu-nightly": [f"torch{get_version_spec('torch')}"], - "onnx": [ - f"onnx{get_version_spec('onnx')}", - ], "testing": [ - f"onnx{get_version_spec('onnx')}", f"pytest{get_version_spec('pytest')}", f"pytest-xdist{get_version_spec('pytest-xdist')}", ], diff --git a/core/shark_turbine/aot/__init__.py b/shark_turbine/aot/__init__.py similarity index 100% rename from core/shark_turbine/aot/__init__.py rename to shark_turbine/aot/__init__.py diff --git a/core/shark_turbine/aot/builtins/__init__.py b/shark_turbine/aot/builtins/__init__.py similarity index 100% rename from core/shark_turbine/aot/builtins/__init__.py rename to shark_turbine/aot/builtins/__init__.py diff --git a/core/shark_turbine/aot/builtins/globals.py b/shark_turbine/aot/builtins/globals.py similarity index 100% rename from core/shark_turbine/aot/builtins/globals.py rename to shark_turbine/aot/builtins/globals.py diff --git a/core/shark_turbine/aot/builtins/jittable.py b/shark_turbine/aot/builtins/jittable.py similarity index 100% rename from core/shark_turbine/aot/builtins/jittable.py rename to shark_turbine/aot/builtins/jittable.py diff --git a/core/shark_turbine/aot/compiled_module.py b/shark_turbine/aot/compiled_module.py similarity index 100% rename from core/shark_turbine/aot/compiled_module.py rename to shark_turbine/aot/compiled_module.py diff --git a/core/shark_turbine/aot/decompositions.py b/shark_turbine/aot/decompositions.py similarity index 100% rename from core/shark_turbine/aot/decompositions.py rename to shark_turbine/aot/decompositions.py diff --git a/core/shark_turbine/aot/exporter.py b/shark_turbine/aot/exporter.py similarity index 100% rename from core/shark_turbine/aot/exporter.py rename to shark_turbine/aot/exporter.py diff --git a/core/shark_turbine/aot/fx_programs.py b/shark_turbine/aot/fx_programs.py similarity index 100% rename from core/shark_turbine/aot/fx_programs.py rename to shark_turbine/aot/fx_programs.py diff --git a/core/shark_turbine/aot/params.py b/shark_turbine/aot/params.py similarity index 100% rename from core/shark_turbine/aot/params.py rename to shark_turbine/aot/params.py diff --git a/core/shark_turbine/aot/passes/__init__.py b/shark_turbine/aot/passes/__init__.py similarity index 100% rename from core/shark_turbine/aot/passes/__init__.py rename to shark_turbine/aot/passes/__init__.py diff --git a/core/shark_turbine/aot/passes/functorch.py b/shark_turbine/aot/passes/functorch.py similarity index 100% rename from core/shark_turbine/aot/passes/functorch.py rename to shark_turbine/aot/passes/functorch.py diff --git a/core/shark_turbine/aot/support/ir_utils.py b/shark_turbine/aot/support/ir_utils.py similarity index 100% rename from core/shark_turbine/aot/support/ir_utils.py rename to shark_turbine/aot/support/ir_utils.py diff --git a/core/shark_turbine/aot/support/procedural/__init__.py b/shark_turbine/aot/support/procedural/__init__.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/__init__.py rename to shark_turbine/aot/support/procedural/__init__.py diff --git a/core/shark_turbine/aot/support/procedural/base.py b/shark_turbine/aot/support/procedural/base.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/base.py rename to shark_turbine/aot/support/procedural/base.py diff --git a/core/shark_turbine/aot/support/procedural/exported_program.py b/shark_turbine/aot/support/procedural/exported_program.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/exported_program.py rename to shark_turbine/aot/support/procedural/exported_program.py diff --git a/core/shark_turbine/aot/support/procedural/globals.py b/shark_turbine/aot/support/procedural/globals.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/globals.py rename to shark_turbine/aot/support/procedural/globals.py diff --git a/core/shark_turbine/aot/support/procedural/iree_emitter.py b/shark_turbine/aot/support/procedural/iree_emitter.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/iree_emitter.py rename to shark_turbine/aot/support/procedural/iree_emitter.py diff --git a/core/shark_turbine/aot/support/procedural/primitives.py b/shark_turbine/aot/support/procedural/primitives.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/primitives.py rename to shark_turbine/aot/support/procedural/primitives.py diff --git a/core/shark_turbine/aot/support/procedural/tracer.py b/shark_turbine/aot/support/procedural/tracer.py similarity index 100% rename from core/shark_turbine/aot/support/procedural/tracer.py rename to shark_turbine/aot/support/procedural/tracer.py diff --git a/core/shark_turbine/aot/tensor_traits.py b/shark_turbine/aot/tensor_traits.py similarity index 100% rename from core/shark_turbine/aot/tensor_traits.py rename to shark_turbine/aot/tensor_traits.py diff --git a/core/shark_turbine/dynamo/__init__.py b/shark_turbine/dynamo/__init__.py similarity index 100% rename from core/shark_turbine/dynamo/__init__.py rename to shark_turbine/dynamo/__init__.py diff --git a/core/shark_turbine/dynamo/backends/cpu.py b/shark_turbine/dynamo/backends/cpu.py similarity index 100% rename from core/shark_turbine/dynamo/backends/cpu.py rename to shark_turbine/dynamo/backends/cpu.py diff --git a/core/shark_turbine/dynamo/decompositions.py b/shark_turbine/dynamo/decompositions.py similarity index 100% rename from core/shark_turbine/dynamo/decompositions.py rename to shark_turbine/dynamo/decompositions.py diff --git a/core/shark_turbine/dynamo/executor.py b/shark_turbine/dynamo/executor.py similarity index 100% rename from core/shark_turbine/dynamo/executor.py rename to shark_turbine/dynamo/executor.py diff --git a/core/shark_turbine/dynamo/passes.py b/shark_turbine/dynamo/passes.py similarity index 100% rename from core/shark_turbine/dynamo/passes.py rename to shark_turbine/dynamo/passes.py diff --git a/core/shark_turbine/dynamo/tensor.py b/shark_turbine/dynamo/tensor.py similarity index 100% rename from core/shark_turbine/dynamo/tensor.py rename to shark_turbine/dynamo/tensor.py diff --git a/core/shark_turbine/dynamo/type_conversion.py b/shark_turbine/dynamo/type_conversion.py similarity index 100% rename from core/shark_turbine/dynamo/type_conversion.py rename to shark_turbine/dynamo/type_conversion.py diff --git a/core/shark_turbine/importers/README.md b/shark_turbine/importers/README.md similarity index 100% rename from core/shark_turbine/importers/README.md rename to shark_turbine/importers/README.md diff --git a/core/shark_turbine/importers/ir.py b/shark_turbine/importers/ir.py similarity index 100% rename from core/shark_turbine/importers/ir.py rename to shark_turbine/importers/ir.py diff --git a/core/shark_turbine/importers/utils.py b/shark_turbine/importers/utils.py similarity index 100% rename from core/shark_turbine/importers/utils.py rename to shark_turbine/importers/utils.py diff --git a/core/shark_turbine/kernel/__init__.py b/shark_turbine/kernel/__init__.py similarity index 100% rename from core/shark_turbine/kernel/__init__.py rename to shark_turbine/kernel/__init__.py diff --git a/core/shark_turbine/kernel/_support/context.py b/shark_turbine/kernel/_support/context.py similarity index 100% rename from core/shark_turbine/kernel/_support/context.py rename to shark_turbine/kernel/_support/context.py diff --git a/core/shark_turbine/kernel/_support/dtype.py b/shark_turbine/kernel/_support/dtype.py similarity index 100% rename from core/shark_turbine/kernel/_support/dtype.py rename to shark_turbine/kernel/_support/dtype.py diff --git a/core/shark_turbine/kernel/_support/indexing.py b/shark_turbine/kernel/_support/indexing.py similarity index 100% rename from core/shark_turbine/kernel/_support/indexing.py rename to shark_turbine/kernel/_support/indexing.py diff --git a/core/shark_turbine/kernel/_support/regions.py b/shark_turbine/kernel/_support/regions.py similarity index 100% rename from core/shark_turbine/kernel/_support/regions.py rename to shark_turbine/kernel/_support/regions.py diff --git a/core/shark_turbine/kernel/_support/shaped_type.py b/shark_turbine/kernel/_support/shaped_type.py similarity index 100% rename from core/shark_turbine/kernel/_support/shaped_type.py rename to shark_turbine/kernel/_support/shaped_type.py diff --git a/core/shark_turbine/kernel/_support/tracing.py b/shark_turbine/kernel/_support/tracing.py similarity index 100% rename from core/shark_turbine/kernel/_support/tracing.py rename to shark_turbine/kernel/_support/tracing.py diff --git a/core/shark_turbine/kernel/compiler/base.py b/shark_turbine/kernel/compiler/base.py similarity index 100% rename from core/shark_turbine/kernel/compiler/base.py rename to shark_turbine/kernel/compiler/base.py diff --git a/core/shark_turbine/kernel/compiler/builder.py b/shark_turbine/kernel/compiler/builder.py similarity index 100% rename from core/shark_turbine/kernel/compiler/builder.py rename to shark_turbine/kernel/compiler/builder.py diff --git a/core/shark_turbine/kernel/compiler/dispatch_codegen.py b/shark_turbine/kernel/compiler/dispatch_codegen.py similarity index 100% rename from core/shark_turbine/kernel/compiler/dispatch_codegen.py rename to shark_turbine/kernel/compiler/dispatch_codegen.py diff --git a/core/shark_turbine/kernel/compiler/host_codegen.py b/shark_turbine/kernel/compiler/host_codegen.py similarity index 100% rename from core/shark_turbine/kernel/compiler/host_codegen.py rename to shark_turbine/kernel/compiler/host_codegen.py diff --git a/core/shark_turbine/kernel/compiler/ir.py b/shark_turbine/kernel/compiler/ir.py similarity index 100% rename from core/shark_turbine/kernel/compiler/ir.py rename to shark_turbine/kernel/compiler/ir.py diff --git a/core/shark_turbine/kernel/compiler/kernel_codegen.py b/shark_turbine/kernel/compiler/kernel_codegen.py similarity index 100% rename from core/shark_turbine/kernel/compiler/kernel_codegen.py rename to shark_turbine/kernel/compiler/kernel_codegen.py diff --git a/core/shark_turbine/kernel/compiler/op_matchers.py b/shark_turbine/kernel/compiler/op_matchers.py similarity index 100% rename from core/shark_turbine/kernel/compiler/op_matchers.py rename to shark_turbine/kernel/compiler/op_matchers.py diff --git a/core/shark_turbine/kernel/compiler/vector_codegen.py b/shark_turbine/kernel/compiler/vector_codegen.py similarity index 100% rename from core/shark_turbine/kernel/compiler/vector_codegen.py rename to shark_turbine/kernel/compiler/vector_codegen.py diff --git a/core/shark_turbine/kernel/gen/__init__.py b/shark_turbine/kernel/gen/__init__.py similarity index 100% rename from core/shark_turbine/kernel/gen/__init__.py rename to shark_turbine/kernel/gen/__init__.py diff --git a/core/shark_turbine/kernel/gen/kernel.py b/shark_turbine/kernel/gen/kernel.py similarity index 100% rename from core/shark_turbine/kernel/gen/kernel.py rename to shark_turbine/kernel/gen/kernel.py diff --git a/core/shark_turbine/kernel/gen/thread.py b/shark_turbine/kernel/gen/thread.py similarity index 100% rename from core/shark_turbine/kernel/gen/thread.py rename to shark_turbine/kernel/gen/thread.py diff --git a/core/shark_turbine/kernel/lang/__init__.py b/shark_turbine/kernel/lang/__init__.py similarity index 100% rename from core/shark_turbine/kernel/lang/__init__.py rename to shark_turbine/kernel/lang/__init__.py diff --git a/core/shark_turbine/kernel/lang/grid.py b/shark_turbine/kernel/lang/grid.py similarity index 100% rename from core/shark_turbine/kernel/lang/grid.py rename to shark_turbine/kernel/lang/grid.py diff --git a/core/shark_turbine/kernel/lang/kernel_buffer.py b/shark_turbine/kernel/lang/kernel_buffer.py similarity index 100% rename from core/shark_turbine/kernel/lang/kernel_buffer.py rename to shark_turbine/kernel/lang/kernel_buffer.py diff --git a/core/shark_turbine/kernel/lang/prims.py b/shark_turbine/kernel/lang/prims.py similarity index 100% rename from core/shark_turbine/kernel/lang/prims.py rename to shark_turbine/kernel/lang/prims.py diff --git a/core/shark_turbine/kernel/lang/types.py b/shark_turbine/kernel/lang/types.py similarity index 100% rename from core/shark_turbine/kernel/lang/types.py rename to shark_turbine/kernel/lang/types.py diff --git a/core/shark_turbine/kernel/ops/__init__.py b/shark_turbine/kernel/ops/__init__.py similarity index 100% rename from core/shark_turbine/kernel/ops/__init__.py rename to shark_turbine/kernel/ops/__init__.py diff --git a/core/shark_turbine/kernel/ops/base.py b/shark_turbine/kernel/ops/base.py similarity index 100% rename from core/shark_turbine/kernel/ops/base.py rename to shark_turbine/kernel/ops/base.py diff --git a/core/shark_turbine/kernel/ops/control_flow.py b/shark_turbine/kernel/ops/control_flow.py similarity index 100% rename from core/shark_turbine/kernel/ops/control_flow.py rename to shark_turbine/kernel/ops/control_flow.py diff --git a/core/shark_turbine/kernel/ops/core.py b/shark_turbine/kernel/ops/core.py similarity index 100% rename from core/shark_turbine/kernel/ops/core.py rename to shark_turbine/kernel/ops/core.py diff --git a/core/shark_turbine/kernel/ops/math.py b/shark_turbine/kernel/ops/math.py similarity index 100% rename from core/shark_turbine/kernel/ops/math.py rename to shark_turbine/kernel/ops/math.py diff --git a/core/shark_turbine/kernel/ops/memory.py b/shark_turbine/kernel/ops/memory.py similarity index 100% rename from core/shark_turbine/kernel/ops/memory.py rename to shark_turbine/kernel/ops/memory.py diff --git a/core/shark_turbine/kernel/ops/reduction.py b/shark_turbine/kernel/ops/reduction.py similarity index 100% rename from core/shark_turbine/kernel/ops/reduction.py rename to shark_turbine/kernel/ops/reduction.py diff --git a/core/shark_turbine/kernel/ops/shape_manipulation.py b/shark_turbine/kernel/ops/shape_manipulation.py similarity index 100% rename from core/shark_turbine/kernel/ops/shape_manipulation.py rename to shark_turbine/kernel/ops/shape_manipulation.py diff --git a/core/shark_turbine/ops/__init__.py b/shark_turbine/ops/__init__.py similarity index 100% rename from core/shark_turbine/ops/__init__.py rename to shark_turbine/ops/__init__.py diff --git a/core/shark_turbine/ops/iree.py b/shark_turbine/ops/iree.py similarity index 100% rename from core/shark_turbine/ops/iree.py rename to shark_turbine/ops/iree.py diff --git a/core/shark_turbine/runtime/__init__.py b/shark_turbine/runtime/__init__.py similarity index 100% rename from core/shark_turbine/runtime/__init__.py rename to shark_turbine/runtime/__init__.py diff --git a/core/shark_turbine/runtime/device.py b/shark_turbine/runtime/device.py similarity index 100% rename from core/shark_turbine/runtime/device.py rename to shark_turbine/runtime/device.py diff --git a/core/shark_turbine/runtime/op_reg/__init__.py b/shark_turbine/runtime/op_reg/__init__.py similarity index 100% rename from core/shark_turbine/runtime/op_reg/__init__.py rename to shark_turbine/runtime/op_reg/__init__.py diff --git a/core/shark_turbine/runtime/op_reg/base.py b/shark_turbine/runtime/op_reg/base.py similarity index 100% rename from core/shark_turbine/runtime/op_reg/base.py rename to shark_turbine/runtime/op_reg/base.py diff --git a/core/shark_turbine/runtime/op_reg/compiler.py b/shark_turbine/runtime/op_reg/compiler.py similarity index 100% rename from core/shark_turbine/runtime/op_reg/compiler.py rename to shark_turbine/runtime/op_reg/compiler.py diff --git a/core/shark_turbine/runtime/op_reg/eager.py b/shark_turbine/runtime/op_reg/eager.py similarity index 100% rename from core/shark_turbine/runtime/op_reg/eager.py rename to shark_turbine/runtime/op_reg/eager.py diff --git a/core/shark_turbine/runtime/tracing.py b/shark_turbine/runtime/tracing.py similarity index 100% rename from core/shark_turbine/runtime/tracing.py rename to shark_turbine/runtime/tracing.py diff --git a/core/shark_turbine/support/__init__.py b/shark_turbine/support/__init__.py similarity index 100% rename from core/shark_turbine/support/__init__.py rename to shark_turbine/support/__init__.py diff --git a/core/shark_turbine/support/conversions.py b/shark_turbine/support/conversions.py similarity index 100% rename from core/shark_turbine/support/conversions.py rename to shark_turbine/support/conversions.py diff --git a/core/shark_turbine/support/debugging.py b/shark_turbine/support/debugging.py similarity index 100% rename from core/shark_turbine/support/debugging.py rename to shark_turbine/support/debugging.py diff --git a/core/shark_turbine/support/exceptions.py b/shark_turbine/support/exceptions.py similarity index 100% rename from core/shark_turbine/support/exceptions.py rename to shark_turbine/support/exceptions.py diff --git a/core/shark_turbine/support/ir_imports.py b/shark_turbine/support/ir_imports.py similarity index 100% rename from core/shark_turbine/support/ir_imports.py rename to shark_turbine/support/ir_imports.py diff --git a/core/shark_turbine/support/logging.py b/shark_turbine/support/logging.py similarity index 100% rename from core/shark_turbine/support/logging.py rename to shark_turbine/support/logging.py diff --git a/core/shark_turbine/transforms/builder.py b/shark_turbine/transforms/builder.py similarity index 100% rename from core/shark_turbine/transforms/builder.py rename to shark_turbine/transforms/builder.py diff --git a/core/shark_turbine/transforms/general/custom_op_expansion.py b/shark_turbine/transforms/general/custom_op_expansion.py similarity index 100% rename from core/shark_turbine/transforms/general/custom_op_expansion.py rename to shark_turbine/transforms/general/custom_op_expansion.py diff --git a/core/shark_turbine/transforms/general/rename_parameters.py b/shark_turbine/transforms/general/rename_parameters.py similarity index 100% rename from core/shark_turbine/transforms/general/rename_parameters.py rename to shark_turbine/transforms/general/rename_parameters.py diff --git a/core/shark_turbine/transforms/merger.py b/shark_turbine/transforms/merger.py similarity index 100% rename from core/shark_turbine/transforms/merger.py rename to shark_turbine/transforms/merger.py diff --git a/core/shark_turbine/transforms/quantization/mm_group_quant.py b/shark_turbine/transforms/quantization/mm_group_quant.py similarity index 100% rename from core/shark_turbine/transforms/quantization/mm_group_quant.py rename to shark_turbine/transforms/quantization/mm_group_quant.py diff --git a/core/shark_turbine/transforms/rewriter.py b/shark_turbine/transforms/rewriter.py similarity index 100% rename from core/shark_turbine/transforms/rewriter.py rename to shark_turbine/transforms/rewriter.py diff --git a/core/tests/aot/api_test.py b/tests/aot/api_test.py similarity index 100% rename from core/tests/aot/api_test.py rename to tests/aot/api_test.py diff --git a/core/tests/aot/args_test.py b/tests/aot/args_test.py similarity index 100% rename from core/tests/aot/args_test.py rename to tests/aot/args_test.py diff --git a/core/tests/aot/compiled_exported_program_test.py b/tests/aot/compiled_exported_program_test.py similarity index 100% rename from core/tests/aot/compiled_exported_program_test.py rename to tests/aot/compiled_exported_program_test.py diff --git a/core/tests/aot/decompositions_test.py b/tests/aot/decompositions_test.py similarity index 100% rename from core/tests/aot/decompositions_test.py rename to tests/aot/decompositions_test.py diff --git a/core/tests/aot/functionalize_test.py b/tests/aot/functionalize_test.py similarity index 100% rename from core/tests/aot/functionalize_test.py rename to tests/aot/functionalize_test.py diff --git a/core/tests/aot/fx_programs_test.py b/tests/aot/fx_programs_test.py similarity index 100% rename from core/tests/aot/fx_programs_test.py rename to tests/aot/fx_programs_test.py diff --git a/core/tests/aot/globals_test.py b/tests/aot/globals_test.py similarity index 100% rename from core/tests/aot/globals_test.py rename to tests/aot/globals_test.py diff --git a/core/tests/aot/iree_procedural_test.py b/tests/aot/iree_procedural_test.py similarity index 100% rename from core/tests/aot/iree_procedural_test.py rename to tests/aot/iree_procedural_test.py diff --git a/core/tests/aot/jittable_test.py b/tests/aot/jittable_test.py similarity index 100% rename from core/tests/aot/jittable_test.py rename to tests/aot/jittable_test.py diff --git a/core/tests/aot/params_test.py b/tests/aot/params_test.py similarity index 100% rename from core/tests/aot/params_test.py rename to tests/aot/params_test.py diff --git a/core/tests/dynamo/backend_smoke_test.py b/tests/dynamo/backend_smoke_test.py similarity index 100% rename from core/tests/dynamo/backend_smoke_test.py rename to tests/dynamo/backend_smoke_test.py diff --git a/core/tests/dynamo/importer_backward_test.py b/tests/dynamo/importer_backward_test.py similarity index 100% rename from core/tests/dynamo/importer_backward_test.py rename to tests/dynamo/importer_backward_test.py diff --git a/core/tests/dynamo/importer_basic_test.py b/tests/dynamo/importer_basic_test.py similarity index 100% rename from core/tests/dynamo/importer_basic_test.py rename to tests/dynamo/importer_basic_test.py diff --git a/core/tests/dynamo/importer_dynamic_test.py b/tests/dynamo/importer_dynamic_test.py similarity index 100% rename from core/tests/dynamo/importer_dynamic_test.py rename to tests/dynamo/importer_dynamic_test.py diff --git a/core/tests/dynamo/llama_test.py b/tests/dynamo/llama_test.py similarity index 100% rename from core/tests/dynamo/llama_test.py rename to tests/dynamo/llama_test.py diff --git a/core/tests/dynamo/mninst_test.py b/tests/dynamo/mninst_test.py similarity index 100% rename from core/tests/dynamo/mninst_test.py rename to tests/dynamo/mninst_test.py diff --git a/core/tests/dynamo/tensor_scalar_op_conversion_importer_test.py b/tests/dynamo/tensor_scalar_op_conversion_importer_test.py similarity index 100% rename from core/tests/dynamo/tensor_scalar_op_conversion_importer_test.py rename to tests/dynamo/tensor_scalar_op_conversion_importer_test.py diff --git a/core/tests/dynamo/tensor_test.py b/tests/dynamo/tensor_test.py similarity index 100% rename from core/tests/dynamo/tensor_test.py rename to tests/dynamo/tensor_test.py diff --git a/core/tests/dynamo/testutils.py b/tests/dynamo/testutils.py similarity index 100% rename from core/tests/dynamo/testutils.py rename to tests/dynamo/testutils.py diff --git a/core/tests/dynamo/type_conversion_test.py b/tests/dynamo/type_conversion_test.py similarity index 100% rename from core/tests/dynamo/type_conversion_test.py rename to tests/dynamo/type_conversion_test.py diff --git a/core/tests/examples/aot_mlp_test.py b/tests/examples/aot_mlp_test.py similarity index 100% rename from core/tests/examples/aot_mlp_test.py rename to tests/examples/aot_mlp_test.py diff --git a/core/tests/generated/evaluate.py b/tests/generated/evaluate.py similarity index 100% rename from core/tests/generated/evaluate.py rename to tests/generated/evaluate.py diff --git a/core/tests/generated/extract_unimpl_ops.sh b/tests/generated/extract_unimpl_ops.sh similarity index 100% rename from core/tests/generated/extract_unimpl_ops.sh rename to tests/generated/extract_unimpl_ops.sh diff --git a/core/tests/generated/main.py b/tests/generated/main.py similarity index 100% rename from core/tests/generated/main.py rename to tests/generated/main.py diff --git a/core/tests/generated/running_tests.md b/tests/generated/running_tests.md similarity index 100% rename from core/tests/generated/running_tests.md rename to tests/generated/running_tests.md diff --git a/core/tests/generated/stats.py b/tests/generated/stats.py similarity index 100% rename from core/tests/generated/stats.py rename to tests/generated/stats.py diff --git a/core/tests/generated/testutils.py b/tests/generated/testutils.py similarity index 100% rename from core/tests/generated/testutils.py rename to tests/generated/testutils.py diff --git a/core/tests/kernel/aot_kernel_test.py b/tests/kernel/aot_kernel_test.py similarity index 100% rename from core/tests/kernel/aot_kernel_test.py rename to tests/kernel/aot_kernel_test.py diff --git a/core/tests/kernel/arith_test.py b/tests/kernel/arith_test.py similarity index 100% rename from core/tests/kernel/arith_test.py rename to tests/kernel/arith_test.py diff --git a/core/tests/kernel/dispatch_codegen_test.py b/tests/kernel/dispatch_codegen_test.py similarity index 100% rename from core/tests/kernel/dispatch_codegen_test.py rename to tests/kernel/dispatch_codegen_test.py diff --git a/core/tests/kernel/fused_attention_test.py b/tests/kernel/fused_attention_test.py similarity index 100% rename from core/tests/kernel/fused_attention_test.py rename to tests/kernel/fused_attention_test.py diff --git a/core/tests/kernel/indexing_test.py b/tests/kernel/indexing_test.py similarity index 100% rename from core/tests/kernel/indexing_test.py rename to tests/kernel/indexing_test.py diff --git a/core/tests/kernel/simple_kernel_test.py b/tests/kernel/simple_kernel_test.py similarity index 100% rename from core/tests/kernel/simple_kernel_test.py rename to tests/kernel/simple_kernel_test.py diff --git a/core/tests/kernel/types_test.py b/tests/kernel/types_test.py similarity index 100% rename from core/tests/kernel/types_test.py rename to tests/kernel/types_test.py diff --git a/core/tests/kernel/vector_codegen_test.py b/tests/kernel/vector_codegen_test.py similarity index 100% rename from core/tests/kernel/vector_codegen_test.py rename to tests/kernel/vector_codegen_test.py diff --git a/core/tests/ops/iree_test.py b/tests/ops/iree_test.py similarity index 100% rename from core/tests/ops/iree_test.py rename to tests/ops/iree_test.py diff --git a/core/tests/runtime/device_test.py b/tests/runtime/device_test.py similarity index 100% rename from core/tests/runtime/device_test.py rename to tests/runtime/device_test.py diff --git a/core/tests/runtime/op_reg/kernel_aot_test.py b/tests/runtime/op_reg/kernel_aot_test.py similarity index 100% rename from core/tests/runtime/op_reg/kernel_aot_test.py rename to tests/runtime/op_reg/kernel_aot_test.py diff --git a/core/tests/runtime/op_reg/kernel_reg_test.py b/tests/runtime/op_reg/kernel_reg_test.py similarity index 100% rename from core/tests/runtime/op_reg/kernel_reg_test.py rename to tests/runtime/op_reg/kernel_reg_test.py diff --git a/core/tests/top_level_package_test.py b/tests/top_level_package_test.py similarity index 100% rename from core/tests/top_level_package_test.py rename to tests/top_level_package_test.py diff --git a/core/tests/transforms/general/custom_op_expansion_test.py b/tests/transforms/general/custom_op_expansion_test.py similarity index 100% rename from core/tests/transforms/general/custom_op_expansion_test.py rename to tests/transforms/general/custom_op_expansion_test.py diff --git a/core/tests/transforms/general/rename_parameters_test.py b/tests/transforms/general/rename_parameters_test.py similarity index 100% rename from core/tests/transforms/general/rename_parameters_test.py rename to tests/transforms/general/rename_parameters_test.py diff --git a/core/tests/transforms/general/testdata/custom_op_int_arg.mlir b/tests/transforms/general/testdata/custom_op_int_arg.mlir similarity index 100% rename from core/tests/transforms/general/testdata/custom_op_int_arg.mlir rename to tests/transforms/general/testdata/custom_op_int_arg.mlir diff --git a/core/tests/transforms/general/testdata/custom_op_simple.mlir b/tests/transforms/general/testdata/custom_op_simple.mlir similarity index 100% rename from core/tests/transforms/general/testdata/custom_op_simple.mlir rename to tests/transforms/general/testdata/custom_op_simple.mlir diff --git a/core/tests/transforms/general/testdata/custom_op_string_attr.mlir b/tests/transforms/general/testdata/custom_op_string_attr.mlir similarity index 100% rename from core/tests/transforms/general/testdata/custom_op_string_attr.mlir rename to tests/transforms/general/testdata/custom_op_string_attr.mlir diff --git a/core/tests/transforms/quantization/mm_f32_to_int4.mlir b/tests/transforms/quantization/mm_f32_to_int4.mlir similarity index 100% rename from core/tests/transforms/quantization/mm_f32_to_int4.mlir rename to tests/transforms/quantization/mm_f32_to_int4.mlir diff --git a/core/tests/transforms/quantization/mm_group_quant_test.py b/tests/transforms/quantization/mm_group_quant_test.py similarity index 100% rename from core/tests/transforms/quantization/mm_group_quant_test.py rename to tests/transforms/quantization/mm_group_quant_test.py