Skip to content

Commit

Permalink
signed comparison fix for qnn built as a shared lib
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Feb 11, 2025
1 parent 1e3dda9 commit 0ab6369
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions onnxruntime/core/providers/qnn/builder/qnn_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,10 @@ std::string GetVerboseQnnErrorMessage(const QNN_INTERFACE_VER_TYPE& qnn_interfac

TensorShape GetTensorProtoShape(const ONNX_NAMESPACE::TensorShapeProto& tensor_shape_proto) {
const auto& onnx_dims = tensor_shape_proto.dim();
std::vector<int64_t> tensor_shape_vec(static_cast<size_t>(onnx_dims.size()));
const size_t num_dims = static_cast<size_t>(onnx_dims.size());
std::vector<int64_t> tensor_shape_vec(num_dims);

for (int i = 0; i < onnx_dims.size(); i++) {
for (int i = 0; i < static_cast<int>(num_dims); i++) {
const auto& onnx_dim = tensor_shape_proto.dim(i);
tensor_shape_vec[i] = onnx_dim.has_dim_value() ? onnx_dim.dim_value() : -1; // -1 is for symbolic dim in ORT
}
Expand Down

0 comments on commit 0ab6369

Please sign in to comment.