[chore] Make variable names in prim.py more clear

pull/177/head
Bryce Arden 2021-03-02 16:42:21 -06:00 committed by Sean Silva
parent ca3a02da28
commit 68338eafb7
1 changed files with 4 additions and 4 deletions

View File

@ -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()