jason-li-831202/YOLO-NAS-onnxruntime

Is compatible with latest onnxruntime (1.15.0) ?

ocordeiro opened this issue · 3 comments

Hello, I'm encountering an error while attempting to build with the latest version of onnxruntime on Apple Silicon. Unfortunately, previous versions of onnxruntime do not have a release specifically for Apple Silicon architecture.

Error:

[ 25%] Building CXX object CMakeFiles/demo.dir/src/main.cpp.o
[ 50%] Building CXX object CMakeFiles/demo.dir/src/detector.cpp.o
/Users/alan/Sites/YOLO-NAS-onnxruntime/src/detector.cpp:55:44: error: no member named 'GetInputName' in 'Ort::Session'
        inputNames.push_back(this->session.GetInputName(layer, allocator));
                             ~~~~~~~~~~~~~ ^
/Users/alan/Sites/YOLO-NAS-onnxruntime/src/detector.cpp:78:45: error: no member named 'GetOutputName' in 'Ort::Session'
        outputNames.push_back(this->session.GetOutputName(layer, allocator));
                              ~~~~~~~~~~~~~ ^
2 errors generated.
make[2]: *** [CMakeFiles/demo.dir/src/detector.cpp.o] Error 1
make[1]: *** [CMakeFiles/demo.dir/all] Error 2
make: *** [all] Error 2

Fixed using onnxruntime-osx-arm64-1.10.0

I think in newer versions of onnxruntime, GetInputName and GetOutputName need to be replaced with GetInputNameAllocated and GetOutputNameAllocated.

Fixed at 4ac2714