Running:
MLIR_OPT_CHECK_IR_ROUNDTRIP=1 ninja check-mlir
will now exercises all of our test with a round-trip to bytecode and a comparison for equality.
Differential D90088
Add a `-verify-roundtrip` option to `mlir-opt` intended to validate custom printer/parser completeness mehdi_amini on Oct 23 2020, 7:30 PM. Authored by
Details Running: MLIR_OPT_CHECK_IR_ROUNDTRIP=1 ninja check-mlir will now exercises all of our test with a round-trip to bytecode and a comparison for equality.
Diff Detail
Event Timeline
Comment Actions IMO, it depends on the user running mlir-opt. If I'm iterating locally, I generally wouldn't want these additional cost/complexity of running this. For tests that run automatically, that default is probably fine. I would strongly prefer that we keep mlir-opt defaults useful for users iterating locally and generally using mlir-opt as a development tool. For testing, could we just have another frontend(alias of mlir-opt?) that has better defaults for testing use cases? We've had conversations of sane defaults in the past, and it seems like the truly contentious ones always have this divide between local development and testing. Comment Actions I'd also be pro not making it default from orthogonality point of view. Having all tests verifying printing/parsing vs having dedicated tests seems a wrong tradeoff. Yes having it default would catch cases not covered, but the fact that they aren't covered by unit tests is the problematic part that has to be addressed IMHO.
Comment Actions Add support for bytcode, fix location management which also uncover issues with singleblockimplicitterminator dropping locations :(
|
roundtripped module differs from reference? (The above are also errors in roundTrip testing)