Skip to content

[fx-importer] the importer is slow #4312

@qianfenchi

Description

@qianfenchi

Seems like converting a torch model to mlir using fx is really slow, especially for large models.
For example, we convert Qwen3-8B model to mlir with our customized dialect, using torch it takes more than 30mins (fx importer itself takes 20+mins), while using onnx it only takes 2~3mins.

Is this mainly caused by using mlir python bindings?
With onnx, we load the model and create ops in cpp.

Anyone has the same issue? How did you solve that? tks.

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