burn icon indicating copy to clipboard operation
burn copied to clipboard

Help Wanted: Implementing ONNX Ops

Open antimora opened this issue 9 months ago • 2 comments

The Burn community would greatly appreciate your help in completing the missing ONNX operations in the burn-import crate. By contributing to this effort, you can help expand the functionality and usability of Burn for a wider range of machine learning models.

List of Missing Ops (Available in Burn but not in burn-import)

Top Requested Ops

  • [x] Expand
  • [x] Tile (dependent on #1715)
  • [x] Slice

Relatively Easy Ops (Similar to Existing Implemented Ops)

  • [x] ArgMax
  • [x] AveragePool1d
  • [ ] ConvTranspose1d
  • [x] Gather
  • [x] Greater
  • [x] GreaterOrEqual
  • [x] Less
  • [x] LessOrEqual
  • [x] Max
  • [x] MaxPool1d
  • [x] Mean
  • [x] Min
  • [x] PRelu
  • [x] Pad
  • [x] Range
  • [x] ReduceMin
  • [x] ReduceProd
  • [x] ReduceSum
  • [x] Squeeze
  • [x] Sum
  • [ ] TopK
  • [ ] Trilu

Harder Ops (Not Similar to Existing Implemented Ops)

  • [ ] GRU
  • [ ] GroupNormalization
  • [ ] If (dependent on #724)
  • [ ] InstanceNormalization
  • [ ] LSTM
  • [ ] MatMulInteger
  • [ ] OneHot
  • [ ] RNN
  • [x] RandomNormal
  • [ ] RandomNormalLike
  • [x] RandomUniform
  • [ ] RandomUniformLike
  • [x] Resize
  • [x] Scatter

For a comprehensive list of all supported ONNX Ops, please refer to the SUPPORTED-ONNX-OPS.md file in the Burn repository.

Getting Started

To begin contributing, please follow the instructions in the contributor book:

# Build the book and open in a browser
cargo xtask books contributor open

Once the book is built, navigate to http://localhost:3011/guides/onnx-to-burn-conversion-tool.html for detailed guidance on how to implement missing ONNX operations in the burn-import crate.

Related Issues Submitted by Users

Several users have submitted issues related to missing ONNX operations. These issues can provide valuable context and help prioritize the implementation of specific ops:

  1. Issue #1593
  2. Issue #1560
  3. Issue #1544
  4. Issue #675
  5. Issue #673
  6. Issue #600
  7. Issue #510

By tackling these missing ops, you can help address the needs of the Burn community and contribute to the growth and effectiveness of the project. Thank you for your interest in contributing to Burn!

antimora avatar Apr 30 '24 21:04 antimora

@Arjun31415, @AntBlo, @agelas, @hexd0t, @will-maclean, @mosure, @JachymPutta, @johnhuichen, @mepatrick73, @cBournhonesque, @Dirleye, @laggui

Thank you very much for answering Burns' call for help. Your contributions have greatly enhanced ONNX Op coverage! This truly has been a community effort.

antimora avatar Aug 27 '24 18:08 antimora

Your PR changes are part of Burn 0.14: https://github.com/tracel-ai/burn/releases/tag/v0.14.0

antimora avatar Aug 27 '24 18:08 antimora

@antimora

Can we add the Split operator to the list too? Looking at this list, it's not present in burn as well though :thinking:

Luni-4 avatar Oct 09 '24 09:10 Luni-4

@Luni-4

@antimora

Can we add the Split operator to the list too? Looking at this list, it's not present in burn as well though 🤔

This ticket is mostly catching up with ONNX ops that can be implemented immediately without adding a Burn OP.

I think we should file a separate ticket (if you don't mind filing since you might know a better use case)

antimora avatar Oct 29 '24 17:10 antimora

@antimora

You are perfectly right, I should have noticed the difference. Yes, I can file another issue

Luni-4 avatar Oct 30 '24 08:10 Luni-4