Skip to content

[BUG] crash while using new_stream #2118

@davidkoski

Description

@davidkoski

Describe the bug

crash while using new_stream -- I was trying to replicate something from the swift side and I can see the same error there.

To Reproduce

Include code snippet

import mlx.core as mx

i = 0
while True:
	print(i)

	s = mx.new_stream(mx.gpu)
	x = mx.random.uniform(shape=[10, 10]).sum(stream=s)
	_ = x.item()

	i += 1
...
607
608
609
libc++abi: terminating due to uncaught exception of type std::runtime_error: [METAL] Command buffer execution failed: Internal Error (0000010a:Internal Error)
[1]    10855 abort      python /tmp/t.py

Expected behavior

No crash

Desktop (please complete the following information):

  • OS Version: macOS 15.4
  • Version 0.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions