Open sukyoungjeong-furiosa opened 2 years ago
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
.
Let's assume 2 warboy NPUs (namely,
npu0
andnpu1
) with a core ofnpu1
occupied.If someone is looking for an available singlecore devfile, it would be pleasant if
find_devices(..)
returnsnpu1pe1
.But current implementation returns
npu0pe0
since it does not consider fragmentation.