tpp-mlir
tpp-mlir copied to clipboard
Move random initialisation of kernel tensors to a pass
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
Partial work here: https://github.com/rengolin/tpp-mlir/tree/random-pass