Skip to content

Model parameters end up as constants in the IR when exporting to stable-hlo #3271

Discussion options

You must be logged in to vote

Hey @navdeepkk-polymagelabs, you will have to give a bit more context. Its not clear what model is here in this case. Usually you create a "forward" function or similar and lower that:

def forward(params, x):
  return model.apply({'params': params, x)
  
mlir_stable_hlo = jax.jit(forward).lower(params, x).as_text()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@navdeepkk-polymagelabs
Comment options

Answer selected by navdeepkk-polymagelabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants