8000 Kernel Crash on Mac M4 when running training_a_model.ipynb with mps · Issue #1886 · pyannote/pyannote-audio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Kernel Crash on Mac M4 when running training_a_model.ipynb with mps  #1886
Open
@ppsychrite

Description

@ppsychrite

Tested versions

python == 3.10.18
torch == 2.7.1
lightning == 2.5.2
pyannotate.audo = 3.3.2

System information

macOS Sequoia 15.5

Issue description

Changing the cell

import pytorch_lightning as pl

trainer = pl.Trainer(devices=1, max_epochs=1, accelerator)
trainer.fit(vad_model)

to

import pytorch_lightning as pl 
from torch import device 

vad_model = vad_model.to(device("mps"))

trainer = pl.Trainer(devices = 1, max_epochs = 1)
trainer.fit(vad_model)

so that it trains with mps instead of cpu causes a Kernel crash. This crash does not happen if you train with cpu (pl.Trainer(..., accelerator = "cpu")).

Looking at the kernel, this is the reason for the crash:

[error] Disposing session as kernel process died ExitCode: undefined, 
Reason: (mpsFileLoc): /AppleInternal/Library/BuildRoots/1c8f7852-1ca9-11f0-b28b-226177e5bb69/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:233:0: 
error: 'mps.multiply' op operands don't have
5062
 broadcast-compatible shapes

Minimal reproduction example (MRE)

Replace training_a_model.ipynb cell specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0