Custom op & shape handling
- Dominant language
- C++
- Stars
- 25
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Custom ops are opaque blobs of MLIR asm that Fusilli gets from the user and feeds through to the IREE compiler as is. To make authoring these custom ops easy, certain things (like shapes, types) maybe left unmaterialized for Fusilli to materialize.
For shapes, there are a few options at our disposal:
- Option 1: Custom MLIR with full static shapes
- Option 2: Custom MLIR with full dynamic shapes + user provided shape replacement dict
- Option 3: Custom MLIR with full dynamic shapes + torch shape inference
We currently support option 3 in Fusilli.
Option 2 (with user provided shape dict) is not desirable for two reasons:
a) If user goes the extra mile to specify shape replacements, why not just do the shape replacement themselves and give Fusilli a static MLIR (option 1) to begin with?
b) Verifying that the user provided shape replacements match the actual shapes from TensorAttr at runtime
Option 1 is doable but won't work OOTB today due to the dynamic shape casts. But probably easy to fix by taking a bool attr on the custom op `isDynamic` or something.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.