tpp-mlir icon indicating copy to clipboard operation
tpp-mlir copied to clipboard

Move random initialisation of kernel tensors to a pass

Open rengolin opened this issue 1 year ago • 1 comments

The current implementation replaces dense tensors with random values, but this is restricted to tpp-run.

For tpp-opt tests, we can't use that, and we end up using dense tensors, and if they're the same value, CSE can remove some ops that should not be removed (as exposed by #356).

This should really be a pass, that isn't in the default pipeline (as it's destructive and does not apply to user-driven models), but can be called on tests by piping the results through one more hop of tpp-opt:

$ generate_some_mlir.sh | tpp-opt --rand-init-dense | tpp-run ...

@adam-smnk

rengolin avatar Mar 06 '23 14:03 rengolin

Partial work here: https://github.com/rengolin/tpp-mlir/tree/random-pass

rengolin avatar May 11 '23 10:05 rengolin