@@ -37,6 +37,8 @@ MultimodalPrefiller::MultimodalPrefiller(
3737Result<uint64_t > MultimodalPrefiller::prefill (
3838 const MultimodalInput& input,
3939 int64_t & start_pos) {
40+ ET_LOG (Error, " Here 000000000000000000000000000000000000000000000000000000000000000000 %d" , (int ) (start_pos));
41+ ET_LOG (Error, " Here 000000000000000000000000000000000000000000000000000000000000000000 %s" , input.get_text ().c_str ());
4042 // 1. Run encoder model.
4143 ::executorch::runtime::EValue encoder_output;
4244 if (input.is_image ()) {
@@ -73,12 +75,14 @@ Result<uint64_t> MultimodalPrefiller::prefill(
7375 auto & text = input.get_text ();
7476 std::vector<uint64_t > tokens =
7577 ET_UNWRAP_TOKENIZER (tokenizer_->encode (text));
78+ ET_LOG (Error, " Here 666666666666666666666666666666666666666666666666666666666666666666666666666666" );
7679
7780 auto text_tensor = executorch::extension::from_blob (
7881 tokens.data (),
7982 {1 , static_cast <aten::SizesType>(tokens.size ())},
8083 ::executorch::aten::ScalarType::Long);
8184
85+ ET_LOG (Error, " Here 555555555555555555555555555555555555555555555555555555555555555555555555555" );
8286 // Run text encoder (token embeddings)
8387 auto token_embedding_outputs =
8488 ET_UNWRAP (module_->execute (kTokenEmbeddingMethod , text_tensor));
@@ -89,6 +93,7 @@ Result<uint64_t> MultimodalPrefiller::prefill(
8993 // For any other input types, return error
9094 return ::executorch::runtime::Error::NotSupported;
9195 }
96+ ET_LOG (Error, " Here 000000000000000000000000000000000000000000000000000000000000000000000000000" );
9297
9398 // 2. Run decoder model for prefill.
9499 // `cache_position` goes from start_pos to start_pos + encoder_output.size(1).
@@ -107,6 +112,7 @@ Result<uint64_t> MultimodalPrefiller::prefill(
107112 cache_positions.data (),
108113 {static_cast <int >(seq_len)},
109114 executorch::aten::ScalarType::Long);
115+ ET_LOG (Error, " Here 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" );
110116 auto prefill_result = module_->execute (
111117 kTextModelMethod , {cache_position_tensor, encoder_output});
112118 if (prefill_result.error () != ::executorch::runtime::Error::Ok) {
@@ -121,6 +127,7 @@ Result<uint64_t> MultimodalPrefiller::prefill(
121127 return ::executorch::runtime::Error::InvalidState;
122128 }
123129 auto outputs_res = prefill_outputs[0 ].toTensor ();
130+ ET_LOG (Error, " Here 222222222222222222222222222222222222222222222222222222222222222222222222222222" );
124131
125132 // Update start_pos, tracking the current cache position.
126133 start_pos += seq_len;
0 commit comments