Skip to content

Add InstanceNorm3d alias-conversion regression coverage - #2820

Open
sfeng01-tech wants to merge 1 commit into
apple:mainfrom
sfeng01-tech:agent/instancenorm3d-alias-regression
Open

Add InstanceNorm3d alias-conversion regression coverage#2820
sfeng01-tech wants to merge 1 commit into
apple:mainfrom
sfeng01-tech:agent/instancenorm3d-alias-regression

Conversation

@sfeng01-tech

Copy link
Copy Markdown

Summary

#2666 reported that converting InstanceNorm3d(track_running_stats=True)
through torch.export failed with:

NotImplementedError: Unsupported fx node alias, kind alias

The alias operator is already registered on current main, so the reported
frontend conversion failure is fixed. This PR adds regression coverage for that
path.

Changes

  • Add conversion-only coverage for InstanceNorm3d.
  • Exercise both track_running_stats=False and True.
  • Cover TorchScript and torch.export frontends.
  • Convert to milinternal, ensuring the test covers frontend conversion without
    requiring Core ML runtime execution.

Why conversion-only?

Core ML runtime instance_norm supports rank-3 and rank-4 tensors only.
InstanceNorm3d uses a rank-5 tensor, so runtime prediction is unsupported
independently of the alias conversion issue.

Verification

pytest coremltools/converters/mil/frontend/torch/test/test_torch_ops.py -k TestInstanceNorm -q
40 passed

Fixes #2666.

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.

CoreML CPU InstanceNorm3d behaves differently depending on track_running_stats

2 participants