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

ONNX Support in Caten #288

Merged
merged 80 commits into from
Dec 3, 2024
Merged

ONNX Support in Caten #288

merged 80 commits into from
Dec 3, 2024

Conversation

hikettei
Copy link
Owner

@hikettei hikettei commented Dec 2, 2024

  • caten/vision (providing utils for cv stuff)
  • caten/onnx (from onnx -> caten translator, almost copied from cl-waffe2/frontend)
  • Let's start by trying more simple models. MobileNetV2 is a good target.
  • Download models from torchvision
  • MobileNetV2
  • Dynamic Shape Helper
  • oops !argmax has a problem? write tests
  • Running Classification in ImageNet
  • MobileNetV3 or ResNet is doable
  • EfficientNet
  • TODO: Creating a fuzzer using ONNX
  • Write a test for expt
  • Running MobileNetv2 for ci and merge this tomorrow
  • Or: create a ci named ONNX Test
  • GPT2 Test (or GGUF) In Benchmark
  • update cl-onnx to not to have cl-easel dependencies
# include them in ci, create a dir scripts/export_mobilenetv2.py
import torchvision
import torch
import torch.onnx

model = torchvision.models.mobilenet_v2(weights='IMAGENET1K_V1')
input_tensor = torch.rand((1, 3, 224, 224), dtype=torch.float32)
torch.onnx.export(model, (input_tensor,), f"./dummy_graph/mobilenetv2.onnx", input_names=["input"])
$ python ./scripts/export_onnx.py --task classification --model mobilenet_v2 --weights IMAGENET1K_V1 --output_dir ./models

Missing Ops

  • Clip-13
  • Flatten
  • Update ConvND (Permute the weight)

TODO

  • Documentation for caten/gguf,
  • caten/onnx
  • caten/llm
  • caten/aaps.gpt2

@hikettei hikettei changed the title WIP: MobileNetV2 in Caten WIP: ONNX+MobileNetV2 in Caten Dec 2, 2024
@hikettei hikettei changed the title WIP: ONNX+MobileNetV2 in Caten WIP: ONNX Support and MobileNetV2 in Caten! Dec 2, 2024
@hikettei
Copy link
Owner Author

hikettei commented Dec 2, 2024

wip: creating a schedule from onnx

@hikettei hikettei changed the title Enhancement: ONNX Support in Caten! ONNX Support in Caten! Dec 3, 2024
@hikettei hikettei changed the title ONNX Support in Caten! Prep: ONNX Support in Caten! Dec 3, 2024
@hikettei hikettei changed the title Prep: ONNX Support in Caten! ONNX Support in Caten! Dec 3, 2024
@hikettei hikettei mentioned this pull request Dec 3, 2024
1 task
@hikettei hikettei marked this pull request as ready for review December 3, 2024 06:34
@hikettei hikettei changed the title ONNX Support in Caten! ONNX Support in Caten Dec 3, 2024
@hikettei hikettei merged commit a62a0f8 into main Dec 3, 2024
8 checks passed
@hikettei hikettei deleted the mobilenetv2 branch December 3, 2024 08:32
@hikettei hikettei mentioned this pull request Dec 3, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant