Skip to content

Commit c015ebe

Browse files
committed
Remove unsupported_target which is not supported in wasi-nn proposal.
1 parent 59ed72e commit c015ebe

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

core/iwasm/libraries/wasi-nn/include/wasi_nn_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ typedef enum WASI_NN_NAME(execution_target) {
169169
WASI_NN_TARGET_NAME(cpu) = 0,
170170
WASI_NN_TARGET_NAME(gpu),
171171
WASI_NN_TARGET_NAME(tpu),
172-
WASI_NN_TARGET_NAME(unsupported_target),
173172
} WASI_NN_NAME(execution_target);
174173

175174
// Bind a `graph` to the input and output tensors for an inference.

product-mini/platforms/common/libc_wasi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ typedef enum wasi_nn_target {
5050
wasi_nn_cpu = 0,
5151
wasi_nn_gpu,
5252
wasi_nn_tpu,
53-
wasi_nn_unsupported_target,
5453
} wasi_nn_target;
5554

5655
static void
@@ -241,7 +240,7 @@ str2target(char *str_target)
241240
else if (!strcmp(str_target, "tpu"))
242241
return wasi_nn_tpu;
243242
else
244-
return wasi_nn_unsupported_target;
243+
return -1;
245244
// return autodetect;
246245
}
247246

@@ -287,7 +286,7 @@ wasi_nn_parse(char **argv, wasi_nn_parse_context_t *ctx)
287286

288287
if ((!ctx->model_names[ctx->n_graphs])
289288
|| (ctx->encoding[ctx->n_graphs] == wasi_nn_unknown_backend)
290-
|| (ctx->target[ctx->n_graphs] == wasi_nn_unsupported_target)) {
289+
|| (ctx->target[ctx->n_graphs] == -1)) {
291290
ret = LIBC_WASI_PARSE_RESULT_NEED_HELP;
292291
printf("Invalid arguments for wasi-nn.\n");
293292
goto fail;

0 commit comments

Comments
 (0)