Skip to content

fix xfe ops td alignment#679

Draft
rachgupt-amd wants to merge 7 commits into
feature/onnx-to-tosafrom
rachgupt/fix-xfe-ops-td-alignment
Draft

fix xfe ops td alignment#679
rachgupt-amd wants to merge 7 commits into
feature/onnx-to-tosafrom
rachgupt/fix-xfe-ops-td-alignment

Conversation

@rachgupt-amd
Copy link
Copy Markdown

@rachgupt-amd rachgupt-amd commented Apr 10, 2026

allign xfe ops definition to corresponding onnx ops

… types

- Change OptionalAttr to DefaultValuedAttr for ceil_mode, count_include_pad (AveragePool), storage_order (MaxPool) to match ONNX defaults

- Make kernel_shape required (I64ArrayAttr) in AveragePool/MaxPool

- Make blocksize required (SI64Attr) in DepthToSpace/SpaceToDepth

- Add missing stash_type attribute to XFEGroupNormalizationOp

- Fix element type ordering to BF16-first matching ONNX convention

- Remove I8/UI8 from ops where ONNX spec does not include them; keep only in MaxPool

- Remove I32 from Conv/ConvTranspose bias to match ONNX

- Add remapQuantTypeNchw2Nhwc for GroupNorm output and forward stash_type

- Update XFEVerify.cpp and XFEShapeInference.cpp accessor patterns
…pool and GroupNorm ops

- Add kernel_shape to unranked pool verifier tests (now required)

- Add ceil_mode, count_include_pad to AveragePool CHECK patterns

- Add ceil_mode, storage_order to MaxPool CHECK patterns

- Add stash_type to GroupNormalization CHECK patterns
Comment thread src/Dialect/ONNX/XFEOps.td
…ions

- Fix attribute types: add default_value for ceil_mode, count_include_pad,
  storage_order; mark kernel_shape and blocksize as required
- Add missing stash_type attribute to GroupNormalization (default 1)
- Remove int8/uint8 from ops where ONNX spec excludes them (Conv,
  AveragePool, BatchNorm, InstanceNorm, GlobalAvgPool, GlobalMaxPool,
  GroupNorm); retain int8/uint8 for MaxPool per ONNX spec
- Remove int32 from Conv/ConvTranspose bias type constraints
- Reorder element types with bfloat16 first across all XFE ops
- Fix gen_onnx_mlir.py UTF-8 encoding for Windows compatibility
- Regenerate XFEOps.td from updated YAML schema
@jorickert jorickert self-requested a review April 13, 2026 08:24
Copy link
Copy Markdown

@jorickert jorickert left a comment

Choose a reason for hiding this comment

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

Thanks

@rachgupt-amd rachgupt-amd marked this pull request as draft April 16, 2026 16:20
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.

3 participants