menoh
menoh copied to clipboard
Ignoring unsupported operators in unused part of computation graph
I tried to run super resolution example of MXNet.
The model contains unsupported operator Transpose
so I decided to specify the variable just before the Transpose
(i.e. variable "25") as output. But Menoh still reports menoh_error_code_unsupported_operator
error ("menoh unsupported operator error: Transpose") when I construct a variable profile table.
It would be nice if Menoh ignores unsupported operators in unused part of computation graph.
To determine which nodes ares useless, menoh has to know which outputs are needed.
Construction of variable_profile_table reqires all nodes are known to menoh. So we can't add ignoring feature menoh_model_data_optimize()
.
How about to add new api like menoh_model_data_reduce_useless_node()
which takes model_data
and vpt_builder
?
model_data
has graph and vpt_builder
has inputs' profiles and required outputs' names
Or we can simply add reducing feature in menoh_build_variable_profile_table
.
Construction of variable_profile_table reqires all nodes are known to menoh.
It is a restriction of current implementation, but I think the restriction is not essential.
menoh_build_variable_profile_table
can compute information only for nodes that are input nodes (specified menoh_variable_profile_table_builder_add_input_profile
) or nodes that are reachable (by output-to-input relation) from output nodes (specified by menoh_variable_profile_table_builder_add_output_name
).
Is that correct?
It is correct. Sorry,
Construction of variable_profile_table reqires all nodes are known to menoh.
is incorrect.
So we can add ignoring-if-possible feature into menoh_build_variable_profle_table()
.