Skip to content

How can the Metal resource limit be queried or configured on macOS? #3849

Description

@Lyxot

I encountered the following error while running an MLX workload:

[metal::malloc] Resource limit (499000) exceeded.

The Metal backend reads iogpu.rsrc_limit and uses the hardcoded 499000 fallback when that value is unavailable. On my system, sysctl iogpu.rsrc_limit returns unknown oid, so MLX always reports the fallback value. #3512 (review)

Is there a supported way to query the actual Metal resource-object limit on current macOS versions? Is there also a supported way to configure that limit, either through sysctl or another mechanism?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions