MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / interpret

Method interpret

src/include/npu_utils/npu_instr_utils.hpp:199–224  ·  view source on GitHub ↗

@brief print the npu sequence @note The function will print the npu major, minor, dev gen, rows, cols, mem tile rows, instruction counts, instruction lines and the commands in the npu sequence

Source from the content-addressed store, hash-verified

197 ///@brief print the npu sequence
198 ///@note The function will print the npu major, minor, dev gen, rows, cols, mem tile rows, instruction counts, instruction lines and the commands in the npu sequence
199 void interpret(){
200 int line_number = 0;
201 MSG_BONDLINE(INSTR_PRINT_WIDTH);
202 uint32_t* seq = this->npu_seq.data();
203 instr_print(line_number, seq[line_number], "NPU information");
204 instr_print(-1, seq[line_number], "--NPU version: " + std::to_string(this->npu_major) + "." + std::to_string(this->npu_minor));
205 instr_print(-1, seq[line_number], "--NPU generation: " + std::to_string(this->npu_dev_gen));
206 instr_print(-1, seq[line_number], "--NPU rows: " + std::to_string(this->npu_rows));
207 line_number++;
208 instr_print(line_number, seq[line_number], "--NPU cols: " + std::to_string(this->npu_cols));
209 instr_print(-1, seq[line_number], "--NPU memory tile rows: " + std::to_string(this->npu_mem_tile_rows));
210 line_number++;
211
212 // Instruction commands
213 instr_print(line_number, seq[line_number], "Instruction commands: " + std::to_string(seq[line_number]));
214 line_number++;
215
216 // Instruction lines
217 instr_print(line_number, seq[line_number], "Instruction lines: " + std::to_string(seq[line_number] / 4));
218 line_number++;
219
220 for (int i = 0; i < this->cmds.size(); i++){
221 line_number = this->cmds[i]->print_cmd(seq + line_number, line_number, i);
222 }
223 MSG_BONDLINE(INSTR_PRINT_WIDTH);
224 }
225
226 ///@brief setup the npu device
227 ///@param device the npu device

Callers

nothing calls this directly

Calls 5

instr_printFunction · 0.85
to_stringFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
print_cmdMethod · 0.45

Tested by

no test coverage detected