diff --git a/include/rocm_smi/rocm_smi.h b/include/rocm_smi/rocm_smi.h index 085f92787e..b8a9ce3007 100755 --- a/include/rocm_smi/rocm_smi.h +++ b/include/rocm_smi/rocm_smi.h @@ -224,15 +224,29 @@ typedef enum { //!< neighbor 0 RSMI_EVNT_XGMI_0_RESPONSE_TX, //!< Outgoing responses to //!< neighbor 0 - RSMI_EVNT_XGMI_0_BEATS_TX, //!< Data beats sent to - //!< neighbor 0 + /** + * @brief + * + * Data beats sent to neighbor 0; Each beat represents 32 bytes.

+ * + * XGMI throughput can be calculated by multiplying a BEATs event + * such as ::RSMI_EVNT_XGMI_0_BEATS_TX by 32 and dividing by + * the time for which event collection occurred, + * ::rsmi_counter_value_t.time_running (which is in nanoseconds). To get + * bytes per second, multiply this value by 109.
+ *
+ * Throughput = BEATS/time_running * 109 (bytes/second)
+ */ + // ie, Throughput = BEATS/time_running 10^9 bytes/sec + RSMI_EVNT_XGMI_0_BEATS_TX, RSMI_EVNT_XGMI_1_NOP_TX, //!< NOPs sent to neighbor 1 RSMI_EVNT_XGMI_1_REQUEST_TX, //!< Outgoing requests to //!< neighbor 1 RSMI_EVNT_XGMI_1_RESPONSE_TX, //!< Outgoing responses to //!< neighbor 1 RSMI_EVNT_XGMI_1_BEATS_TX, //!< Data beats sent to - //!< neighbor 1 + //!< neighbor 1; Each beat + //!< represents 32 bytes RSMI_EVNT_XGMI_LAST = RSMI_EVNT_XGMI_1_BEATS_TX, @@ -255,7 +269,9 @@ typedef enum { typedef struct { uint64_t value; //!< Counter value uint64_t time_enabled; //!< Time that the counter was enabled - uint64_t time_running; //!< Time that che counter was running + //!< (in nanoseconds) + uint64_t time_running; //!< Time that the counter was running + //!< (in nanoseconds) } rsmi_counter_value_t; /** @@ -1555,7 +1571,7 @@ rsmi_dev_memory_total_get(uint32_t dv_ind, rsmi_memory_type_t mem_type, * @details Given a device index @p dv_ind, a type of memory @p mem_type, and * a pointer to a uint64_t @p usage, this function will write the amount of * @p mem_type memory that that is currently being used to the location - * pointed to by @p total. + * pointed to by @p used. * * @param[in] dv_ind a device index * diff --git a/rocm_smi/CMakeLists.txt b/rocm_smi/CMakeLists.txt index 39c49c3f48..79b53c182d 100755 --- a/rocm_smi/CMakeLists.txt +++ b/rocm_smi/CMakeLists.txt @@ -127,7 +127,7 @@ if (DOXYGEN_FOUND AND LATEX_FOUND) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docs/amd_smi_doxygen.cfg - "${COMMON_SRC_ROOT}/include/rocm_smi/rocm_smi.h" + "${COMMON_INC_DIR}/rocm_smi.h" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf COMMAND make > /dev/null diff --git a/rocm_smi/docs/ROCm_SMI_Manual.pdf b/rocm_smi/docs/ROCm_SMI_Manual.pdf index a51f7f90d9..a1a7c2cf0a 100644 Binary files a/rocm_smi/docs/ROCm_SMI_Manual.pdf and b/rocm_smi/docs/ROCm_SMI_Manual.pdf differ diff --git a/rocm_smi/docs/amd_smi_doxygen.cfg b/rocm_smi/docs/amd_smi_doxygen.cfg index 3ecd26bae2..a25e8f42f5 100644 --- a/rocm_smi/docs/amd_smi_doxygen.cfg +++ b/rocm_smi/docs/amd_smi_doxygen.cfg @@ -758,8 +758,8 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = @CMAKE_CURRENT_SOURCE_DIR@/rocm_smi/docs/README.md \ - @CMAKE_CURRENT_SOURCE_DIR@/include/rocm_smi/rocm_smi.h +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs/README.md \ + @CMAKE_CURRENT_SOURCE_DIR@/../include/rocm_smi/rocm_smi.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/src/rocm_smi.cc b/src/rocm_smi.cc index ec0221ca8d..0a1ebf12fe 100755 --- a/src/rocm_smi.cc +++ b/src/rocm_smi.cc @@ -3008,7 +3008,7 @@ rsmi_topo_get_link_weight(uint32_t dv_ind_src, uint32_t dv_ind_dst, } } else { *weight = kfd_node->numa_node_weight(); // from src GPU to it's CPU node - uint64_t numa_weight_dst; + uint64_t numa_weight_dst = 0; status = topo_get_numa_node_weight(dv_ind_dst, &numa_weight_dst); // from dst GPU to it's CPU node if (status == RSMI_STATUS_SUCCESS) {