You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently CAPI builds linalg and arith, etc -- but most users of CAPI (frameworks) only want StableHLO+CHLO+Serialization. Would be great to offer a stablehlo_dialect_capi which only has core APIs.
One possible separation direction:
stablehlo_dialect_capi: Just StableHLO+CHLO+Serialization APIs, these are the things useful for PJRT frameworks.
stablehlo_unified_capi: A separate target which builds the dialect CAPI along with the transformation passes / reference interpreter / other useful APIs, likely will be the target used for StableHLO python bindings
Request description
Currently CAPI builds linalg and arith, etc -- but most users of CAPI (frameworks) only want StableHLO+CHLO+Serialization. Would be great to offer a
stablehlo_dialect_capi
which only has core APIs.One possible separation direction:
stablehlo_dialect_capi
: Just StableHLO+CHLO+Serialization APIs, these are the things useful for PJRT frameworks.stablehlo_unified_capi
: A separate target which builds the dialect CAPI along with the transformation passes / reference interpreter / other useful APIs, likely will be the target used for StableHLO python bindingsThis will probably require splitting the serialization APIs into a separate file
StablehloDialectApi.h
andStablehloUnifiedApi.h
. The following functions should go into the dialect API: https://github.com/openxla/stablehlo/blob/main/stablehlo/integrations/c/StablehloApi.h#L23-L117The reference API and pass registration should go into the unified API target:
https://source.corp.google.com/piper///depot/google3/third_party/stablehlo/stablehlo/integrations/c/StablehloPasses.h
Looking at the CAPI deps today, I'm surprised that this requires upstream dialects, so definitely something to look into.
(Noted by @steeve at recent OpenXLA community meeting)
The text was updated successfully, but these errors were encountered: