From e7246734ec4349e10ffc618fa332e21821d975a3 Mon Sep 17 00:00:00 2001 From: andresovela Date: Mon, 22 Jul 2024 17:30:11 +0200 Subject: [PATCH] Fix variable casing --- xformer/Utils/FileIO.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xformer/Utils/FileIO.cpp b/xformer/Utils/FileIO.cpp index bbff919d1..b06445ef2 100644 --- a/xformer/Utils/FileIO.cpp +++ b/xformer/Utils/FileIO.cpp @@ -42,37 +42,37 @@ writeTileServerDataToFile(const std::string &filename, auto tileHeader = utils::tileRamHeader(); tensorsVec.insert(tensorsVec.begin(), tileHeader); - std::ostringstream c_out; - c_out << R"(#include )"; + std::ostringstream cOut; + cOut << R"(#include )"; if (placeInExternalMemory) { - c_out << "\n\n" << R"(__attribute__ ((section(".ExtMem.data"))))" << "\n"; + cOut << "\n\n" << R"(__attribute__ ((section(".ExtMem.data"))))" << "\n"; } - c_out << "const int8_t tile_server_weights[] = {\n"; + cOut << "const int8_t tile_server_weights[] = {\n"; int lineEnding = 0; int weightsSize = 0; for (auto const &tensor : tensorsVec) { for (auto const &i : tensor) { - c_out << (int)i << ", "; + cOut << (int)i << ", "; lineEnding++; weightsSize++; if (lineEnding > 80) { - c_out << "\n"; + cOut << "\n"; lineEnding = 0; } } } - c_out << R"(}; + cOut << R"(}; )"; - if (failed(utils::writeDataToFile(filename + ".c", c_out.str()))) { + if (failed(utils::writeDataToFile(filename + ".c", cOut.str()))) { return failure(); } - std::ostringstream h_out; - h_out << R"(#ifndef TILESERVERGEN_H + std::ostringstream hOut; + hOut << R"(#ifndef TILESERVERGEN_H #define TILESERVERGEN_H #define TILE_SERVER_WEIGHTS_SIZE ()" << weightsSize << R"(U) @@ -80,7 +80,7 @@ writeTileServerDataToFile(const std::string &filename, #endif // TILESERVERGEN_H )"; - return utils::writeDataToFile(filename + ".h", h_out.str()); + return utils::writeDataToFile(filename + ".h", hOut.str()); } LogicalResult getFlatBufferStringFromMLIR(