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

Don't wrap singleton ir.Values with tuples during HLO lowering. #22211

Merged
merged 1 commit into from
Jul 3, 2024

Commits on Jul 1, 2024

  1. Don't wrap singleton ir.Values with tuples during HLO lowering.

    In general a JAX value might correspond to multiple HLO values, which is why the HLO lowering represents each value as a tuple of zero or more ir.Values. However, the common case is that there is exactly one value, and almost all such lists are singletons.
    
    To reduce the number of singleton list and tuple objects allocated during MLIR lowering, instead represent singleton values as unwrapped ir.Values, and only use a tuple if there is not exactly one ir.Value backing a JAX value.
    hawkinsp committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    8ab0c07 View commit details
    Browse the repository at this point in the history