-
Notifications
You must be signed in to change notification settings - Fork 886
Description
🐛 Describe the bug
Hi,
When device="MPS" (on MAC), and have LayerNorm in my model I got the following error:
Exception: An error occurred when running the 'DecomposeLayerNormPass' pass after the following passes: ['RemoveGraphAssertsPass', 'ConvertInt64ConstOpsToInt32Pass', 'ConvertInt64OutputOpsToInt32Pass', 'InsertInt32CastsAfterInt64PlaceholdersPass', 'DecomposeEmbeddingPass', 'DecomposeScaledDotProductAttention', 'DecomposeRoundPass', 'DecomposeLogitPass', 'CastBoolToInt8Pass', 'DecomposeSignPass', 'DecomposeAddmmPass', 'DecomposeDivTensorModePass', 'DecomposeAddSubAlphaPass', 'ReplaceScalarWithTensorArgPassTOSABI', 'ScalarsToAttributePass', 'DecomposeGroupNormPass']
If I set the device to CPU, it is OK.
I attach an example that reproduces this error when running on MAC.
Versions
Collecting environment information...
PyTorch version: 2.9.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 15.7.4 (arm64)
GCC version: Could not collect
Clang version: 17.0.0 (clang-1700.6.4.2)
CMake version: Could not collect
Libc version: N/A
Python version: 3.12.10 (v3.12.10:0cc81280367, Apr 8 2025, 08:46:59) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)
Python platform: macOS-15.7.4-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A
CPU:
Apple M4 Max
Versions of relevant libraries:
[pip3] executorch==1.0.1
[pip3] numpy==2.3.5
[pip3] onnx==1.20.1
[pip3] onnx-ir==0.2.0
[pip3] onnx_opcounter==0.0.4
[pip3] onnxprofile==0.0.1
[pip3] onnxruntime==1.23.2
[pip3] onnxscript==0.6.2
[pip3] pytorch_tokenizers==1.0.1
[pip3] torch==2.9.1
[pip3] torchao==0.14.0
[pip3] torchaudio==2.9.1
[pip3] torchcodec==0.8.1
[pip3] torchmetrics==1.8.2
[pip3] torchvision==0.24.1
[conda] Could not collect
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell