| 9 | |
| 10 | |
| 11 | AutoModel::AutoModel(xrt::device* npu_device_inst, std::string current_model) { |
| 12 | this->npu_device_inst = npu_device_inst; |
| 13 | this->current_model = current_model; |
| 14 | this->total_tokens = 0; |
| 15 | this->profiler_list.resize(PROFILER_TYPE_NUM); |
| 16 | for (size_t i = 0; i < PROFILER_TYPE_NUM; i++) { |
| 17 | this->profiler_list[i] = profiler(); |
| 18 | } |
| 19 | this->last_prefill_time = { 0, "us" }; |
| 20 | this->token_history.reserve(MAX_L); |
| 21 | } |
| 22 | |
| 23 | |
| 24 | std::string AutoModel::get_current_model() { |