Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Darwin CPU "LLVM ERROR: inconsistency in registered CommandLine options" #20284

Open
joelberkeley opened this issue Dec 8, 2024 · 3 comments

Comments

@joelberkeley
Copy link

joelberkeley commented Dec 8, 2024

When I use the CPU plugin on ARM64/AArch64 Darwin, it works with XLA HLO but when I use StableHLO it fails to even start, with error

: CommandLine Error: Option 'experimental-debuginfo-iterators' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

which apparently happens when LLVM is linked twice. StableHLO works fully on linux. I also believe it's working on Apple Metal, though I'm seeing a different error there so I'm not completely certain.

I'm building the plugin as a shared dylib. I'm also building PJRT and the HLO builder API together in another dylib. That's two dylibs in total. The PJRT/HLO dylib has the following dependencies.

        "@llvm-project//mlir:IR",
        "@stablehlo//:register",
        "@stablehlo//:stablehlo_serialization",
        "@xla//xla/client:executable_build_options",
        "@xla//xla/hlo/builder/lib:math",
        "@xla//xla/hlo/builder/lib:matrix",
        "@xla//xla/hlo/builder/lib:prng",
        "@xla//xla/hlo/builder:xla_builder",
        "@xla//xla/hlo/ir:hlo",
        "@xla//xla/hlo/translate:stablehlo",
        "@xla//xla/mlir_hlo:hlo_dialect_registration",
        "@xla//xla/pjrt/c:pjrt_c_api_helpers",
        "@xla//xla/pjrt:pjrt_executable",
        "@xla//xla/service",
        "@xla//xla:literal",

I have also discussed this on the openxla discord with @GleasonK, where he suggested removing instances of compatible_with = get_compatible_with_portable() from BUILD files, and, separately, removing #include "xla/service/llvm_ir/llvm_util.h". I didn't get either to work, but I don't know if I did it correctly.

I forgot to mention

@joelberkeley
Copy link
Author

Depending on how complicated this is, I might be up for fixing it.

@joelberkeley
Copy link
Author

Note I still experience this problem when I remove my dependency

        "@llvm-project//mlir:IR",

@joelberkeley
Copy link
Author

Is there any chance I could get an estimate of whether this will be fixed soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant