Skip to content
Snippets Groups Projects
Commit fe1e304b authored by Cyril Moineau's avatar Cyril Moineau
Browse files

[Fix] Issue when exporting a network with no input.

parent 36cb84ee
No related branches found
No related tags found
3 merge requests!279v0.4.0,!253v0.4.0,!247Doc export
...@@ -156,7 +156,10 @@ def scheduler_export(scheduler, export_folder_path: str, export_lib: ExportLib = ...@@ -156,7 +156,10 @@ def scheduler_export(scheduler, export_folder_path: str, export_lib: ExportLib =
func_name=func_name, func_name=func_name,
headers=set(list_configs), headers=set(list_configs),
actions=list_actions, actions=list_actions,
mem_ctype=inputs_dtype[0], # Legacy behavior ... # Note: Graph may not have inputs, so we need to check with output
# In the future, we should remove this has it is not compatible
# with a mix precision approach.
mem_ctype=outputs_dtype[0], # Legacy behavior ...
mem_section=export_lib.mem_section, mem_section=export_lib.mem_section,
peak_mem=peak_mem, peak_mem=peak_mem,
inputs_name=inputs_name, inputs_name=inputs_name,
......
...@@ -26,7 +26,7 @@ int main() ...@@ -26,7 +26,7 @@ int main()
{% endfor %} {% endfor %}
// Call the forward function // Call the forward function
{{ func_name }}({{ inputs_name|join(", ") }}, &{{ outputs_name|join(", &") }}); {{ func_name }}({{ inputs_name|join(", ") }}{% if inputs_name %}, {% endif %}&{{ outputs_name|join(", &") }});
// Print the results of each output // Print the results of each output
{%- for o in range(outputs_name | length) %} {%- for o in range(outputs_name | length) %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment