openxla / stablehlo

Backward compatible ML compute opset inspired by HLO/MHLO
Apache License 2.0
399 stars 110 forks source link

Implement Extensibility RFC #2070

Closed mlevesquedion closed 5 months ago

mlevesquedion commented 7 months ago

This is a work tracker for the implementation of the Extensibility 101 RFC.

Tasks (some tasks may be missing):

mlevesquedion commented 5 months ago

Just looked into "Model memory effects for composite op" -- I don't remember why I added this, as I don't see it in the RFC. In order to determine if a composite has memory effects, the decomposition must be examined. Unfortunately, this is not simple to do because we need a SymbolTable to look up the decomposition, and the getEffects interface method does not have such an argument. We can recover the decomposition through other means, but we may end up with a different function that we looked up in verifySymbolUses.

MLIR's own CallOp, which is similar to CompositeOp, doesn't implement MemoryEffectsOpInterface, so IMO it is acceptable to punt on this.

By default, an op is assumed to have all effects if it does not explicitly report that it has no effects.