Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TKWave setup instructions #135

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions shark_turbine/kernel/wave/docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Setting up TK-Wave for development

Welcome! This page outlines a guide to get started with developing for Turbine Kernel (TK) Wave.

## Setting up

For setting up necessary environments and tools, first follow the instructions under "Developers" in the main [README](../README.md). Specifically, while in the root `iree-turbine` directory, do the following:

### Create a virtual environment

This will consolidate all necessary python packages for your project in one folder. GitHub will ignore the virtual environment if you name it `.venv` (see `.gitignore`).

```
python -m venv --prompt iree-turbine .venv #Create the virtual environment
source .venv/bin/activate #Activate the virtual environment. Must run any time you start a new terminal.
```

### Installing PyTorch

PyTorch is our friendly frontend for AI work, and we'll be using it to compare our computational results with their "golden standard".

*For CPU:*

```
pip install -r pytorch-cpu-requirements.txt
```

*For ROCM:*

```
pip install -r pytorch-rocm-requirements.txt
```

### Install Development Packages

Finally, install all other required Python packages.

```
pip install -r requirements.txt -e .
```

# Testing

Try running `tests/kernel/wave/wave_e2e_test.py`. Even with venv activated and shark_turbine installed, you might still get ModuleNotFoundError: No module named 'shark_turbine'. Me too! But why?

You even try running:

* `kernel/wave/wave_e2e_test.py` from `iree-turbine/sharktank`
* `wave/wave_e2e_test.py` from `iree-turbine/sharktank/kernel`
* `wave_e2e_test.py` from `iree-turbine/sharktank/kernel/wave`

... I need some help
Loading