openxla / stablehlo

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

Use ConfinedAttr to verify attr range is positve or nonnegative #2416

Closed ghpvnist closed 3 months ago

ghpvnist commented 3 months ago

I recently came across confining attributes, and it's a nice feature that we should leverage to maximize ODS strengths.

I'm still looking into whether we can use them for array attributes. If possible, we may be able to remove tons of manual verification.