@@ -29,8 +29,8 @@ using ::executorch::runtime::DebugHandle;
2929using ::executorch::runtime::DelegateDebugIdType;
3030using ::executorch::runtime::EValue;
3131using ::executorch::runtime::EventTracerEntry;
32- using ::executorch::runtime::Result;
3332using ::executorch::runtime::LoggedEValueType;
33+ using ::executorch::runtime::Result;
3434using ::executorch::runtime::Span;
3535using ::executorch::runtime::Tag;
3636
@@ -379,7 +379,6 @@ void ETDumpGen::log_intermediate_output_delegate_helper(
379379 } else if constexpr (std::is_same<T, ArrayRef<Tensor>>::value) {
380380 etdump_Tensor_vec_start (builder_);
381381 for (size_t i = 0 ; i < output.size (); ++i) {
382-
383382 long offset = write_tensor_or_raise_error (output[i]);
384383 etdump_Tensor_vec_push (
385384 builder_, add_tensor_entry (builder_, output[i], offset));
@@ -633,14 +632,21 @@ size_t ETDumpGen::get_debug_buffer_size() const {
633632size_t ETDumpGen::get_data_sink_size () const {
634633 ET_CHECK_MSG (data_sink_, " Must set data sink before checking its size\n " );
635634 Result<size_t > ret = data_sink_->get_storage_size ();
636- ET_CHECK_MSG (ret.ok (), " Failed to get storage size with error 0x%" PRIx32, static_cast <uint32_t >(ret.error ()));
635+ ET_CHECK_MSG (
636+ ret.ok (),
637+ " Failed to get storage size with error 0x%" PRIx32,
638+ static_cast <uint32_t >(ret.error ()));
637639 return ret.get ();
638640}
639641
640642long ETDumpGen::write_tensor_or_raise_error (Tensor tensor) {
641643 ET_CHECK_MSG (data_sink_, " Must set data sink before writing data\n " );
642- Result<size_t > ret = data_sink_->write (tensor.const_data_ptr (), tensor.nbytes ());
643- ET_CHECK_MSG (ret.ok (), " Failed to write tensor with error 0x%" PRIx32, static_cast <uint32_t >(ret.error ()));
644+ Result<size_t > ret =
645+ data_sink_->write (tensor.const_data_ptr (), tensor.nbytes ());
646+ ET_CHECK_MSG (
647+ ret.ok (),
648+ " Failed to write tensor with error 0x%" PRIx32,
649+ static_cast <uint32_t >(ret.error ()));
644650 return static_cast <long >(ret.get ());
645651}
646652
0 commit comments