Support max_num_cu_shared and num_cache_instance
Add above fields for cache info. Remove driver_date in CLI and Remove the disable properties of cache. Change-Id: I80672490908d9e32a149076cc37459fa56b8b0bf
This commit is contained in:
committed by
Shuzhou Liu
szülő
e9a6153836
commit
59b510de2b
@@ -1308,6 +1308,8 @@ def amdsmi_get_gpu_cache_info(
|
||||
for cache_index in range(cache_info.num_cache_types):
|
||||
cache_size = cache_info.cache[cache_index].cache_size_kb
|
||||
cache_level = cache_info.cache[cache_index].cache_level
|
||||
max_num_cu_shared = cache_info.cache[cache_index].max_num_cu_shared
|
||||
num_cache_instance = cache_info.cache[cache_index].num_cache_instance
|
||||
cache_flags = cache_info.cache[cache_index].flags
|
||||
data_cache = bool(cache_flags & amdsmi_wrapper.CACHE_FLAGS_DATA_CACHE)
|
||||
inst_cache = bool(cache_flags & amdsmi_wrapper.CACHE_FLAGS_INST_CACHE)
|
||||
@@ -1315,10 +1317,13 @@ def amdsmi_get_gpu_cache_info(
|
||||
simd_cache = bool(cache_flags & amdsmi_wrapper.CACHE_FLAGS_SIMD_CACHE)
|
||||
cache_info_dict[f"cache {cache_index}"] = {"cache_size": cache_size,
|
||||
"cache_level": cache_level,
|
||||
"data_cache": data_cache,
|
||||
"instruction_cache": inst_cache,
|
||||
"cpu_cache": cpu_cache,
|
||||
"simd_cache": simd_cache}
|
||||
"max_num_cu_shared": max_num_cu_shared,
|
||||
"num_cache_instance": num_cache_instance}
|
||||
if (data_cache): cache_info_dict[f"cache {cache_index}"]["data_cache"] = data_cache
|
||||
if (inst_cache): cache_info_dict[f"cache {cache_index}"]["inst_cache"] = inst_cache
|
||||
if (cpu_cache): cache_info_dict[f"cache {cache_index}"]["cpu_cache"] = cpu_cache
|
||||
if (simd_cache): cache_info_dict[f"cache {cache_index}"]["simd_cache"] = simd_cache
|
||||
|
||||
|
||||
if cache_info_dict == {}:
|
||||
raise AmdSmiLibraryException(amdsmi_wrapper.AMDSMI_STATUS_NO_DATA)
|
||||
@@ -1624,8 +1629,7 @@ def amdsmi_get_gpu_driver_info(
|
||||
|
||||
return {
|
||||
"driver_name": info.driver_name.decode("utf-8"),
|
||||
"driver_version": info.driver_version.decode("utf-8"),
|
||||
"driver_date": info.driver_date.decode("utf-8")
|
||||
"driver_version": info.driver_version.decode("utf-8")
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -773,6 +773,8 @@ struct_cache_._fields_ = [
|
||||
('cache_size_kb', ctypes.c_uint32),
|
||||
('cache_level', ctypes.c_uint32),
|
||||
('flags', ctypes.c_uint32),
|
||||
('max_num_cu_shared', ctypes.c_uint32),
|
||||
('num_cache_instance', ctypes.c_uint32),
|
||||
('reserved', ctypes.c_uint32 * 3),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user