We’re attempting to convert a custom model for benchmarking with a 2-chip configuration:
mx_nc -v -m octonet.onnx -c 2 -so
The model itself is a MobileNetV3 backbone with custom heads, as well as a secondary branch for pre-processing a grayscale channel as a 2nd input.
The ONNX model is using the following operations (according to Netron):
- Cast
- Concat
- Reshape
- Transpose
- Greater
- Less
- Mul
- Div
- Add
- Sub
- Clip
- Hardswish
- HardSigmoid
- Sigmoid
- Relu
- Softmax
- Resize
- Slice
- Conv
- AveragePool
- MaxPool
- GlobalAveragePool
According to Supported Neural Network Operators — MemryX Developer Hub these should all be supported. However, when converting the model we’re running into:
mx_nc -vv -m octonet.onnx -c 2 -so
Converting ONNX Model…
Found 1 instance(s) of unsupported configuration for operator ‘ReduceMax’
Layer Name: ‘/ReduceMax’ | Condition: channel dimension
memryx.errors.OperatorError: During conversion found unsupported config in nodes ReduceMax(1). Using autocrop (–autocrop) might help.
Happy to privately share the model file if it helps. Not sure which operation is causing the issue.
This model converts all the way from PyTorch → ONNX → TF SavedModel → TFLite → TFLite INT8 successfully. It currently runs on a commercially available edge AI accelerator that is several years old. Here are some additional logs trying to convert these other downstream formats:
TF SavedModel (.pb)
mx_nc -v -m octonet.pb
WARNING: All log messages before absl::InitializeLog() is called are written to STDERRI0000 00:00:1758347527.901986 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.902687 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.902772 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.903766 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.903855 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.903917 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.944549 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.944670 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at I0000 00:00:1758347527.944745 16581 cuda_executor.cc:1015] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at Traceback (most recent call last):File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/training/py_checkpoint_reader.py”, line 92, in NewCheckpointReaderreturn CheckpointReader(compat.as_bytes(filepattern))RuntimeError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /home/yuri/mx/variables/variables
During handling of the above exception, another exception occurred:
Traceback (most recent call last):File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/saved_model/load.py”, line 1042, in load_partialloader = Loader(object_graph_proto, saved_model_proto, export_dir,File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/saved_model/load.py”, line 226, in initself._restore_checkpoint()File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/saved_model/load.py”, line 561, in _restore_checkpointload_status = saver.restore(variables_path, self._checkpoint_options)File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/checkpoint/checkpoint.py”, line 1456, in restorereader = py_checkpoint_reader.NewCheckpointReader(save_path)File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/training/py_checkpoint_reader.py”, line 96, in NewCheckpointReadererror_translator(e)File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/training/py_checkpoint_reader.py”, line 31, in error_translatorraise errors_impl.NotFoundError(None, None, error_message)tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /home/yuri/mx/variables/variables
During handling of the above exception, another exception occurred:
Traceback (most recent call last):File “/home/yuri/mx/bin/mx_nc”, line 7, in sys.exit(main())File “memryx/neural_compiler/nc.py”, line 2178, in memryx.neural_compiler.nc.mainFile “memryx/neural_compiler/nc.py”, line 1420, in memryx.neural_compiler.nc.NeuralCompiler.runFile “memryx/neural_compiler/nc.py”, line 1399, in memryx.neural_compiler.nc.NeuralCompiler.runFile “memryx/neural_compiler/nc.py”, line 1464, in memryx.neural_compiler.nc.NeuralCompiler.loadFile “memryx/neural_compiler/graph/framework/model_loader_factory.py”, line 454, in memryx.neural_compiler.graph.framework.model_loader_factory.ModelLoader.loadFile “memryx/neural_compiler/graph/framework/tensorflow/loader.py”, line 669, in memryx.neural_compiler.graph.framework.tensorflow.loader.TFLoader.loadFile “memryx/neural_compiler/graph/framework/tensorflow/loader.py”, line 678, in memryx.neural_compiler.graph.framework.tensorflow.loader.TFLoader._load_graph_defFile “memryx/neural_compiler/graph/framework/tensorflow/loader.py”, line 711, in memryx.neural_compiler.graph.framework.tensorflow.loader.TFLoader._load_saved_model_dirFile “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/saved_model/load.py”, line 912, in loadresult = load_partial(export_dir, None, tags, options)[“root”]File “/home/yuri/mx/lib/python3.10/site-packages/tensorflow/python/saved_model/load.py”, line 1045, in load_partialraise FileNotFoundError(FileNotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /home/yuri/mx/variables/variablesYou may be trying to load on a different device from the computational device. Consider setting the experimental_io_device option in tf.saved_model.LoadOptions to the io_device such as ‘/job:localhost’.
TFLite (float32)
mx_nc -v -m octonet_float32.tflite
KeyError: 152
During handling of the above exception, another exception occurred:
memryx.errors.CompilerError: No builtin operator for: <memryx.neural_compiler.graph.framework.tflite.tflite.Operator.Operator object at 0x7eff2f7adc00>