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

feature/onnx-to-tosa #4

Draft
wants to merge 1,653 commits into
base: main
Choose a base branch
from
Draft

feature/onnx-to-tosa #4

wants to merge 1,653 commits into from

Conversation

mgehre-amd
Copy link
Collaborator

DO NOT merge, just to look at our diff

@mgehre-amd mgehre-amd changed the title Feature/onnx_to_tosa feature/onnx-to-tosa Jun 26, 2023
gongsu832 and others added 29 commits November 11, 2024 14:47
Signed-off-by: Sam <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
)

* Delay scrubbing disposable elements attribute

Signed-off-by: Tung D. Le <[email protected]>

---------

Signed-off-by: Tung D. Le <[email protected]>
…nnx#3002)

* Check the return value when mmapping a file and exit gently if failed

Signed-off-by: Tung D. Le <[email protected]>

* Fix a bug in z/OS code

Signed-off-by: Tung D. Le <[email protected]>

* Convert filename to EBCDIC when generating code for zOS

Signed-off-by: Tung D. Le <[email protected]>

---------

Signed-off-by: Tung D. Le <[email protected]>
Do not fuse locations when normalizing constants for Add and Mul
…tatic shapes are only run if the types have a static shape
Ensure that constant propagation patterns that rely on types having static shapes are only run if the types have a static shape
Use CHECK-DAG instead of CHECK to make location test more robust
…ng functions and misc cleanups.

Also remove some unecessary semicolons and standardize to use mlir instead of llvm casts
Replace deprecated use of .cast/dyn_cast/isa with the mlir freestanding functions and misc cleanups.
Make ONNX to TOSA conversion resistant to dynamic types
…of_const_for_folding

Revert "Use tensor.extract_slice of wts/bias to benefit from folders"
* Fix security vulenraibilities in requirements.txt for mnist example- CVE-2024-28219 pillow
- CVE-2024-48063 torch package
- CVE-2024-31584 CVE-2024-31583 CVE-2024-31580 for torch package

Signed-off-by: Sunny Anand <[email protected]>

* upgrade torchvision to match torch

Signed-off-by: Sunny Anand <[email protected]>

---------

Signed-off-by: Sunny Anand <[email protected]>
chaitanyakamarapu and others added 30 commits January 31, 2025 17:11
…_work_with_integer_type

ONNXPadOp now also lowes to TOSA integer types
Fix lowering of onnx.Mul with dynamic shape
…ked types.

- Add checks for types being ranked in various lowerings
- Refactor getSplattedConst to only require a type and not a rank
- Manually annotate the return type for some tosa ops to prevent type mismatches
-- In some cases to result type of an op can not be inferred just from its inputs, in these cases the annotation is always necxessary
-- In some cases the TOSA shape inference does not infere types even if it is possible, this is something I want to improve in another PR for MLIR.
Make ONNX to TOSA lowering more resistant to dynamic shapes and unranked types.
Fix LayerNorm recomposition by properly using provided epsilon value
* Bump various ops to opset 22, adding bf16 support

Bumped ops:
Acos
Acosh
Asin
Asinh
Atan
Atanh
AveragePool
Bernoulli
Conv
ConvTranspose
Cos
Cosh
DeformConv
Det
Dropout
Elu
EyeLike
GRU
GlobalAveragePool
GlobalMaxPool
HardSigmoid
HardSwish
InstanceNormalization
LSTM
LpNormalization
LpPool
MaxPool
MaxRoiPool
MaxUnpool
Mish
Multinomial
NegativeLogLikelihoodLoss
RNN
RandomNormal
RandomNormalLike
RandomUniform
RandomUniformLike
RoiAlign
Round
Selu
Sin
Sinh
Softplus
Softsign
Tan
ThresholdedRelu

Signed-off-by: Rickert, Jonas <[email protected]>

* Add test to ensure that we can parse multiple opsets

Signed-off-by: Rickert, Jonas <[email protected]>

---------

Signed-off-by: Rickert, Jonas <[email protected]>
Co-authored-by: Liam Fitzpatrick <[email protected]>
* Add support for TensorProto::UINT4/INT4

Signed-off-by: Rickert, Jonas <[email protected]>

* Upgrade onnx.Cast to opset 21

Signed-off-by: Rickert, Jonas <[email protected]>

---------

Signed-off-by: Rickert, Jonas <[email protected]>
* feat: add verifier and shape inference for Onnx.GridSample.

Signed-off-by: Rickert, Jonas <[email protected]>

* Support onnx.GridSampleV22

Signed-off-by: Rickert, Jonas <[email protected]>

* Check attributes in GridSample verifier

Signed-off-by: Rickert, Jonas <[email protected]>

---------

Signed-off-by: Rickert, Jonas <[email protected]>
Co-authored-by: Tiago Trevisan Jost <[email protected]>
Cherry-pick opset updates from upstream
Add support for Gridsample 20 and 22.
…e_return

Fix return type of recomposed ops
Add options to specify directory with ONNX initializer files
…d_file

Remove accidentally commited file
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.