Skip to content
Merged
Changes from all 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
62 changes: 62 additions & 0 deletions onnxruntime/core/graph/contrib_ops/contrib_defs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,63 @@ void RegisterContribSchemas() {
Sample echo operator.)DOC");

// register schemas for more operators here
ONNX_CONTRIB_OPERATOR_SCHEMA(ConvMaxPool)
.SetDomain(kMSDomain)
.SinceVersion(1)
.SetDoc(R"DOC(
Port Conv1D::ComputeConvMaxPoolWithActivationAndMask() method in TP3L1 c++ model.)DOC")
.Attr(
"auto_pad",
"",
AttributeProto::STRING,
std::string("NOTSET"))
.Attr(
"kernel_shape",
"",
AttributeProto::INTS,
OPTIONAL)
.Attr(
"dilations",
"",
AttributeProto::INTS,
OPTIONAL)
.Attr(
"strides", "", AttributeProto::INTS, OPTIONAL)
.Attr("pads",
"",
AttributeProto::INTS, OPTIONAL)
.Attr(
"group",
"",
AttributeProto::INT,
static_cast<int64_t>(1))
.Attr(
"activation",
"",
AttributeProto::STRING,
OPTIONAL)
.Input(
0,
"X",
"",
"T")
.Input(
1,
"W",
"",
"T")
.Input(2, "B", "", "T", OpSchema::Optional)
.Input(3, "M", "mask", "T", OpSchema::Optional)
.Output(
0,
"Y",
"",
"T")
.TypeConstraint("T", {"tensor(float16)", "tensor(float)", "tensor(double)"}, "Constrain input and output types to float tensors")
.TypeAndShapeInferenceFunction([](ONNX_NAMESPACE::InferenceContext& ctx) {
ONNX_NAMESPACE::convPoolTypeAndShapeInference(ctx, false, true);
});

ONNX_CONTRIB_OPERATOR_SCHEMA(FusedConv)
.SetDomain(kMSDomain)
.SinceVersion(1)
Expand Down Expand Up @@ -68,6 +125,11 @@ activation.)DOC")
"",
AttributeProto::STRING,
OPTIONAL)
.Attr(
"alpha",
"",
AttributeProto::FLOAT,
OPTIONAL)
.Input(
0,
"X",
Expand Down