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

Fix JAX windows ci build error : missing stablehlo C API symbols #2530

Merged
merged 9 commits into from
Sep 6, 2024

Conversation

abhigunj
Copy link
Member

@abhigunj abhigunj commented Sep 6, 2024

Issue: JAX windows build is failing because of missing stablehlo C API symbols
https://github.com/google/jax/actions/runs/10739809804/job/29786443538

Root cause: StablehloApi.h defs has function overloads. Compiler does name mangling (decorating function names with additional information). These symbols are missing in JAX APIs, JAX only allowlist symbol exports for symbols starting with stablehlo, but the mangled c++ names don't have that property.

fix:

  1. add extern "C" around stablehloapi.h declarations. extern "C" instructs the compiler to suppress the mangling.
  2. rename functions to avoid function overloading

thank you @hawkinsp for help with root causing and validating the fix.

@abhigunj abhigunj changed the title Add extern c Add extern c.. validating Sep 6, 2024
@abhigunj abhigunj changed the title Add extern c.. validating [Draft] fix jax windows ci build Sep 6, 2024
@abhigunj abhigunj changed the title [Draft] fix jax windows ci build Fix JAX windows ci build error : missing stablehlo C API symbols Sep 6, 2024
@abhigunj abhigunj merged commit c667089 into openxla:main Sep 6, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants