Skip to content

RMSNorm test models do not follow the op.Range spec #7054

@titaiwangms

Description

@titaiwangms

RMSNorm spec here: https://github.com/onnx/onnx/blob/04af54e33717331fe4f2d511c44b1e1efe3c19d4/onnx/defs/nn/defs.cc#L2972C57-L2972C62 contradicts to Range spec (inputs should be scalar): https://github.com/onnx/onnx/blob/main/docs/Operators.md#Range

However, none of checker and shape_inference catch this:

Import onnx
# Load it from onnx repository
model = onnx.load("onnx/backend/test/data/node/test_rms_normalization_2d_axis0_expanded/model.onnx")
# The following both passes
onnx.shape_inference.infer_shapes(model, check_type=True, strict_mode=True)
onnx.checker.check_model(model, full_check=True)

The model is from onnx/backend/test/data/node/test_rms_normalization_2d_axis0_expanded (nne of the many)
Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions