Skip to content

Commit

Permalink
Update links after repository renamings
Browse files Browse the repository at this point in the history
SHARK was renamed to SHARK-Studio and SHARK-Turbine was renamed to
SHARK-ModelDev.
  • Loading branch information
marbre committed Oct 18, 2024
1 parent 594d580 commit a59839a
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 34 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/test_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
python-version: 3.11
- name: "Checkout This Repo"
uses: actions/checkout@v4
- name: "Checkout SHARK-Turbine repo"
- name: "Checkout SHARK-ModelDev repo"
uses: actions/checkout@v4
with:
repository: nod-ai/SHARK-Turbine
repository: nod-ai/SHARK-ModelDev
# TODO: Let the ref be passed as a parameter to run integration tests.
path: SHARK-Turbine
path: SHARK-ModelDev
- name: Sync source deps
# build IREE from source with -DIREE_BUILD_TRACY=ON if getting tracy profile
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-compile --pre --upgrade -r requirements.txt
pip install --no-compile --pre -e .[testing]
pip install --no-compile --pre --upgrade -e ${{ github.workspace }}/SHARK-Turbine/models -r ${{ github.workspace }}/SHARK-Turbine/models/requirements.txt
pip install --no-compile --pre --upgrade -e ${{ github.workspace }}/SHARK-ModelDev/models -r ${{ github.workspace }}/SHARK-ModelDev/models/requirements.txt
pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
Expand All @@ -60,23 +60,23 @@ jobs:
- name: Run stateless_llama tests
run: |
source turbine_venv/bin/activate
pytest -v ${{ github.workspace }}/SHARK-Turbine/models/turbine_models/tests/stateless_llama_test.py
pytest -v ${{ github.workspace }}/SHARK-ModelDev/models/turbine_models/tests/stateless_llama_test.py
- name: Run sd tests
run: |
source turbine_venv/bin/activate
pytest -v ${{ github.workspace }}/SHARK-Turbine/models/turbine_models/tests/sd_test.py
pytest -v ${{ github.workspace }}/SHARK-Turbine/models/turbine_models/tests/sdxl_test.py --device cpu --rt_device local-task --iree_target_triple x86_64-linux-gnu
pytest -v ${{ github.workspace }}/SHARK-ModelDev/models/turbine_models/tests/sd_test.py
pytest -v ${{ github.workspace }}/SHARK-ModelDev/models/turbine_models/tests/sdxl_test.py --device cpu --rt_device local-task --iree_target_triple x86_64-linux-gnu
test-turbine-models-gpu:
runs-on: nodai-amdgpu-mi250-x86-64
steps:
- name: "Checkout This Repo"
uses: actions/checkout@v4
- name: "Checkout SHARK-Turbine repo"
- name: "Checkout SHARK-ModelDev repo"
uses: actions/checkout@v4
with:
repository: nod-ai/SHARK-Turbine
repository: nod-ai/SHARK-ModelDev
# TODO: Let the ref be passed as a parameter to run integration tests.
path: SHARK-Turbine
path: SHARK-ModelDev
- name: Sync source deps
# build IREE from source with -DIREE_BUILD_TRACY=ON if getting tracy profile
run: |
Expand All @@ -89,7 +89,7 @@ jobs:
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-compile --pre --upgrade -r requirements.txt
pip install --no-compile --pre -e .[testing]
pip install --no-compile --pre --upgrade -e ${{ github.workspace }}/SHARK-Turbine/models -r ${{ github.workspace }}/SHARK-Turbine/models/requirements.txt
pip install --no-compile --pre --upgrade -e ${{ github.workspace }}/SHARK-ModelDev/models -r ${{ github.workspace }}/SHARK-ModelDev/models/requirements.txt
pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
Expand All @@ -101,5 +101,5 @@ jobs:
- name: Run sdxl gpu tests
run: |
source turbine_venv/bin/activate
pytest -v ${{ github.workspace }}/SHARK-Turbine/models/turbine_models/tests/sdxl_test.py --device vulkan --rt_device vulkan --iree_target_triple rdna3-unknown-linux
pytest -v ${{ github.workspace }}/SHARK-Turbine/models/turbine_models/tests/sdxl_test.py --device rocm --rt_device hip --iree_target_triple gfx90a --precision fp16
pytest -v ${{ github.workspace }}/SHARK-ModelDev/models/turbine_models/tests/sdxl_test.py --device vulkan --rt_device vulkan --iree_target_triple rdna3-unknown-linux
pytest -v ${{ github.workspace }}/SHARK-ModelDev/models/turbine_models/tests/sdxl_test.py --device rocm --rt_device hip --iree_target_triple gfx90a --precision fp16
4 changes: 2 additions & 2 deletions .github/workflows/test_shark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
- name: "Checkout SHARK"
uses: actions/checkout@v4
with:
repository: "nod-ai/SHARK"
repository: "nod-ai/SHARK-Studio"
path: SHARK

