Remove unsupported_target which is not supported in wasi-nn proposal.

This commit is contained in:
zhanheng1 2026-03-12 09:59:23 +08:00
parent 59ed72e2d1
commit c015ebe9c6
2 changed files with 2 additions and 4 deletions

View File

@ -169,7 +169,6 @@ typedef enum WASI_NN_NAME(execution_target) {
WASI_NN_TARGET_NAME(cpu) = 0,
WASI_NN_TARGET_NAME(gpu),
WASI_NN_TARGET_NAME(tpu),
WASI_NN_TARGET_NAME(unsupported_target),
} WASI_NN_NAME(execution_target);
// Bind a `graph` to the input and output tensors for an inference.

View File

@ -50,7 +50,6 @@ typedef enum wasi_nn_target {
wasi_nn_cpu = 0,
wasi_nn_gpu,
wasi_nn_tpu,
wasi_nn_unsupported_target,
} wasi_nn_target;
static void
@ -241,7 +240,7 @@ str2target(char *str_target)
else if (!strcmp(str_target, "tpu"))
return wasi_nn_tpu;
else
return wasi_nn_unsupported_target;
return -1;
// return autodetect;
}
@ -287,7 +286,7 @@ wasi_nn_parse(char **argv, wasi_nn_parse_context_t *ctx)
if ((!ctx->model_names[ctx->n_graphs])
|| (ctx->encoding[ctx->n_graphs] == wasi_nn_unknown_backend)
|| (ctx->target[ctx->n_graphs] == wasi_nn_unsupported_target)) {
|| (ctx->target[ctx->n_graphs] == -1)) {
ret = LIBC_WASI_PARSE_RESULT_NEED_HELP;
printf("Invalid arguments for wasi-nn.\n");
goto fail;