Skip to content
Closed
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
5 changes: 5 additions & 0 deletions caffe2/operators/quantized/int8_add_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ class Int8AddOp final : public Operator<CPUContext> {
const auto& B = Inputs()[1]->template Get<Int8TensorCPU>();
auto* Y = Outputs()[0]->template GetMutable<Int8TensorCPU>();

CAFFE_ENFORCE_EQ(
A.t.sizes(),
B.t.sizes(),
"inputs must have the same shape (broadcast semantics is not supported)");

/*
* Record quantization parameters for A and B inputs, because if the op is
* in-place, we may overwrite these parameters later, when we set
Expand Down