diff --git a/core/partitioning/BUILD b/core/partitioning/BUILD index 85e7dc3d8c..67da00d24e 100644 --- a/core/partitioning/BUILD +++ b/core/partitioning/BUILD @@ -19,6 +19,7 @@ cc_library( "SegmentedBlock.cpp", "shape_analysis.cpp", "partitioning.cpp", + "PartitionInfo.cpp", ], deps = [ "//core/util:prelude", diff --git a/core/partitioning/PartitionInfo.cpp b/core/partitioning/PartitionInfo.cpp index e69de29bb2..a7d76928c2 100644 --- a/core/partitioning/PartitionInfo.cpp +++ b/core/partitioning/PartitionInfo.cpp @@ -0,0 +1,30 @@ +#include +#include +#include + +#include "core/partitioning/PartitionInfo.h" + +namespace trtorch { +namespace core { +namespace partitioning { +// clang-format off +std::ostream& operator<<(std::ostream& os, const PartitionInfo& s) { + os << "Settings requested for Torch Fallback:" \ + << "\n \"enabled\": "; + if (s.enabled) { + os << "True"; + os << "\n \"min_block_size\": " << s.min_block_size \ + << "\n \"forced_fallback_operators\": ["; + for (auto i : s.forced_fallback_operators) { + os <<"\n " << i << ','; + } + os << "\n ]"; + } else { + os << "False"; + } + return os; +} +// clang-format on +} // namespace partitioning +} // namespace core +} // namespace trtorch \ No newline at end of file