From f8d623cb4477d78030c3020437a595a97e5b395a Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Thu, 14 May 2020 14:36:35 -0500 Subject: [PATCH] Fix README example error Change-Id: Ib0124642cea34dcbfae0ea3bbe8ffaf09116bede --- docs/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/README.md b/docs/README.md index eb1da72b98..f3f747dcc9 100755 --- a/docs/README.md +++ b/docs/README.md @@ -64,22 +64,22 @@ A simple "Hello World" type program that displays the device ID of detected devi #include #include "rocm_smi/rocm_smi.h" int main() { - rsmi_status_t ret; - uint32_t num_devices; - uint64_t dev_id; - - // We will skip return code checks for this example, but it + rsmi_status_t ret; + uint32_t num_devices; + uint16_t dev_id; + + // We will skip return code checks for this example, but it // is recommended to always check this as some calls may not // apply for some devices or ROCm releases - + ret = rsmi_init(0); ret = rsmi_num_monitor_devices(&num_devices); - + for (int i=0; i < num_devices; ++i) { ret = rsmi_dev_id_get(i, &dev_id); // dev_id holds the device ID of device i, upon a - // successful call - } + // successful call + } ret = rsmi_shut_down(); return 0; }