- name: "Install SHARK"
- name: "Install SHARK Studio"
run: |
cd $GITHUB_WORKSPACE/SHARK
python${{ matrix.version }} -m venv shark.venv
Expand Down
2 changes: 1 addition & 1 deletion examples/eager_mlp/mlp_eager_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import torchvision.datasets as datasets

torch._dynamo.config.dynamic_shapes = (
False # TODO: https://github.com/nod-ai/SHARK-Turbine/issues/93
False # TODO: https://github.com/nod-ai/SHARK-ModelDev/issues/93
)


Expand Down
4 changes: 2 additions & 2 deletions examples/resnet-18/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This example AOT-compiles a Resnet-18 module for performing inference on a dynam
To run this example (with Python3.11), you should clone the repository to your local device and install the requirements in a virtual environment.

```bash
git clone https://github.com/nod-ai/SHARK-Turbine.git
cd SHARK-Turbine/examples/resnet-18
git clone https://github.com/nod-ai/SHARK-ModelDev.git
cd SHARK-ModelDev/examples/resnet-18
python -m venv rn18_venv
source ./rn18_venv/bin/activate
pip install -r requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions iree/turbine/aot/compiled_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def def_export_proc(self, name, f) -> ExportProcDef:
input_sig = []
parameter_list = list(sig.parameters.values())
# TODO: Reconstitute a pytree so as to handle kwargs?
# See: https://github.com/nod-ai/SHARK-Turbine/issues/128
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/128
for param in parameter_list[1:]:
if (
param.kind != inspect.Parameter.POSITIONAL_ONLY
Expand All @@ -285,7 +285,7 @@ def def_export_proc(self, name, f) -> ExportProcDef:
param_desc = param.default
if param_desc is inspect.Parameter.empty:
# TODO: Merge from a decorator?
# See: https://github.com/nod-ai/SHARK-Turbine/issues/126
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/126
raise TypeError(
f"export function {name} missing required default value annotation "
f"for '{param.name}'"
Expand Down Expand Up @@ -542,7 +542,7 @@ def run_pass_pipeline(
pm.run(module_op)
except MLIRError:
# TODO: Better error handling.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/127
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/127
print(module_op, file=sys.stderr)
raise

Expand Down Expand Up @@ -638,7 +638,7 @@ def __new__(
# Instantiate procs.
# TODO: This should be done in two phases, first binding the symbols
# and then defining them, enabling dependence.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/129
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/129
for key, proc_def in info.class_info.export_procs:

def do_export(proc_def: ExportProcDef):
Expand Down
2 changes: 1 addition & 1 deletion iree/turbine/aot/support/ir_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def unique_auto_symbol(self, requested_name: str) -> str:

def handle_mlir_error(self, op: Operation, e: MLIRError, message: str):
# TODO: Replace with a real dumping facility.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/136
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/136
dump_path = Path(tempfile.gettempdir()) / "turbine_module_builder_error.mlir"
logger.exception(f"{message} (dumping to {dump_path})")
try:
Expand Down
4 changes: 2 additions & 2 deletions iree/turbine/aot/support/procedural/iree_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def tensor_empty(
"""Constructs a tensor with uninitialized values.
TODO: Support an IREE/raw element type in addition to the torch dtype.
See: https://github.com/nod-ai/SHARK-Turbine/issues/130
See: https://github.com/nod-ai/SHARK-ModelDev/issues/130
"""
dim_decls, dyn_dim_values = cast_tensor_dim_decl(dims)
try:
Expand Down Expand Up @@ -325,7 +325,7 @@ def tensor_splat(
dtype: torch.dtype,
) -> "IrTensor":
# TODO: Type infer the dtype if missing.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/125
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/125
dim_decls, dyn_dim_values = cast_tensor_dim_decl(dims)
try:
element_type = TORCH_DTYPE_TO_IREE_TYPE[dtype]()
Expand Down
6 changes: 3 additions & 3 deletions iree/turbine/aot/support/procedural/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __add__(self, other):
# Type check and promotion.
# TODO: Add more comprehensive type promotion hiearchy as seen in
# https://jax.readthedocs.io/en/latest/jep/9407-type-promotion.html
# See: https://github.com/nod-ai/SHARK-Turbine/issues/132
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/132
lhs = self.ir_value
if isinstance(other, IrScalar):
# Assumes when both are Value, they have same type.
Expand Down Expand Up @@ -241,7 +241,7 @@ def get_dim_value(
# TODO: Add MLIR API support for creating an insertion point after
# an operation and use that to set the InsertionPoint to the
# earliest point.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/133
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/133
dim_value = build_tensor_dim_value(
resolved_ir_value, index, constant_cache=constant_cache
)
Expand Down Expand Up @@ -294,7 +294,7 @@ def _get_meta_tensor_constraints(self) -> tuple[torch.Tensor, list[Constraint]]:
# cannot be dynamic, and we must use a >= 2 dimension value to represent
# a dynamic quantity. We therefore adjust the shape in this way and
# add a dynamic_dim constraint.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/134
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/134
extents = [2 if d < 0 else d for d in shape]
mt = self._meta_tensor = torch.empty(extents, dtype=self.dtype)
# Generate constraints that are aligned with any dynamic dimensions or None
Expand Down
2 changes: 1 addition & 1 deletion iree/turbine/aot/support/procedural/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def define_func(
def trace_py_func(self, py_f: Callable):
with new_ir_trace_scope(self) as t:
# TODO: Create IR proxies for python arguments.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/135
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/135
return_py_value = _unproxy(py_f(*self.proxy_posargs, **self.proxy_kwargs))
if return_py_value is None:
self.emit_return()
Expand Down
4 changes: 2 additions & 2 deletions iree/turbine/dynamo/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ def _get_device_state() -> DeviceState:
return DeviceState(driver="local-task")


# Inspiration from https://github.com/nod-ai/SHARK-Turbine/blob/8293de5414889c72ff5cd10bf33c43fb0a3ea3ee/python/iree/turbine/aot/builtins/jittable.py#L212-L237
# and https://github.com/nod-ai/SHARK-Turbine/blob/main/python/iree/turbine/dynamo/backends/cpu.py
# Inspiration from https://github.com/nod-ai/SHARK-ModelDev/blob/8293de5414889c72ff5cd10bf33c43fb0a3ea3ee/python/iree/turbine/aot/builtins/jittable.py#L212-L237
# and https://github.com/nod-ai/SHARK-ModelDev/blob/main/python/iree/turbine/dynamo/backends/cpu.py
# TODO: Try to generalize for other devices.
def compute_method(super_fn, *args, **kwargs):
# Compute factory fns reserve the last arg as src_op
Expand Down
2 changes: 1 addition & 1 deletion iree/turbine/dynamo/type_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def torch_type_to_native(self, torch_type: IrType, signless: bool = True) -> IrT
IrType.parse(dtype_str), signless=signless
)
# TODO: Eliminate RankedTensorType dependence on Location.
# See: https://github.com/nod-ai/SHARK-Turbine/issues/145
# See: https://github.com/nod-ai/SHARK-ModelDev/issues/145
with Location.unknown():
return RankedTensorType.get(dim_list, dtype)
raise TypeError(f"Unsupported torch type conversion for {torch_type}")
Expand Down
2 changes: 1 addition & 1 deletion tests/dynamo/llama_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def main():
opt(example_tokens, start_pos)


@pytest.mark.xfail(reason="https://github.com/nod-ai/SHARK-Turbine/issues/221")
@pytest.mark.xfail(reason="https://github.com/nod-ai/SHARK-ModelDev/issues/221")
class ModelTests(unittest.TestCase):
def testLLama(self):
main()
Expand Down
2 changes: 1 addition & 1 deletion tests/dynamo/mninst_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import torch._dynamo.config

torch._dynamo.config.dynamic_shapes = (
False # TODO: https://github.com/nod-ai/SHARK-Turbine/issues/93
False # TODO: https://github.com/nod-ai/SHARK-ModelDev/issues/93
)


Expand Down

0 comments on commit a59839a

Please sign in to comment.