@@ -16,7 +16,7 @@ class TestIdentityEliminationPass(unittest.TestCase):
1616 def test_eliminate_identity_not_graph_output (self ):
1717 """Test: y = Identity(x) where y is not a graph output."""
1818 # Create a simple model: input -> Identity -> Add -> output
19- input_value = ir .Input (
19+ input_value = ir .val (
2020 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
2121 )
2222
@@ -110,7 +110,7 @@ def test_eliminate_identity_with_output_renaming(self):
110110 def test_keep_identity_when_both_input_and_output_are_graph_boundaries (self ):
111111 """Test: y = Identity(x) where y is graph output AND x is graph input."""
112112 # Create graph input
113- input_value = ir .Input (
113+ input_value = ir .val (
114114 "graph_input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
115115 )
116116
@@ -150,7 +150,7 @@ def test_keep_identity_when_both_input_and_output_are_graph_boundaries(self):
150150 def test_multiple_identity_nodes (self ):
151151 """Test elimination of multiple Identity nodes in different scenarios."""
152152 # Create graph input
153- input_value = ir .Input (
153+ input_value = ir .val (
154154 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
155155 )
156156
@@ -203,7 +203,7 @@ def test_multiple_identity_nodes(self):
203203
204204 def test_invalid_identity_node_skipped (self ):
205205 """Test that invalid Identity nodes are skipped."""
206- input_value = ir .Input (
206+ input_value = ir .val (
207207 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
208208 )
209209
@@ -261,7 +261,7 @@ def test_identity_with_none_input_skipped(self):
261261
262262 def test_no_identity_nodes (self ):
263263 """Test pass on a graph with no Identity nodes."""
264- input_value = ir .Input (
264+ input_value = ir .val (
265265 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
266266 )
267267
@@ -311,7 +311,7 @@ def test_empty_graph(self):
311311
312312 def test_chain_of_identities (self ):
313313 """Test elimination of a chain of Identity nodes."""
314- input_value = ir .Input (
314+ input_value = ir .val (
315315 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
316316 )
317317
@@ -362,7 +362,7 @@ def test_chain_of_identities(self):
362362
363363 def test_non_standard_domain_identity_skipped (self ):
364364 """Test that Identity nodes with non-standard domain are skipped."""
365- input_value = ir .Input (
365+ input_value = ir .val (
366366 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
367367 )
368368
@@ -404,7 +404,7 @@ def test_non_standard_domain_identity_skipped(self):
404404
405405 def test_non_identity_node_skipped (self ):
406406 """Test that non-Identity nodes are skipped (covers line 55)."""
407- input_value = ir .Input (
407+ input_value = ir .val (
408408 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
409409 )
410410
@@ -438,7 +438,7 @@ def test_non_identity_node_skipped(self):
438438 def test_function_with_identity_elimination (self ):
439439 """Test that Identity nodes in functions are processed."""
440440 # Create function with Identity node
441- func_input = ir .Input (
441+ func_input = ir .val (
442442 "func_input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
443443 )
444444
@@ -470,7 +470,7 @@ def test_function_with_identity_elimination(self):
470470 )
471471
472472 # Create a main graph
473- main_input = ir .Input (
473+ main_input = ir .val (
474474 "main_input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
475475 )
476476
@@ -508,7 +508,7 @@ def test_function_with_identity_elimination(self):
508508
509509 def test_multiple_graph_outputs_with_identity (self ):
510510 """Test case where graph has multiple outputs and only one is the Identity output."""
511- input_value = ir .Input (
511+ input_value = ir .val (
512512 "input" , shape = ir .Shape ([2 , 2 ]), type = ir .TensorType (ir .DataType .FLOAT )
513513 )
514514
0 commit comments