Skip to content

Unify device and priority dimension order in stream pool management#92

Open
rauletorresc wants to merge 1 commit intoAscend:masterfrom
rauletorresc:patch-1
Open

Unify device and priority dimension order in stream pool management#92
rauletorresc wants to merge 1 commit intoAscend:masterfrom
rauletorresc:patch-1

Conversation

@rauletorresc
Copy link
Copy Markdown

Description of the problem

Currently, npu_counters and npu_streams multi-dimensional arrays have priority as the major dimension enclosing the minor device and stream dimensions, e.g. npu_streams[priority_id][device_id][stream_id]. However device_priority_flags has priority and device interchanged. Moreover, iterating through npu_streams is made inefficiently, with the inner loop iterating through the outermost dimension, an the outer loop iterating through the innermost dimension.

Proposed solution

  • Make npu_counters and npu_streams follow device_priority_flags dimension order, e.g. npu_streams[device_id][priority_id][stream_id].
  • Rearrange loops so they follow and exploit the row-major order.

**Descrition of the problem**

Currently, `npu_counters` and `npu_streams` multi-dimensional arrays have priority as the major dimension enclosing the minor device and stream dimensions, e.g. `npu_streams[priority_id][device_id][stream_id]`. However `device_priority_flags` has priority and device interchanged. Moreover, iterating through `npu_streams` is made inefficiently, with the inner loop iterating through the outermost dimension, an the outer loop iterating through the innermost dimension.

**Proposed solution**

* Make `npu_counters` and `npu_streams` follow `device_priority_flags` dimension order, e.g. `npu_streams[device_id][priority_id][stream_id]`.
* Rearrange loops so they follow and exploit the row-major order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant