[mlir] add permutation utility
I found myself typing this code several times at different places by now, so time to make this a general utility instead. Given a permutation, it returns the permuted position of the input, for example (i,j,k) -> (k,i,j) yields position 1 for input 0. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D108347
Loading
Please sign in to comment