Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions onnxruntime/core/session/custom_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,21 @@
auto num_inputs = ctx_.getNumInputs();
for (size_t ith_input = 0; ith_input < num_inputs; ++ith_input) {
const auto* input_type = ctx_.getInputType(ith_input);
const auto& value_case = input_type->value_case();
ORT_ENFORCE(value_case == ONNX_NAMESPACE::TypeProto::kTensorType,
"shape inference not yet supported for non-tensor types");
const auto& shape_proto = input_type->tensor_type().shape();
const auto& type_proto = input_type->tensor_type();
auto elem_type = ::onnxruntime::utils::CApiElementTypeFromProtoType(type_proto.elem_type());
auto tensor_shape = ::onnxruntime::utils::GetTensorShapeFromTensorShapeProto(shape_proto);
auto symbolic_dims = GetSymbolicDims(shape_proto);
input_type_shapes_.emplace_back(
OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(elem_type, &tensor_shape, &symbolic_dims));
if (input_type != nullptr) {
const auto& value_case = input_type->value_case();
ORT_ENFORCE(value_case == ONNX_NAMESPACE::TypeProto::kTensorType,
"shape inference not yet supported for non-tensor types");
const auto& shape_proto = input_type->tensor_type().shape();
const auto& type_proto = input_type->tensor_type();
auto elem_type = ::onnxruntime::utils::CApiElementTypeFromProtoType(type_proto.elem_type());
auto tensor_shape = ::onnxruntime::utils::GetTensorShapeFromTensorShapeProto(shape_proto);
auto symbolic_dims = GetSymbolicDims(shape_proto);
input_type_shapes_.emplace_back(
OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(elem_type, &tensor_shape, &symbolic_dims));
} else {
input_type_shapes_.emplace_back(
OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED, onnxruntime::TensorShape(), nullptr));

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x64_release_xnnpack

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x64_release_vitisai

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x86_release

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x64_debug

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / Windows GPU CUDA CI Pipeline

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x64_release_ep_generic_interface

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / build_x64_release

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / Windows GPU TensorRT CI Pipeline

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / Windows GPU DML CI Pipeline

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / webgpu_build_x64_RelWithDebInfo (vcpkg, static)

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / webgpu_build_x64_RelWithDebInfo (novcpkg, static)

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'

Check failure on line 87 in onnxruntime/core/session/custom_ops.cc

View workflow job for this annotation

GitHub Actions / webgpu_build_x64_RelWithDebInfo (vcpkg, dynamic)

'std::unique_ptr<OrtTensorTypeAndShapeInfo,std::default_delete<OrtTensorTypeAndShapeInfo>> OrtTensorTypeAndShapeInfo::GetTensorShapeAndTypeHelper(ONNXTensorElementDataType,const onnxruntime::TensorShape *,const std::vector<std::string,std::allocator<std::string>> *)': cannot convert argument 2 from 'onnxruntime::TensorShape' to 'const onnxruntime::TensorShape *'
}
}
}

Expand Down
Loading