Revert "Implement CPU discovery support"

This reverts commit f967f8a17d15e148464393fcd145af01dc0e1525.
This commit is contained in:
Galantsev, Dmitrii authored and Galantsev, Dmitrii committed 2025-04-07 20:45:19 -05:00
1 förälder c96f5db52c
incheckning 24024f0e4f
16 files changed
+4 -364

No files matched your search

-51
Visa fil
@@ -410,21 +410,6 @@ typedef enum {
RDC_HEALTH_EEPROM_CONFIG_VALID, //!< Reads the EEPROM and verifies the checksums
RDC_HEALTH_POWER_THROTTLE_TIME, //!< Power throttle status counter
RDC_HEALTH_THERMAL_THROTTLE_TIME, //!< Total time in thermal throttle status (microseconds)
/**
* @brief RDC CPU related fields
*/
RDC_FI_DEV_CPU_UTIL_TOTAL = 10001, //!< CPU total percentage of time in use
RDC_FI_DEV_CPU_UTIL_USER, //!< The percentage of time in use by the user
RDC_FI_DEV_CPU_UTIL_NICE, //!< The percentage of time in use by low priority (high nice score) programs
RDC_FI_DEV_CPU_UTIL_SYS, //!< The percentage of time in use by the system
RDC_FI_DEV_CPU_UTIL_IRQ, //!< The percentage of time in use by interrupts
RDC_FI_DEV_CPU_TEMP_CURRENT, //!< Instantaneous temperature (Celsius)
RDC_FI_DEV_CPU_CLOCK_CURRENT, //!< Instantaneous clock speed (KHz)
RDC_FI_DEV_CPU_POWER_UTIL_CURRENT, //!< Instantaneous power usage (watts)
RDC_FI_DEV_CPU_POWER_LIMIT, //!< Instantaneous power limit (watts)
RDC_FI_DEV_CPU_VENDOR, //!< The name of the vendor
RDC_FI_DEV_CPU_MODEL, //!< The name of the model
RDC_FI_DEV_CPU_COUNT,
} rdc_field_t;
// even and odd numbers are used for correctable and uncorrectable errors
@@ -1056,25 +1041,6 @@ rdc_status_t rdc_field_update_all(rdc_handle_t p_rdc_handle, uint32_t wait_for_u
rdc_status_t rdc_device_get_all(rdc_handle_t p_rdc_handle,
uint32_t gpu_index_list[RDC_MAX_NUM_DEVICES], uint32_t* count);
/**
* @brief Get indexes corresponding to all the devices on the system.
*
* @details Indexes represents RDC CPU Id corresponding to each CPU on the
* system and is immutable during the lifespan of the engine. The list
* should be queried again if the engine is restarted.
*
* @param[in] p_rdc_handle The RDC handler.
*
* @param[out] cpu_index_list Array reference to fill CPU indexes present on
* the system.
*
* @param[out] count Number of CPUs returned in cpu_index_list.
*
* @retval ::RDC_ST_OK is returned upon successful call.
*/
rdc_status_t rdc_device_get_all_cpu(rdc_handle_t p_rdc_handle,
uint32_t cpu_index_list[RDC_MAX_NUM_DEVICES], uint32_t* count);
/**
* @brief Gets device attributes corresponding to the gpu_index.
*
@@ -1092,23 +1058,6 @@ rdc_status_t rdc_device_get_all_cpu(rdc_handle_t p_rdc_handle,
rdc_status_t rdc_device_get_attributes(rdc_handle_t p_rdc_handle, uint32_t gpu_index,
rdc_device_attributes_t* p_rdc_attr);
/**
* @brief Gets device attributes corresponding to the cpu_index.
*
* @details Fetch the attributes, such as device name, of a CPU.
*
* @param[in] p_rdc_handle The RDC handler.
*
* @param[in] cpu_index CPU index corresponding to which the attributes
* should be fetched
*
* @param[out] p_rdc_attr CPU attribute corresponding to the cpu_index.
*
* @retval ::RDC_ST_OK is returned upon successful call.
*/
rdc_status_t rdc_device_get_cpu_attributes(rdc_handle_t p_rdc_handle, uint32_t cpu_index,
rdc_device_attributes_t* p_rdc_attr);
/**
* @brief Get version information of components used by rdc.
*
-4
Visa fil
@@ -43,12 +43,8 @@ class RdcHandler {
// Discovery API
virtual rdc_status_t rdc_device_get_all(uint32_t gpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) = 0;
virtual rdc_status_t rdc_device_get_all_cpu(uint32_t cpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) = 0;
virtual rdc_status_t rdc_device_get_attributes(uint32_t gpu_index,
rdc_device_attributes_t* p_rdc_attr) = 0;
virtual rdc_status_t rdc_device_get_cpu_attributes(uint32_t cpu_index,
rdc_device_attributes_t* p_rdc_attr) = 0;
virtual rdc_status_t rdc_device_get_component_version(rdc_component_t component,
rdc_component_version_t* p_rdc_compv) = 0;
+1 -2
Visa fil
@@ -39,8 +39,7 @@ class RdcMetricFetcher {
virtual rdc_status_t fetch_smi_field(uint32_t gpu_index, rdc_field_t field_id,
rdc_field_value* value) = 0;
virtual rdc_status_t fetch_smi_cpu_field(uint32_t cpu_index, rdc_field_t field_id,
rdc_field_value* value) = 0;
virtual rdc_status_t bulk_fetch_smi_fields(
rdc_gpu_field_t* fields, uint32_t fields_count,
std::vector<rdc_gpu_field_value_t>& results) = 0; // NOLINT
-5
Visa fil
@@ -53,13 +53,8 @@ class RdcEmbeddedHandler final : public RdcHandler {
// Discovery API
rdc_status_t rdc_device_get_all(uint32_t gpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) override;
// Discovery API For CPU
rdc_status_t rdc_device_get_all_cpu(uint32_t cpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) override;
rdc_status_t rdc_device_get_attributes(uint32_t gpu_index,
rdc_device_attributes_t* p_rdc_attr) override;
rdc_status_t rdc_device_get_cpu_attributes(uint32_t cpu_index,
rdc_device_attributes_t* p_rdc_attr) override;
rdc_status_t rdc_device_get_component_version(rdc_component_t component,
rdc_component_version_t* p_rdc_compv) override;
@@ -71,8 +71,6 @@ class RdcMetricFetcherImpl final : public RdcMetricFetcher {
public:
rdc_status_t fetch_smi_field(uint32_t gpu_index, rdc_field_t field_id,
rdc_field_value* value) override;
rdc_status_t fetch_smi_cpu_field(uint32_t cpu_index, rdc_field_t field_id,
rdc_field_value* value) override;
rdc_status_t bulk_fetch_smi_fields(
rdc_gpu_field_t* fields, uint32_t fields_count,
std::vector<rdc_gpu_field_value_t>& results) override; // NOLINT
@@ -47,12 +47,8 @@ class RdcStandaloneHandler : public RdcHandler {
// Discovery RdcAPI
rdc_status_t rdc_device_get_all(uint32_t gpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) override;
rdc_status_t rdc_device_get_all_cpu(uint32_t cpu_index_list[RDC_MAX_NUM_DEVICES],
uint32_t* count) override;
rdc_status_t rdc_device_get_attributes(uint32_t gpu_index,
rdc_device_attributes_t* p_rdc_attr) override;
rdc_status_t rdc_device_get_cpu_attributes(uint32_t cpu_index,
rdc_device_attributes_t* p_rdc_attr) override;
rdc_status_t rdc_device_get_component_version(rdc_component_t component,
rdc_component_version_t* p_rdc_compv) override;