Simple Representation of Matrices with the Given Equivalence Relationship
When you are dealing with binary matrices, this is the problem of graph canonization.  There is no known polynomial-time algorithm for this problem, and determining whether it can be done in polynomial time is a famous open problem, but there are techniques that are often reasonably efficient in practice (e.g., Nauty).  (The relationship is that every graph corresponds to a binary matrix, namely, it adjacency matrix, and versa.)

When you have non-binary matrices, you can think of this as a graph with labels on the edges.  There are standard techniques for reducing this to the standard graph canonization problem, by converting each labelled edge to a small subgraph.  See, e.g., Graph isomorphism problem for labeled graphs, On graph isomorphism for weighted graphs, What equivalence relation does this algorithm produce for an cyclic directed graph with labeled edges?.