mirror of https://github.com/llvm/torch-mlir
[chore] Make variable names in prim.py more clear
parent
ca3a02da28
commit
68338eafb7
|
@ -70,8 +70,8 @@ def prim_unchecked_cast(i: typing.Optional[int]):
|
||||||
# CHECK: return %[[RET]]#0 : i64
|
# CHECK: return %[[RET]]#0 : i64
|
||||||
@mb.import_function
|
@mb.import_function
|
||||||
@torch.jit.script
|
@torch.jit.script
|
||||||
def prim_TupleUnpack(lt: typing.Tuple[int, int]):
|
def prim_TupleUnpack(tup: typing.Tuple[int, int]):
|
||||||
val, _ = lt
|
val, _ = tup
|
||||||
return val
|
return val
|
||||||
|
|
||||||
# CHECK-LABEL: func @prim_ListUnpack(
|
# CHECK-LABEL: func @prim_ListUnpack(
|
||||||
|
@ -80,8 +80,8 @@ def prim_TupleUnpack(lt: typing.Tuple[int, int]):
|
||||||
# CHECK: return %[[RET]]#1 : i64
|
# CHECK: return %[[RET]]#1 : i64
|
||||||
@mb.import_function
|
@mb.import_function
|
||||||
@torch.jit.script
|
@torch.jit.script
|
||||||
def prim_ListUnpack(lt: typing.List[int]):
|
def prim_ListUnpack(l: typing.List[int]):
|
||||||
_, val, _ = lt
|
_, val, _ = l
|
||||||
return val
|
return val
|
||||||
|
|
||||||
mb.module.operation.print()
|
mb.module.operation.print()
|
||||||
|
|
Loading…
Reference in New Issue