sw/vec_iree: Add support for importing .raw input file
Change-Id: Ia8ccf899e1abd41b0fec56e774899831f00e4bb6
diff --git a/build_tools/gen_mlmodel_input.py b/build_tools/gen_mlmodel_input.py
index bbcd8d0..e40c8f4 100755
--- a/build_tools/gen_mlmodel_input.py
+++ b/build_tools/gen_mlmodel_input.py
@@ -59,7 +59,7 @@
raise ValueError("Input shape < 3 dimensions")
input_ext = os.path.splitext(input_name)[1]
is_audio = False
- if (not input_ext) or (input_ext == '.bin'):
+ if (not input_ext) or (input_ext == '.bin') or (input_ext == '.raw'):
with open(input_name, mode='rb') as f:
input = np.fromfile(f, dtype=np.uint8 if is_quant else np.float32)
input = input[:np.prod(input_shape)].reshape(np.prod(input_shape))