StableHLO status

When bootstrapping StableHLO from MHLO, we have inherited MHLO‘s implementation of many things, including prettyprinting, verification and shape inference. Thanks to that, we already have significant coverage of the opset, but there’s still plenty to do to review the existing implementations for completeness and provide new implementations where none exist.

This live document is for the developers and the users to track the progress on various aspects of the opset - specification, verification, type inference, pretty printing, interpreter, etc.

How to use it

The progress of a StableHLO op, as mentioned in the corresponding row, on a particular aspect, as mentioned in the corresponding column, is tracked using one of the following tracking labels.

  • Generic labels
    • yes: there is a comprehensive implementation.
    • no: there is no implementation, but working on that is part of the roadmap. Note that Verifier can never be labeled as “no” because the ODS already implements some verification.
  • Customized labels for Verifier and Type Inference
    • yes: there is an implementation, and it's in sync with StableHLO semantics.
    • yes*: there is an implementation, and it's in sync with XLA semantics. Since XLA semantics is oftentimes underdocumented, we are using hlo_verifier.cc and shape_inference.cc as the reference.
    • revisit: there is an implementation, but it doesn‘t fall under “yes” or “yes*” - either because we haven’t audited it yet, or because we have and found issues.
    • infeasible: there is no implementation, because it's infeasible. For example, because the result type of an op cannot be inferred from its operands and attributes.

Status

StableHLO OpSpecificationVerificationType InferencePretty PrintingInterpreter
absyesyesyesyesyes
addyesyesyesyesyes
after_allyesyesyesyesno
all_gatheryesrevisitnonono
all_reduceyesrevisityesnono
all_to_allyesrevisityesnono
andyesyesyesyesyes
atan2yesyesyesyesyes
batch_norm_gradyesrevisityesnoyes
batch_norm_inferenceyesrevisityesnoyes
batch_norm_trainingyesrevisityesnoyes
bitcast_convertyesyesinfeasibleyesno
broadcastnoyes*yes*yesno
broadcast_in_dimyesyesinfeasibleyesyes
caseyesrevisityesnoyes
cbrtyesyesyesyesyes
ceilyesyesyesyesyes
choleskyyesyesyesyesyes
clampyesrevisityesyesyes
collective_permuteyesrevisityesnono
compareyesyesyesyesyes
complexyesyesyesyesyes
compute_reshape_shapenorevisitnoyesno
concatenateyesyesyesyesyes
constantyesyesyesyesyes
convertyesyesinfeasibleyesyes
convolutionyesyesinfeasiblerevisitno
cosineyesyesyesyesyes
count_leading_zerosyesyesyesyesyes
create_tokennoyes*yes*yesno
cross-replica-sumnorevisityes*nono
cstr_reshapablenorevisitnoyesno
custom_callyesyesinfeasibleyesyes
divideyesyesyesyesyes
dotnorevisitinfeasibleyesno
dot_generalyesrevisitinfeasiblenono
dynamic_broadcast_in_dimnorevisitinfeasiblenono
dynamic_convnorevisitnonono
dynamic_gathernorevisitrevisitnono
dynamic_iotanorevisitinfeasibleyesno
dynamic_padnorevisitnoyesno
dynamic_reshapenorevisitinfeasibleyesno
dynamic_sliceyesyesyesyesyes
dynamic_update_sliceyesyesyesyesyes
einsumnorevisitnoyesno
exponentialyesyesyesyesyes
exponential_minus_oneyesyesyesyesyes
fftyesrevisityesyesno
flooryesyesyesyesyes
gatheryesyesyesnoyes
get_dimension_sizeyesyesyesyesyes
get_tuple_elementyesyesyesyesno
ifyesrevisityesnoyes
imagyesyesyesyesyes
infeedyesrevisitinfeasiblenono
iotayesyesinfeasibleyesyes
is_finiteyesyesyesyesyes
logyesyesyesyesyes
log_plus_oneyesyesyesyesyes
logisticyesyesyesyesyes
mapyesrevisityesnoyes
maximumyesyesyesyesyes
minimumyesyesyesyesyes
multiplyyesyesyesyesyes
negateyesyesyesyesyes
notyesyesyesyesyes
optimization_barrieryesyesyesyesno
oryesyesyesyesyes
outfeedyesyesyesnono
padyesyesyesyesyes
partition_idyesyesyesyesno
popcntyesyesyesyesyes
poweryesyesyesyesyes
realyesyesyesyesyes
real_dynamic_slicenorevisitnoyesno
recvyesrevisitinfeasiblenono
reduceyesrevisityesrevisityes
reduce_precisionyesyesyesyesno
reduce_scatteryesrevisitnonono
reduce_windowyesrevisityesnoyes
remainderyesyesyesyesyes
replica_idyesyesyesyesno
reshapeyesyesinfeasibleyesyes
returnnorevisitinfeasibleyesyes
reverseyesyesyesyesyes
rngyesyesyesyesno
rng_bit_generatoryesrevisitinfeasibleyesno
round_nearest_afzyesyesyesyesyes
round_nearest_evenyesyesyesyesyes
rsqrtyesyesyesyesyes
scatteryesrevisityesnoyes
selectyesyesyesyesyes
select_and_scatteryesrevisityesnono
sendyesrevisityesnono
set_dimension_sizenoyes*yes*yesno
shift_leftyesyesyesyesyes
shift_right_arithmeticyesyesyesyesyes
shift_right_logicalyesyesyesyesyes
signyesyesyesyesyes
sineyesyesyesyesyes
sliceyesyesyesnoyes
sortyesyesyesnoyes
sqrtyesyesyesyesyes
subtractyesyesyesyesyes
tanhyesyesyesyesyes
torch_index_selectnorevisitnonono
tracenorevisitnoyesno
transposeyesyesyesyesyes
triangular_solveyesrevisityesnono
tupleyesyesyesyesno
unary_einsumnorevisitnoyesno
uniform_dequantizenoyes*yes*yesno
uniform_quantizenoyes*infeasibleyesno
whileyesrevisityesrevisityes
xoryesyesyesyesyes