wasi-nn: Improve TPU support (#2447)

1. Allow TPU and GPU support at the same time.
2. Add Dockerfile to run example with [Coral USB](https://coral.ai/products/accelerator/).
This commit is contained in:
tonibofarull
2023-08-14 14:03:56 +02:00
committed by GitHub
parent 923e8d6471
commit b45d014112
10 changed files with 130 additions and 37 deletions

View File

@ -132,8 +132,8 @@ run_inference(execution_target target, float *input, uint32_t *input_size,
*output_size = MAX_OUTPUT_TENSOR_SIZE - *output_size;
if (wasm_get_output(ctx, i, &out_tensor[offset], output_size)
!= success) {
NN_ERR_PRINTF("Error when getting output.");
exit(1);
NN_ERR_PRINTF("Error when getting index %d.", i);
break;
}
offset += *output_size;