From 492940d6e2940c8ce4899ab02029cc3b0a15fb07 Mon Sep 17 00:00:00 2001 From: yangruoqi713 Date: Mon, 12 Jul 2021 09:58:15 +0800 Subject: [PATCH] [MSLITE][Develop] fix bug of tensor_rt --- mindspore/lite/src/delegate/tensorrt/op/gather_tensorrt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/lite/src/delegate/tensorrt/op/gather_tensorrt.cc b/mindspore/lite/src/delegate/tensorrt/op/gather_tensorrt.cc index d306e9cb6c6..8fb6515bbe9 100644 --- a/mindspore/lite/src/delegate/tensorrt/op/gather_tensorrt.cc +++ b/mindspore/lite/src/delegate/tensorrt/op/gather_tensorrt.cc @@ -33,7 +33,7 @@ int GatherTensorRT::IsSupport(const schema::Primitive *primitive, const std::vec return RET_ERROR; } if (in_tensors[2].ElementNum() == 1) { - axis_ = static_cast(in_tensors[2].MutableData())[0]; + axis_ = static_cast(in_tensors[2].Data().get())[0]; } else { MS_LOG(ERROR) << "TensorRT axis is attribute."; return RET_ERROR;