Tengine icon indicating copy to clipboard operation
Tengine copied to clipboard

hit issue when run prerun_graph, cannot find default executor

Open MicahXIE opened this issue 7 years ago • 2 comments

dev_allocator.cpp:296 cannot find default executor generic_engine.cpp:100 dev executor allocator failed graph_task.cpp:320 bad status: CREATED

I followed the example but I didn't set the device info like below. Could you help to give me some advice. Thanks

/* set input shape */
int node_idx = 0;
int tensor_idx = 0;
tensor_t input_tensor = get_graph_input_tensor(graph_, node_idx, tensor_idx);
if(input_tensor == nullptr)
{
    std::printf("Cannot find input tensor,node_idx: %d,tensor_idx: %d \n", node_idx, tensor_idx);
}

std::cout << "the image size is: " << nImg << std::endl;
int dims[4] = {nImg, 3, height, width};
set_tensor_shape(input_tensor, dims, 4);


if(set_tensor_buffer(input_tensor, input_buffer.data(), input_size * sizeof(float)) < 0)
{
    std::printf("Set buffer for tensor failed\n");
}

/* run the graph */
prerun_graph(graph_);

run_graph(graph_, 1);

std::cout << "after run the graph !!!" << std::endl;

// const char * output_tensor_name="InceptionV3/Predictions/Softmax";
tensor_t output_tensor = get_graph_output_tensor(graph_, node_idx, tensor_idx);

int dim_size = get_tensor_shape(output_tensor, dims, 4);
if(dim_size < 0)
{
    printf("get output tensor shape failed\n");
}

MicahXIE avatar Aug 12 '19 13:08 MicahXIE

Hi, @MicahXIE What model did you use in your application? Please check that if all operaters in it are supported by Tengine.

Thanks, YaHei

hey-yahei avatar Oct 11 '19 02:10 hey-yahei

You can try again in new version . if didn't solve you problem , please mail to [email protected] or commit a new issue . thanks .

liqi-c avatar Apr 14 '20 05:04 liqi-c