INNER CODE UNIT · Rust

name_for_id

ilya-zlobintsev/LACT · lact-cli/src/lib.rs:142

    async fn name_for_id(&self, gpu_id: &str) -> anyhow::Result<Option<String>> {
        Ok(self
            .client
            .list_devices()
            .await?
            .into_iter()
            .find(|entry| entry.id == gpu_id)
            .and_then(|entry| entry.name)
            .map(|name| clean_gpu_name(&name).to_owned()))
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…