This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][transform][python] Fix optional args of PadOp mix-in.
ClosedPublic

Authored by ingomueller-net on Aug 25 2023, 6:25 AM.

Details

Summary

The mix-in did not allow to *not* set many of the arguments, even though
they represent optional attributes. Instead, it set default values,
which have different semantics in some cases. In other cases, setting
the default values is already done by the C++ layer, in which case they
are currently redundant and may be wrong in some potential future change
in the TD or C++ files. With this patch, None is preserved until the
generated binding, which handles them as desired.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 6:25 AM
ingomueller-net requested review of this revision.Aug 25 2023, 6:25 AM
  • Fix type hints.
  • Add test for StringAttr padding value.

Could somebody look at this patch?

springerm accepted this revision.Sep 1 2023, 12:45 AM
springerm added inline comments.
mlir/test/python/dialects/transform_structured_ext.py
343

Is this silently getting dropped?

This revision is now accepted and ready to land.Sep 1 2023, 12:45 AM