Skip to content
Snippets Groups Projects
Commit 6fa9ca91 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Added placeholder for output

parent 31663f3f
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ t{{n}}{{", " if not loop.last}}
{% endfor -%}
void root({%- for n in root_inputs -%}
void root(void *__output, {%- for n in root_inputs -%}
void *{{n}}, size_t {{n}}_bytes{{", " if not loop.last}}
{%- endfor %}) {
__visc__hint(visc::CPU_TARGET);
......@@ -32,8 +32,8 @@ void *{{n}}, size_t {{n}}_bytes{{", " if not loop.last}}
void* {{node.name}} = __visc__createNodeND(0, {{node.name}}_node);
{% for edge in node.edges %}
{% if edge.is_bindin %}
__visc__bindIn({{node.name}}, {{edge.input_idx * 2}}, {{edge.edge_idx * 2}}, 0);
__visc__bindIn({{node.name}}, {{edge.input_idx * 2 + 1}}, {{edge.edge_idx * 2 + 1}}, 0);
__visc__bindIn({{node.name}}, {{edge.input_idx * 2 + 1}}, {{edge.edge_idx * 2}}, 0);
__visc__bindIn({{node.name}}, {{edge.input_idx * 2 + 2}}, {{edge.edge_idx * 2 + 1}}, 0);
{% else %}
__visc__edge({{edge.input_node}}, {{node.name}}, 1, 0, {{edge.edge_idx * 2}}, 0);
__visc__edge({{edge.input_node}}, {{node.name}}, 1, 1, {{edge.edge_idx * 2 + 1}}, 0);
......@@ -51,6 +51,7 @@ struct ret_t {
};
typedef struct __attribute__((__packed__)) {
void *__output;
{% for n in root_inputs %}
void *{{n}};
size_t {{n}}_bytes;
......@@ -85,7 +86,7 @@ int main(){
void* dfg = __visc__launch(0, root, (void*) args);
__visc__wait(dfg);
void *result = static_cast<RootIn*>(args)->{{input_name}};
void *result = static_cast<RootIn*>(args)->__output;
hpvm_request_tensor(result, 0);
uint32_t* labels = readLabelsBatch3(labels_path.c_str(), start, end);
......
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