mrsnu / band

Multi-DNN Inference Engine for Heterogeneous Mobile Processors
Other
23 stars 2 forks source link

Question for the `GetUnitSubgraphs` function #312

Closed dongho-Han closed 5 months ago

dongho-Han commented 5 months ago

In band/model_analyzer.cc, I have a question for this code block. https://github.com/mrsnu/band/blob/236378ef119d8b744b39932ea7b8a3481e0c337b/band/model_analyzer.cc#L354-L362

As the unsupported_ops and op_sets_to_ignore maps are defined with worker_id, not device id, I think using tmp_worker_id corresponding with device_flag is not correct. Suppose, Worker 0: CPU with CPUMaskFlag::kBig. Worker 1: CPU with CPUMaskFlag::kLittle, Worker 2: GPU with CPUMaskFlag::kAll case. In that manner, we should find the corresponding unsupported ops' information using worker_id, not device_flag.

My suggestion is changing the code into

if (unsupported_ops.find(worker_id) == unsupported_ops.end() ||
            unsupported_ops.at(worker_id).find(op_index) ==
                unsupported_ops.at(worker_id).end()) {
          if (op_sets_to_ignore[worker_id].find(op_index) ==
              op_sets_to_ignore[worker_id].end()) {
            op_support_table[op_index] |= 1 << worker_id;
          }
        }

Could you suggest any ideas?

dostos commented 5 months ago

Resolved in #313

dongho-Han commented 5 months ago

@dostos I'm sorry, but I seperated this issue to #315 PR.