Fix operand type access.
This commit is contained in:
parent
bd44d8402e
commit
6b55bb43c7
|
@ -408,7 +408,7 @@ void ONNXTransposeOp::inferShapes() {
|
||||||
|
|
||||||
// Naive transposition which handles the default case of
|
// Naive transposition which handles the default case of
|
||||||
// reversing the shape of the tensor (similar to numpy.transpose).
|
// reversing the shape of the tensor (similar to numpy.transpose).
|
||||||
auto arrayTy = getOperand()->getType().cast<RankedTensorType>();
|
auto arrayTy = getOperand().getType().cast<RankedTensorType>();
|
||||||
SmallVector<int64_t, 2> dims;
|
SmallVector<int64_t, 2> dims;
|
||||||
|
|
||||||
if (auto permutation = getAttrOfType<ArrayAttr>(
|
if (auto permutation = getAttrOfType<ArrayAttr>(
|
||||||
|
@ -422,7 +422,7 @@ void ONNXTransposeOp::inferShapes() {
|
||||||
dims.emplace_back(dim);
|
dims.emplace_back(dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
getResult()->setType(RankedTensorType::get(dims, arrayTy.getElementType()));
|
getResult().setType(RankedTensorType::get(dims, arrayTy.getElementType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
LogicalResult verify(ONNXTransposeOp op) {
|
LogicalResult verify(ONNXTransposeOp op) {
|
||||||
|
|
Loading…
Reference in New Issue