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(
188
188
ctx->input_is_dynamic = true ;
189
189
}
190
190
191
- ctx->RecordNewTensor (in, trt_in);
191
+ ctx->RecordNewITensor (in, trt_in);
192
192
ctx->num_inputs += 1 ;
193
193
}
194
194
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ ConversionCtx::~ConversionCtx() {
130
130
}
131
131
132
132
nvinfer1::ITensor* ConversionCtx::AssociateValueAndTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
133
- RecordNewTensor (value, tensor);
133
+ RecordNewITensor (value, tensor);
134
134
135
135
return tensor;
136
136
}
@@ -140,9 +140,9 @@ torch::jit::IValue* ConversionCtx::AssociateValueAndIValue(const torch::jit::Val
140
140
return &this ->evaluated_value_map [value];
141
141
}
142
142
143
- void ConversionCtx::RecordNewTensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
143
+ void ConversionCtx::RecordNewITensor (const torch::jit::Value* value, nvinfer1::ITensor* tensor) {
144
144
value_tensor_map[value] = tensor;
145
- auto ret = known_tensors .insert (tensor);
145
+ auto ret = seen_itensors .insert (tensor);
146
146
if (!ret.second ) {
147
147
LOG_WARNING (
148
148
" 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 {
46
46
ConversionCtx (BuilderSettings settings);
47
47
std::string SerializeEngine ();
48
48
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);
50
50
torch::jit::IValue* AssociateValueAndIValue (const torch::jit::Value* value, torch::jit::IValue tensor);
51
51
bool CheckLayerAddition (const torch::jit::Node* n);
52
52
@@ -72,7 +72,7 @@ struct ConversionCtx {
72
72
std::unordered_map<const torch::jit::Value*, torch::jit::IValue> evaluated_value_map;
73
73
74
74
// 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 ;
76
76
};
77
77
78
78
} // namespace conversion
You can’t perform that action at this time.
0 commit comments