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
Extend the lowering context to handle 0 and 1 value scalars as device data parameters. As it stands, IsSpecialScalar, by default, captures 0 and 1 input values as ScalarOps IR values instead of device data when lowering the output ops.
Motivation
At the moment, these scalar values will be treated as IR constants and be inlined in the computation. At the same time, users will be no control over recompilations when re-using the same computation with the mutable scalar parameter. This is particularly prominent when generating the body computation for while loops.
In addition, not having the proper scalar parameters present may cause unexpected signatures in the input/output, particularly when these are expected or enforced elsewhere, namely OpenXLA's while loop input/output requirements for the body/cond.
In some cases, the parameter is missed out, or the provided parameter is a no-op, since there is an inlined constant in the computation [1].
Pitch
The user should be able to explicitly enforce to only inline constants, and/or only inline constants that are not given as a parameter.
🚀 Feature
Extend the lowering context to handle 0 and 1 value scalars as device data parameters. As it stands,
IsSpecialScalar
, by default, captures 0 and 1 input values as ScalarOps IR values instead of device data when lowering the output ops.Motivation
At the moment, these scalar values will be treated as IR constants and be inlined in the computation. At the same time, users will be no control over recompilations when re-using the same computation with the mutable scalar parameter. This is particularly prominent when generating the body computation for while loops.
In addition, not having the proper scalar parameters present may cause unexpected signatures in the input/output, particularly when these are expected or enforced elsewhere, namely OpenXLA's while loop input/output requirements for the body/cond.
In some cases, the parameter is missed out, or the provided parameter is a no-op, since there is an inlined constant in the computation [1].
Pitch
The user should be able to explicitly enforce to only inline constants, and/or only inline constants that are not given as a parameter.
[1]:
The text was updated successfully, but these errors were encountered: