wasi-nn: fix the size of tensor->type (#4333)

* this enum is (@witx tag u8) in witx
* it seems that some wasm modules actually use non-zero padding
  and cause errors
* it's a bad practice to use C enum for ABI description anyway
This commit is contained in:
YAMAMOTO Takashi
2025-06-06 16:08:18 +09:00
committed by GitHub
parent 769d16eaab
commit 933f8124b0

View File

@ -79,7 +79,8 @@ typedef struct {
// dimensions.
tensor_dimensions *dimensions;
// Describe the type of element in the tensor (e.g., f32).
tensor_type type;
uint8_t type;
uint8_t _pad[3];
// Contains the tensor data.
tensor_data data;
} tensor;