Dump dataQ/minValue/maxValue for TIDL trace
authorYuan Zhao <yuanzhao@ti.com>
Wed, 19 Jun 2019 15:40:22 +0000 (10:40 -0500)
committerYuan Zhao <yuanzhao@ti.com>
Tue, 25 Jun 2019 17:02:53 +0000 (12:02 -0500)
- MCT-1201

tidl_api/src/execution_object.cpp

index 009ef93530c8030019701720bc7ccdf457cca5a4..fe7ec37f0c5690787bffa776949dae00d872ec21 100644 (file)
@@ -734,13 +734,21 @@ ExecutionObject::Impl::WriteLayerOutputsToFile(const std::string& filename_prefi
             std::string filename(filename_prefix);
             filename += std::to_string(buf->bufferId) + "_";
             filename += std::to_string(buf->ROIWidth) + "x";
-            filename += std::to_string(buf->ROIHeight) + ".bin";
+            filename += std::to_string(buf->ROIHeight);
+            std::string info_filename = filename + ".info";
+            filename += ".bin";
 
             std::ofstream ofs;
             ofs.open(filename, std::ofstream::out);
             ofs.write(tmp, buffer_size);
             ofs.close();
 
+            std::ofstream info_ofs(info_filename, std::ofstream::out);
+            info_ofs << "dataQ: " << buf->dataQ << std::endl;
+            info_ofs << "minValue: " << buf->minValue << std::endl;
+            info_ofs << "maxValue: " << buf->maxValue << std::endl;
+            info_ofs.close();
+
             delete[] tmp;
         }
 }