Skip to content

Commit

Permalink
Update trt_executor.cc
Browse files Browse the repository at this point in the history
Add cast data type casting to fix the bug `cannot convert from const char [] to char*`
  • Loading branch information
Jeremy-J-J authored Jan 11, 2022
1 parent 2cac48a commit ac9fc21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/device/tensorrt/trt_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TensorRTEngine::TensorRTEngine()

this->precision = nvinfer1::DataType::kFLOAT;

this->option.dev_name = TRT_DEVICE_NAME;
this->option.dev_name = (char *)TRT_DEVICE_NAME;
this->option.precision = TENGINE_DT_FP32;
this->option.gpu_index = 0;
this->option.dla_index = -1;
Expand Down

0 comments on commit ac9fc21

Please sign in to comment.