@@ -340,9 +340,9 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
340340 exir .print_program .pretty_print (program )
341341
342342 deboxed_int_list = []
343- for item in program .execution_plan [0 ].values [5 ].val .items : # pyre-ignore[16]
343+ for item in program .execution_plan [0 ].values [5 ].val .items :
344344 deboxed_int_list .append (
345- program .execution_plan [0 ].values [item ].val .int_val # pyre-ignore[16]
345+ program .execution_plan [0 ].values [item ].val .int_val
346346 )
347347
348348 self .assertEqual (IntList (deboxed_int_list ), IntList ([2 , 0 , 1 ]))
@@ -459,7 +459,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
459459 # Check the mul operator's stack trace contains f -> g -> h
460460 self .assertTrue (
461461 "return torch.mul(x, torch.randn(3, 2))"
462- in program .execution_plan [0 ] # pyre-ignore[16]
462+ in program .execution_plan [0 ]
463463 .chains [0 ]
464464 .stacktrace [1 ]
465465 .items [- 1 ]
@@ -618,7 +618,7 @@ def false_fn(y: torch.Tensor) -> torch.Tensor:
618618
619619 op = (
620620 program .execution_plan [0 ]
621- .operators [inst .instr_args .op_index ] # pyre-ignore[16]
621+ .operators [inst .instr_args .op_index ]
622622 .name
623623 )
624624
@@ -657,7 +657,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
657657 # generate the tensor on which this iteration will operate on.
658658 self .assertEqual (
659659 op_table [
660- program .execution_plan [0 ] # pyre-ignore[16]
660+ program .execution_plan [0 ]
661661 .chains [0 ]
662662 .instructions [0 ]
663663 .instr_args .op_index
@@ -666,7 +666,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
666666 )
667667 self .assertEqual (
668668 op_table [
669- program .execution_plan [0 ] # pyre-ignore[16]
669+ program .execution_plan [0 ]
670670 .chains [0 ]
671671 .instructions [1 ]
672672 .instr_args .op_index
@@ -681,7 +681,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
681681 # We check here that both of these have been generated.
682682 self .assertEqual (
683683 op_table [
684- program .execution_plan [0 ] # pyre-ignore[16]
684+ program .execution_plan [0 ]
685685 .chains [0 ]
686686 .instructions [- 5 ]
687687 .instr_args .op_index
@@ -690,7 +690,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
690690 )
691691 self .assertEqual (
692692 op_table [
693- program .execution_plan [0 ] # pyre-ignore[16]
693+ program .execution_plan [0 ]
694694 .chains [0 ]
695695 .instructions [- 4 ]
696696 .instr_args .op_index
@@ -699,7 +699,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
699699 )
700700 self .assertEqual (
701701 op_table [
702- program .execution_plan [0 ] # pyre-ignore[16]
702+ program .execution_plan [0 ]
703703 .chains [0 ]
704704 .instructions [- 3 ]
705705 .instr_args .op_index
@@ -716,7 +716,7 @@ def map_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
716716 )
717717 self .assertEqual (
718718 op_table [
719- program .execution_plan [0 ] # pyre-ignore[16]
719+ program .execution_plan [0 ]
720720 .chains [0 ]
721721 .instructions [- 1 ]
722722 .instr_args .op_index
@@ -1300,7 +1300,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
13001300 # this triggers the actual emission of the graph
13011301 program = program_mul ._emitter_output .program
13021302 node = None
1303- program .execution_plan [0 ].chains [0 ].instructions [ # pyre-ignore[16]
1303+ program .execution_plan [0 ].chains [0 ].instructions [
13041304 0
13051305 ].instr_args .op_index
13061306
@@ -1314,7 +1314,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
13141314 # Find the multiplication instruction in the program that was emitted.
13151315 for idx in range (len (program .execution_plan [0 ].chains [0 ].instructions )):
13161316 instruction = program .execution_plan [0 ].chains [0 ].instructions [idx ]
1317- op_index = instruction .instr_args .op_index # pyre-ignore[16]
1317+ op_index = instruction .instr_args .op_index
13181318 if "mul" in program .execution_plan [0 ].operators [op_index ].name :
13191319 break
13201320
@@ -1454,7 +1454,7 @@ def forward(self, x, y):
14541454 self .assertIsNotNone (exec_prog .delegate_map )
14551455 self .assertIsNotNone (exec_prog .delegate_map .get ("forward" ))
14561456 self .assertIsNotNone (
1457- exec_prog .delegate_map .get ("forward" ).get (0 ) # pyre-ignore[16]
1457+ exec_prog .delegate_map .get ("forward" ).get (0 )
14581458 )
14591459 self .assertEqual (
14601460 exec_prog .delegate_map .get ("forward" ).get (0 ).get ("name" ),
@@ -1568,7 +1568,7 @@ def forward(self, x):
15681568 model = model .to_executorch ()
15691569 model .dump_executorch_program (True )
15701570 self .assertTrue (
1571- model .executorch_program .execution_plan [0 ] # pyre-ignore[16]
1571+ model .executorch_program .execution_plan [0 ]
15721572 .values [0 ]
15731573 .val .allocation_info
15741574 is not None
@@ -1611,7 +1611,7 @@ def forward(self, x):
16111611 )
16121612 model .dump_executorch_program (True )
16131613 self .assertTrue (
1614- model .executorch_program .execution_plan [0 ] # pyre-ignore[16]
1614+ model .executorch_program .execution_plan [0 ]
16151615 .values [0 ]
16161616 .val .allocation_info
16171617 is not None
0 commit comments