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

Add more metadata to DeviceInfo #42

Closed sukyoungjeong-furiosa closed 2 years ago

sukyoungjeong-furiosa commented 2 years ago

이 PR은 Device 구조체를 통해 sysfs로부터 가져올 수 있는 metadata 종류를 추가하고, #31 과 같이 lazy read를 지원합니다. (resolves #31)

크게 다음 부분이 변했습니다.

pub struct DeviceInfo { device_index: u8, dev_root: PathBuf, sys_root: PathBuf, meta: DeviceMetadata, }

pub(crate) struct DeviceMetadata { pub(crate) arch: Arch, pub(crate) map: HashMap<&'static str, String>, }

libc-furiosa commented 2 years ago

머지하겠습니다. 수고하셨습니다.