Skip to content

Commit 19d8caa

Browse files
Migration to AMDShark (#962)
Migration to AMDShark Signed-off-by: pdhirajkumarprasad <[email protected]>
1 parent bdf4635 commit 19d8caa

File tree

28 files changed

+106
-106
lines changed

28 files changed

+106
-106
lines changed

.github/workflows/test_shark.yml renamed to .github/workflows/test_AMDShark.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test SHARK
1+
name: Test AMDShark
22

33
on:
44
workflow_dispatch:
@@ -16,7 +16,7 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
jobs:
19-
test-shark:
19+
test-AMDShark:
2020
strategy:
2121
matrix:
2222
version: [3.11]
@@ -29,11 +29,11 @@ jobs:
2929
with:
3030
python-version: ${{matrix.version}}
3131

32-
- name: "Checkout SHARK"
32+
- name: "Checkout AMDShark"
3333
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3434
with:
35-
repository: "nod-ai/SHARK.git"
36-
path: SHARK
35+
repository: "nod-ai/AMDShark.git"
36+
path: AMDShark
3737
ref: "main"
3838

3939
- name: "Checkout iree-turbine"
@@ -43,12 +43,12 @@ jobs:
4343
# TODO: Let the ref be passed as a parameter to run integration tests.
4444
path: iree-turbine
4545

46-
# TODO: Replace with a sh script from shark repo
47-
- name: "Install SHARK"
46+
# TODO: Replace with a sh script from AMDShark repo
47+
- name: "Install AMDShark"
4848
run: |
49-
cd $GITHUB_WORKSPACE/SHARK
50-
python${{ matrix.version }} -m venv shark.venv
51-
source shark.venv/bin/activate
49+
cd $GITHUB_WORKSPACE/AMDShark
50+
python${{ matrix.version }} -m venv AMDShark.venv
51+
source AMDShark.venv/bin/activate
5252
pip install -r requirements.txt --no-cache-dir
5353
pip install -e .
54-
python apps/shark_studio/tests/api_test.py
54+
python apps/AMDShark_studio/tests/api_test.py

.github/workflows/test_models.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
HF_TOKEN: ${{ secrets.HF_TOKEN }}
2929
AZ_PRIVATE_CONNECTION: ${{ secrets.ONNXPRIVATESTORAGE_AZ_PRIVATE_CONNECTION }}
3030
ROCR_VISIBLE_DEVICES: ${{ matrix.visible-device }}
31-
TORCH_HOME: /groups/aig_sharks/test-suite-ci-cache
32-
HF_HOME: /groups/aig_sharks/test-suite-ci-cache
33-
TURBINE_TANK_CACHE_DIR: /groups/aig_sharks/test-suite-ci-cache
31+
TORCH_HOME: /groups/aig_AMDSharks/test-suite-ci-cache
32+
HF_HOME: /groups/aig_AMDSharks/test-suite-ci-cache
33+
TURBINE_TANK_CACHE_DIR: /groups/aig_AMDSharks/test-suite-ci-cache
3434
steps:
3535
# We are using a persistent Gentoo runner here, and this python action is not supported for the arch
3636
# - name: "Setting up Python"

.github/workflows/test_sdxl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
python-version: ${{matrix.version}}
3232

33-
- name: "Checkout SHARK-ModelDev"
33+
- name: "Checkout AMDShark-ModelDev"
3434
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3535
with:
3636
ref: bump-punet-tom

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SHARK Turbine
1+
# AMDShark Turbine
22

33
This repo is Nod-AI's integration repository for various model bringup
44
activities and CI. In 2023 and early 2024, it played a different role
@@ -9,7 +9,7 @@ were developed, including:
99
* [Torch-MLIR ONNX Importer](https://github.com/llvm/torch-mlir/blob/main/python/torch_mlir/extras/onnx_importer.py)
1010
* [Torch-MLIR's ONNX C Importer](https://github.com/llvm/torch-mlir/tree/main/projects/onnx_c_importer)
1111
* [IREE Turbine](https://github.com/iree-org/iree-turbine)
12-
* [Sharktank and Shortfin](https://github.com/nod-ai/sharktank)
12+
* [AMDSharktank and Shortfin](https://github.com/nod-ai/AMDSharktank)
1313

1414
As these have all found upstream homes, this repo is a bit bare. We will
1515
continue to use it as a staging ground for things that don't have a

models/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ YOUR_HF_TOKEN="insert token for headless"
1414

1515
# clone and install dependencies
1616
sudo apt install -y git
17-
git clone https://github.com/nod-ai/SHARK-Turbine.git
18-
cd SHARK-Turbine
17+
git clone https://github.com/nod-ai/AMDShark-Turbine.git
18+
cd AMDShark-Turbine
1919
pip install -r core/requirements.txt
2020
pip install -r models/requirements.txt
2121

22-
# do an editable install from the cloned SHARK-Turbine
22+
# do an editable install from the cloned AMDShark-Turbine
2323
pip install --editable core models
2424

2525
# Log in with Hugging Face CLI if token setup is required

models/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ transformers==4.50.0
44
torchsde
55
accelerate
66
peft
7-
diffusers @ git+https://github.com/nod-ai/[email protected]shark
7+
diffusers @ git+https://github.com/nod-ai/[email protected]AMDShark
88
brevitas @ git+https://github.com/Xilinx/brevitas.git@6695e8df7f6a2c7715b9ed69c4b78157376bb60b
99
# turbine tank downloading/uploading
1010
azure-storage-blob
@@ -13,4 +13,4 @@ einops
1313
pytest
1414
scipy
1515
iree-turbine @ git+https://github.com/iree-org/iree-turbine.git@main
16-
-e git+https://github.com/nod-ai/sharktank.git@main#egg=sharktank&subdirectory=sharktank
16+
-e git+https://github.com/nod-ai/AMDSharktank.git@main#egg=AMDSharktank&subdirectory=AMDSharktank

models/setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ def load_version_info():
3535
setup(
3636
name=f"turbine-models",
3737
version=f"{PACKAGE_VERSION}",
38-
author="SHARK Authors",
38+
author="AMDShark Authors",
3939
author_email="[email protected]",
40-
description="SHARK Turbine Machine Learning Model Zoo",
40+
description="AMDShark Turbine Machine Learning Model Zoo",
4141
long_description=README,
4242
long_description_content_type="text/markdown",
43-
url="https://github.com/nod-ai/SHARK-Turbine",
43+
url="https://github.com/nod-ai/AMDShark-Turbine",
4444
license="Apache-2.0",
4545
classifiers=[
4646
"Development Status :: 3 - Alpha",
@@ -54,7 +54,7 @@ def load_version_info():
5454
],
5555
),
5656
install_requires=[
57-
"Shark-Turbine",
57+
"AMDShark-Turbine",
5858
"protobuf",
5959
"sentencepiece",
6060
"transformers>=4.37.1",

models/turbine_models/custom_models/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Instructions
22

3-
Clone and install SHARK-Turbine
3+
Clone and install AMDShark-Turbine
44
```
5-
git clone https://github.com/nod-ai/SHARK-Turbine.git
6-
cd SHARK-Turbine
5+
git clone https://github.com/nod-ai/AMDShark-Turbine.git
6+
cd AMDShark-Turbine
77
python -m venv turbine_venv && source turbine_venv/bin/activate
88
99
pip install --index-url https://download.pytorch.org/whl/cpu \

models/turbine_models/custom_models/llama_benchmark/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Instructions
22

3-
Clone and install SHARK-Turbine
3+
Clone and install AMDShark-Turbine
44
```
5-
git clone https://github.com/nod-ai/SHARK-Turbine.git
6-
cd SHARK-Turbine
5+
git clone https://github.com/nod-ai/AMDShark-Turbine.git
6+
cd AMDShark-Turbine
77
python -m venv turbine_venv && source turbine_venv/bin/activate
88
99
pip install --upgrade -r requirements.txt

models/turbine_models/custom_models/llm_optimizations/streaming_llm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ python python/turbine_models/custom_models/llm_runner.py --vmfb_path=/path/to/Ll
2727
```
2828

2929
## Future Work:
30-
- [ ] Make window size configurable through python, everything is there but we'd need to initialize with a default value which would only be possible after we let `_create_initial_value` to take in initial value from GlobalAttribute somewhere [here](https://github.com/nod-ai/SHARK-Turbine/blob/18e8a4100b61adfd9425dd32f780dc5f90017813/python/shark_turbine/aot/support/ir_utils.py#L284-L316) .
30+
- [ ] Make window size configurable through python, everything is there but we'd need to initialize with a default value which would only be possible after we let `_create_initial_value` to take in initial value from GlobalAttribute somewhere [here](https://github.com/nod-ai/AMDShark-Turbine/blob/18e8a4100b61adfd9425dd32f780dc5f90017813/python/AMDShark_turbine/aot/support/ir_utils.py#L284-L316) .
3131
- [ ] Get flow.move to enable overlap of sliding window and src of data. (Currently need to evict when it's at least 2x size of window) For example by default our streamingLLM window_size is 256, so we evict at ~600(slightly more than 2x for safety) token.
3232
- [ ] Introduce Rerotation of RoPE to as seen [here](https://github.com/huggingface/transformers/blob/c2d283a64a7f33547952e3eb0fa6533fc375bcdd/src/transformers/cache_utils.py#L213-L218) to remove invasive modification of LlamaAttention module for streamingLLM.

0 commit comments

Comments
 (0)