Skip to content

Commit

Permalink
upgrade tvm oneflow fronted dependency (#8048)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
BBuf and mergify[bot] authored Apr 19, 2022
1 parent 296e1b0 commit baa7619
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions python/oneflow/test/graph/test_tvm_frontend_dependency_on_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,30 @@ def test_infos_of_nodes(test_case):
test_case.assertEqual(strides, (4, 4))
test_case.assertEqual(padding_before, (2, 2))

node_input_list = []
node_output_list = []
for node_name in nodes:
node = nodes[node_name]
if is_user_op(node) and node.user_conf.op_type_name == "conv2d":
for input_name in node.user_conf.input:
node_input_paths = getattr(node.user_conf.input[input_name], "s")
for i in node_input_paths:
node_input = i.split("/")[0]
print(node_input)
node_input_list.append(node_input)
for output_name in node.user_conf.output:
node_output_paths = getattr(node.user_conf.output[output_name], "s")
for node_output_path in node_output_paths:
node_output_name = node_output_path.split("/")[0]
print(node_output_name)
node_output_list.append(node_output_name)

test_case.assertEqual("_Graph_1_input.0.0_2" in node_input_list, True)
test_case.assertEqual("m.features.0.weight" in node_input_list, True)
test_case.assertEqual("m.features.5-maxpool_2d-7" in node_input_list, True)
test_case.assertEqual("m.features.0-conv2d-0" in node_output_list, True)
test_case.assertEqual("m.features.6-conv2d-8" in node_output_list, True)

def test_buffer_convert_dependence(test_case):
class SubModule(flow.nn.Module):
def __init__(self):
Expand Down

0 comments on commit baa7619

Please sign in to comment.