[SWDEV-423481/SWDEV-423393] Align all device identifier details

Updated:
 * [CLI] Fixed vram % - printf style formatting causes many data errors
   This fix updates to the recommended way of outputting formatted data.
   https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting
 * [API/CLI] Added gpu_id / GUID from kfd (rsmi_dev_guid_get)
       -> CLI name: "GUID"
       -> ROCm SMI calls: no arg, -i, --showhw, --showproduct
 * [API/CLI] Added node_id from kfd (rsmi_dev_node_get)
       -> CLI name: "Node"
       -> ROCm SMI calls: no arg, --showhw, --showproduct
 * [CLI] Added target gfx version from kfd
       -> CLI name: "GFX Version" or "GFX VER"
       -> ROCm SMI calls: --showhw, --showproduct
 * [CLI] Base ROCm CLI
       -> Removed - stacked id formatting:
	   This is to simplify identifiers helpful to users.
	   More identifiers can be found on -i --showhw, --showproduct
 * [CLI] Update -i, --showhw, --showproduct, w/out arg
      -> Card ID/DID/Model/SKU/VBIOS:
            All unsupported values now display "N/A" instead
            of "unknown" or "unsupported"
 * [CLI] Showhw now expands data based on content

Change-Id: Ifb8586f9f545892b8a5aa7903608273cdd77e075
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
이 커밋은 다음에 포함됨:
Charis Poag
2024-01-31 21:03:33 -06:00
부모 677433b367
커밋 4b5ccb57f0
8개의 변경된 파일403개의 추가작업 그리고 171개의 파일을 삭제
+49 -1
파일 보기
@@ -1624,6 +1624,54 @@ rsmi_status_t rsmi_dev_unique_id_get(uint32_t dv_ind, uint64_t *id);
*/
rsmi_status_t rsmi_dev_xgmi_physical_id_get(uint32_t dv_ind, uint16_t *id);
/**
* @brief Get the GUID, also known as the GPU device id,
* associated with the provided device index indicated by KFD.
*
* @details Given a device index @p dv_ind and a pointer to a uint64_t
* @p guid, this function will write the KFD GPU id value to the
* uint64_t pointed to by @p guid.
*
* @param[in] dv_ind a device index
*
* @param[inout] gpu_id a pointer to uint64_t to which the KFD gpu id will be
* written. If the @p guid parameter is nullptr, this function will return
* ::RSMI_STATUS_INVALID_ARGS. If the GPU ID is not supported with
* the device index queried, gpu_id will return MAX UINT64 value an
* arguments and ::RSMI_STATUS_NOT_SUPPORTED as a response.
*
* @retval ::RSMI_STATUS_SUCCESS call was successful
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
* support this function with the given arguments
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
*
*/
rsmi_status_t rsmi_dev_guid_get(uint32_t dv_ind, uint64_t *guid);
/**
* @brief Get the node id associated with the provided device index
* indicated by KFD.
*
* @details Given a device index @p dv_ind and a pointer to a uint32_t
* @p node_id, this function will write the KFD node id value to the
* uint32_t pointed to by @p node_id.
*
* @param[in] dv_ind a device index
*
* @param[inout] node_id a pointer to uint64_t to which the KFD gpu id will be
* written. If the @p node_id parameter is nullptr, this function will return
* ::RSMI_STATUS_INVALID_ARGS. If @p node_id is not supported with
* the device index queried, @p node_id will return MAX UINT64 value as an
* argument and ::RSMI_STATUS_NOT_SUPPORTED as a response.
*
* @retval ::RSMI_STATUS_SUCCESS call was successful
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
* support this function with the given arguments
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
*
*/
rsmi_status_t rsmi_dev_node_id_get(uint32_t dv_ind, uint32_t *node_id);
/** @} */ // end of IDQuer
@@ -3205,7 +3253,7 @@ rsmi_dev_firmware_version_get(uint32_t dv_ind, rsmi_fw_block_t block,
uint64_t *fw_version);
/**
* @brief Get the graphics version for a GPU device
* @brief Get the target graphics version for a GPU device
*
* @details Given a device ID @p dv_ind and a uint64_t pointer
* @p gfx_version, this function will write the graphics version.
+4
파일 보기
@@ -86,6 +86,10 @@ class KFDNode {
// Get gfx target version from kfd
int get_gfx_target_version(uint64_t* gfx_target_version);
// Get gpu_id (AKA GUID) version from kfd
int get_gpu_id(uint64_t *gpu_id);
// Get node id from kfd
int get_node_id(uint32_t *node_id);
private:
uint32_t node_indx_;
+2 -1
파일 보기
@@ -162,7 +162,8 @@ std::string print_unsigned_hex_and_int(T i, std::string heading="") {
}
ss << "Hex (MSB): " << print_int_as_hex(i) << ", "
<< "Unsigned int: " << print_unsigned_int(i) << ", "
<< "Byte Size: " << sizeof(T);
<< "Byte Size: " << sizeof(T) << ", "
<< "Bits: " << sizeof(T) * 8; // 8 bits per 1 byte
return ss.str();
}