menoh icon indicating copy to clipboard operation
menoh copied to clipboard

Ignoring unsupported operators in unused part of computation graph

Open msakai opened this issue 6 years ago • 4 comments

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.

msakai avatar Aug 06 '18 01:08 msakai

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

okdshin avatar Sep 28 '18 09:09 okdshin

Or we can simply add reducing feature in menoh_build_variable_profile_table.

okdshin avatar Sep 28 '18 12:09 okdshin

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?

msakai avatar Oct 04 '18 05:10 msakai

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

okdshin avatar Oct 04 '18 05:10 okdshin