furiosa-ai / device-api

APIs that offers NPU devices' information and allow to control the devices
Apache License 2.0
5 stars 8 forks source link

Remove deprecated enums and re-design DeviceConfig #110

Open n0gu-furiosa opened 5 months ago

n0gu-furiosa commented 5 months ago

This PR introduces two changes.

1. Deprecation of DeviceMode and Changes in DeviceConfig

DeviceMode::MultiCore is no longer supported, rendering DeviceMode unnecessary as there is sufficient information in CoreRange to determine fusion.

Due to this, DeviceConfig has undergone significant changes:

2. Deprecation of CoreStatus::Unavailable

This status previously indicated that at least one core in a range was Occupied by another process. Since this concept overlaps with Occupied, we now return the first Occupied status when a range is unavailable.

Request for Feedback:

There may be a better design around .cores(N). My concerns are:

Feedback on these points is highly appreciated.