(inp, oshape, odtype)
| 111 | |
| 112 | |
| 113 | def bitcast(inp, oshape, odtype): |
| 114 | odtype = np.dtype(odtype) if isinstance(odtype, str) else odtype |
| 115 | return HLOTensor( |
| 116 | hlo.BitcastConvertOp( |
| 117 | ir_utils.make_ir_type_according_meta(oshape, odtype), inp.tensor |
| 118 | ).result |
| 119 | ) |
| 120 | |
| 121 | |
| 122 | def typecvt(inp, odtype): |