[SWDEV-515298] Fix 'amdsmi_nps_flags_t' refactor (#110)

Earlier commit changing union object name needed to update Python/Rust
references.

Change-Id: I4097dbf3b114abe91d6ca1dfd8aae4ce39fea619
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
Poag, Charis
2025-02-13 13:52:34 -06:00
committad av GitHub
förälder 8c9e77bb7b
incheckning 4cab72d692
2 ändrade filer med 15 tillägg och 15 borttagningar
+12 -12
Visa fil
@@ -2842,13 +2842,13 @@ def amdsmi_get_gpu_memory_partition_config(processor_handle: amdsmi_wrapper.amds
)
)
mem_caps_list = []
if config.partition_caps.amdsmi_nps_flags_t.nps1_cap == 1:
if config.partition_caps.nps_flags.nps1_cap == 1:
mem_caps_list.append("NPS1")
if config.partition_caps.amdsmi_nps_flags_t.nps2_cap == 1:
if config.partition_caps.nps_flags.nps2_cap == 1:
mem_caps_list.append("NPS2")
if config.partition_caps.amdsmi_nps_flags_t.nps4_cap == 1:
if config.partition_caps.nps_flags.nps4_cap == 1:
mem_caps_list.append("NPS4")
if config.partition_caps.amdsmi_nps_flags_t.nps8_cap == 1:
if config.partition_caps.nps_flags.nps8_cap == 1:
mem_caps_list.append("NPS8")
return_dict = {
@@ -2926,13 +2926,13 @@ def amdsmi_get_gpu_accelerator_partition_profile(
partition_ids = "N/A"
mem_caps_list = []
if profile.memory_caps.amdsmi_nps_flags_t.nps1_cap == 1:
if profile.memory_caps.nps_flags.nps1_cap == 1:
mem_caps_list.append("NPS1")
if profile.memory_caps.amdsmi_nps_flags_t.nps2_cap == 1:
if profile.memory_caps.nps_flags.nps2_cap == 1:
mem_caps_list.append("NPS2")
if profile.memory_caps.amdsmi_nps_flags_t.nps4_cap == 1:
if profile.memory_caps.nps_flags.nps4_cap == 1:
mem_caps_list.append("NPS4")
if profile.memory_caps.amdsmi_nps_flags_t.nps8_cap == 1:
if profile.memory_caps.nps_flags.nps8_cap == 1:
mem_caps_list.append("NPS8")
partition_profile_dict = {
@@ -2980,13 +2980,13 @@ def amdsmi_get_gpu_accelerator_partition_profile_config(processor_handle: amdsmi
mem_caps_list = []
if profile.memory_caps.amdsmi_nps_flags_t.nps1_cap == 1:
if profile.memory_caps.nps_flags.nps1_cap == 1:
mem_caps_list.append("NPS1")
if profile.memory_caps.amdsmi_nps_flags_t.nps2_cap == 1:
if profile.memory_caps.nps_flags.nps2_cap == 1:
mem_caps_list.append("NPS2")
if profile.memory_caps.amdsmi_nps_flags_t.nps4_cap == 1:
if profile.memory_caps.nps_flags.nps4_cap == 1:
mem_caps_list.append("NPS4")
if profile.memory_caps.amdsmi_nps_flags_t.nps8_cap == 1:
if profile.memory_caps.nps_flags.nps8_cap == 1:
mem_caps_list.append("NPS8")
for r in range(config.num_resource_profiles):
+3 -3
Visa fil
@@ -972,7 +972,7 @@ const _: () = {
#[repr(C)]
#[derive(Copy, Clone)]
pub union AmdsmiNpsCapsT {
pub amdsmi_nps_flags_t: AmdsmiNpsCapsTNpsFlags,
pub nps_flags: AmdsmiNpsCapsTNpsFlags,
pub nps_cap_mask: u32,
}
#[repr(C)]
@@ -1079,8 +1079,8 @@ impl AmdsmiNpsCapsTNpsFlags {
const _: () = {
["Size of AmdsmiNpsCapsT"][::std::mem::size_of::<AmdsmiNpsCapsT>() - 4usize];
["Alignment of AmdsmiNpsCapsT"][::std::mem::align_of::<AmdsmiNpsCapsT>() - 4usize];
["Offset of field: AmdsmiNpsCapsT::amdsmi_nps_flags_t"]
[::std::mem::offset_of!(AmdsmiNpsCapsT, amdsmi_nps_flags_t) - 0usize];
["Offset of field: AmdsmiNpsCapsT::nps_flags"]
[::std::mem::offset_of!(AmdsmiNpsCapsT, nps_flags) - 0usize];
["Offset of field: AmdsmiNpsCapsT::nps_cap_mask"]
[::std::mem::offset_of!(AmdsmiNpsCapsT, nps_cap_mask) - 0usize];
};