NEWS
stablehlo 0.6.0
- New
hlo_optimization_barrier().
hlo_return() accepts a token, e.g. to hand one on from a while body, and
two token ValueTypes compare equal.
- Bugfix:
format_double() rounds an f32 constant to single precision once,
instead of rounding a 9-digit decimal of it a second time.
stablehlo 0.5.0
Breaking changes
- A
Shape is now represented as an integer.
shape.Shape was removed.
- The tensor generics and
DataType now come from xlamisc, which absorbed
tengen; stablehlo no longer depends on tengen.
Features
CustomOpBackendConfig() now accepts ConstantAttr items, so a custom
call can carry array-valued attributes (what an XLA FFI handler decodes
as Span<const T>) and not just scalars, booleans and strings.
hlo_custom_call() gained an output_operand_aliases argument, built
with the new OutputOperandAlias(). XLA then hands the handler the same
buffer for the aliased operand and result, which is what lets an in-place
kernel avoid a copy.
Bug fixes
- Fixed various bugs in the stablehlo inference functions.
- Improved some error messages in the inference functions.
stablehlo 0.4.0
Features
- Added
hlo_convolution()
hlo_dot_general() gained a precision_config argument, which is
either NULL or one or two of "DEFAULT", "HIGH" and "HIGHEST".
Breaking changes
- Adopted tengen's enum-style
DataType. The BooleanType(), FloatType(),
IntegerType() and UIntegerType() constructors were removed, use
dtype() / as_dtype() instead.
- The package now requires R >= 4.4.0.
Performance
- The package was optimized w.r.t. runtime performance.
This was achieved by reducing the number of classes
that are used internally when creating
Funcs.
The hlo_<*> user API remains unaffected.
- The
hlo_* builders of common ops gained an output_types argument.
When the output types are known ahead of time (e.g. from a lowering that
ran type inference at trace time), passing them skips redundant inference
and its input validation.
Bug fixes
- emit width-correct hex for f64 NaN/Inf constants
hlo_reduce_window() now validates the shape of padding against its
declared type instead of its R representation.
stablehlo 0.3.0
Features
- Added support for CHLO ops, a higher-level companion dialect to stableHLO
that is lowered to stableHLO during compilation. New ops:
- Inverse trig:
hlo_acos(), hlo_asin(), hlo_atan().
- Hyperbolic:
hlo_cosh(), hlo_sinh(), hlo_acosh(), hlo_asinh(),
hlo_atanh().
- Gamma family:
hlo_lgamma(), hlo_digamma(), hlo_polygamma().
- Error / Bessel / misc:
hlo_erf(), hlo_erfc(), hlo_erf_inv(),
hlo_bessel_i1e(), hlo_square().
- Float predicates:
hlo_is_inf(), hlo_is_pos_inf(), hlo_is_neg_inf().
- Selection:
hlo_top_k() returning the top-k values and their indices
along the last dimension.
OpName() and new_Op() gain a dialect argument (default "stablehlo")
to support ops from other MLIR dialects.
Bug fixes
hlo_reduce_window() now works on rank-1 inputs.
stablehlo 0.2.0
Features
- Added support for Modules
Bug fixes
- Constants +-Inf/NaN of dtype f64 are now correctly created.
- Fixed assembly format for
select op with all boolean (i1) types.
Miscellaneous
- Use a simpler StableHLO string format for improved readability
stablehlo 0.1.0