Skip to content

Commit b994ef0

Browse files
author
Matthew Francis-Landau
committed
change back to using uniqueName
1 parent 3c32574 commit b994ef0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir-tensorrt/tensorrt/lib/Target/TensorRTEncodingOpInterface/NetworkEncoder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ nvinfer1::Permutation tensorrt::getNvInferPermutation(ArrayRef<int64_t> array) {
222222
static std::string getUniqueName(NvInferNetworkEncoder::NamesSet &names,
223223
std::string name) {
224224
static unsigned i = 0;
225-
std::string newName = name;
226-
while (names.contains(newName))
227-
newName = name + "_" + std::to_string(i++);
228-
names.insert(newName);
229-
return newName;
225+
std::string uniqueName = name;
226+
while (names.contains(uniqueName))
227+
uniqueName = name + "_" + std::to_string(i++);
228+
names.insert(uniqueName);
229+
return uniqueName;
230230
}
231231

232232
/// Print a representation of the given location to the string. Since MLIR has

0 commit comments

Comments
 (0)