(inp, permutation)
| 70 | |
| 71 | |
| 72 | def transpose(inp, permutation): |
| 73 | assert len(inp.shape) == len( |
| 74 | permutation |
| 75 | ), f"incompatible shape and permutation: {inp.shape} vs {permutation}" |
| 76 | return HLOTensor( |
| 77 | hlo.TransposeOp(inp.tensor, ir_utils.dense_int_elements(permutation)).result |
| 78 | ) |
| 79 | |
| 80 | |
| 81 | def expand_dims(inp, axis): |
no test coverage detected