Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_devices should consider fragmentation #29

Open
sukyoungjeong-furiosa opened this issue May 30, 2022 · 1 comment
Open

find_devices should consider fragmentation #29

sukyoungjeong-furiosa opened this issue May 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sukyoungjeong-furiosa
Copy link
Collaborator

Let's assume 2 warboy NPUs (namely, npu0 and npu1) with a core of npu1 occupied.

(npu0) {0: Available, 1: Available}
(npu1) {0: Occupied("test"), 1: Available}

If someone is looking for an available singlecore devfile, it would be pleasant if find_devices(..) returns npu1pe1.

But current implementation returns npu0pe0 since it does not consider fragmentation.

[DeviceFile { device_index: 0, core_indices: [0], path: "/root/src/device-api/test_data/test-0/dev/npu0pe0", mode: Single }]
@sukyoungjeong-furiosa sukyoungjeong-furiosa added the enhancement New feature or request label May 30, 2022
@sukyoungjeong-furiosa
Copy link
Collaborator Author

I think we may need a delicate approach on this issue since, adopting greedy algorithm is improper in some situations.

ex) Assume a Renegade NPU (npu0) with 8 cores, with core indices 0, 1, 4 occupied (see diagram below).

If someone is looking for 2 singlecore devfiles, it would be best to return npu0pe2, npu0pe3.

But a step-by-step (greedy) approach may result in returning npu0pe5, npu0pe2.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant