[RFC] MLIR Test Case Reducer Tool (original) (raw)

June 29, 2020, 12:46am 4

Thanks for the nice write-up Mauricio.

I think that will indeed be another interesting part here. As Mauricio mentioned there is a scope from passes that are purely black box (which again could include just textual manipulation to deleting random ops using erase method) to ones that actually understand some semantics (e.g., reuse DCE pass) to ones that understand the exact op semantics (e.g., op interface-based or dialect book based). And these need not be specific to reduction (e.g., using canonicalization which can call op/dialect folder hooks) but could be. E.g., a pass with dialect hook to fold ops to some constant (so replace everything post a given node to some frontier with some constant value) that will not cause any unrelated failures (e.g., a TPU compile op needs to feed into TPU execute op, so one can’t just replace compile op with random constant as execute op verifies that a compile op feeds it, one might need to always both of them).

We should definitely think about that from the start, but I can see even the more naive/black box methods already being pretty useful here :slight_smile:

Or failure cases that folks can think of/perhaps some interesting error cases that one had to manually debug that one thinks can/cannot be handled by such a tool.

Best,

Jacques