Skip to content

Support for opset 14 #239

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Swopper050
Copy link
Collaborator

Closes #216

@Swopper050 Swopper050 requested review from Copilot and wipsel March 30, 2025 15:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for ONNX opset 14 across several operators. Key changes include:

  • Addition of version 14 operator constructors and related type constraints for multiple ops (trilu, sub, rnn, relu, mul, lstm, identity, gru, div, cumsum, and add).
  • Introduction of a new layout attribute and associated reshape logic in RNN, LSTM, and GRU operators to support batch-first tensor layouts.
  • Updates to corresponding test files and documentation to reflect opset 14 support.

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ops/trilu/* Added tests and implementation updates for opset 14 support
ops/sub/versions.go Added version 14 operator constructor and type constraints
ops/rnn/* Extended operator and tests with layout support and version 14
ops/relu/versions.go Added version 14 support and new type constraints
ops/mul/versions.go Added version 14 operator constructor and type constraints
ops/lstm/* Extended operator and tests with layout support and version 14
ops/identity/versions.go Added version 14 operator constructor
ops/gru/* Extended operator and tests with layout support and version 14
ops/div/versions.go Added version 14 operator constructor and type constraints
ops/cumsum/versions.go Added version 14 operator constructor
ops/add/versions.go Added version 14 operator constructor and type constraints
README.md Updated documentation to reflect support for opset 14
Comments suppressed due to low confidence (2)

ops/rnn/rnn_test.go:407

  • Ensure that the package 'math/rand' is imported explicitly in this test file if it is not already, as the use of rand.New requires it.
r := rand.New(rand.NewSource(13))

ops/rnn/rnn.go:111

  • Reshaping the input tensor X directly may result in unintended side effects if the original tensor is reused elsewhere. Consider cloning the tensor before reshaping.
err := X.Reshape(seqLength, batchSize, inputSize)

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.

Implement opset 14
1 participant