Reactant may be an awesome way to export, share and preserve scientific models (not just ML, also simulation code, etc.) written in Julia, so they can be used beyond Julia.
One problem I've run into while exploring this is how to generate StableHLO code that doesn't hardcode batch size. For example, when doing a multi-particle simulation, the exported StableHLO shouldn't hardcode the number of particles - batch size should still be flexible depending on user need and target hardware.
StableHLO itself support things like tensor<?x128xf32> right? And maybe the ? could then even be rewritten to a fixed size at the point/time of use? I've read that JAX export supports emitting StableHLO with ? dimensions via polymorphic_shapes, but I'm not an expert. Can/could Reactant support this as well?
This could be very relevant for a new project that I'm part of.
Reactant may be an awesome way to export, share and preserve scientific models (not just ML, also simulation code, etc.) written in Julia, so they can be used beyond Julia.
One problem I've run into while exploring this is how to generate StableHLO code that doesn't hardcode batch size. For example, when doing a multi-particle simulation, the exported StableHLO shouldn't hardcode the number of particles - batch size should still be flexible depending on user need and target hardware.
StableHLO itself support things like
tensor<?x128xf32>right? And maybe the?could then even be rewritten to a fixed size at the point/time of use? I've read that JAXexportsupports emitting StableHLO with?dimensions viapolymorphic_shapes, but I'm not an expert. Can/could Reactant support this as well?This could be very relevant for a new project that I'm part of.