Skip to content

Commit 74d4df1

Browse files
committed
chore: Minor renaming
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 8b66d3d commit 74d4df1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/conversion/conversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

core/conversion/conversionctx/ConversionCtx.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ConversionCtx::~ConversionCtx() {
130130
}
131131

132132
nvinfer1::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.");

core/conversion/conversionctx/ConversionCtx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)