File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ void AddInputs(
188188 ctx->input_is_dynamic = true ;
189189 }
190190
191- ctx->RecordNewTensor (in, trt_in);
191+ ctx->RecordNewITensor (in, trt_in);
192192 ctx->num_inputs += 1 ;
193193 }
194194
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ ConversionCtx::~ConversionCtx() {
130130}
131131
132132nvinfer1::ITensor* ConversionCtx::AssociateValueAndTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
133- RecordNewTensor (value, tensor);
133+ RecordNewITensor (value, tensor);
134134
135135 return tensor;
136136}
@@ -140,9 +140,9 @@ torch::jit::IValue* ConversionCtx::AssociateValueAndIValue(const torch::jit::Val
140140 return &this ->evaluated_value_map [value];
141141}
142142
143- void ConversionCtx::RecordNewTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
143+ void ConversionCtx::RecordNewITensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
144144 value_tensor_map[value] = tensor;
145- auto ret = known_tensors .insert (tensor);
145+ auto ret = seen_itensors .insert (tensor);
146146 if (!ret.second ) {
147147 LOG_WARNING (
148148 " Trying to record the value " << value->debugName () << " with the ITensor " << tensor->getName () << " again." );
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ struct ConversionCtx {
4646 ConversionCtx (BuilderSettings settings);
4747 std::string SerializeEngine ();
4848 nvinfer1::ITensor* AssociateValueAndTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor);
49- void RecordNewTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor);
49+ void RecordNewITensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor);
5050 torch::jit::IValue* AssociateValueAndIValue (const torch::jit::Value* value, torch::jit::IValue tensor);
5151 bool CheckLayerAddition (const torch::jit::Node* n);
5252
@@ -72,7 +72,7 @@ struct ConversionCtx {
7272 std::unordered_map<const torch::jit::Value*, torch::jit::IValue> evaluated_value_map;
7373
7474 // record already named ITensors to prevent rewriting another name to the same tensor
75- std::unordered_set<nvinfer1::ITensor*> known_tensors ;
75+ std::unordered_set<nvinfer1::ITensor*> seen_itensors ;
7676};
7777
7878} // namespace conversion
You can’t perform that action at this time.
0 commit comments