Improve chip info logic. (#581)
* Clean up unused functions. * Fix number of XCDs for MI300X CPX (core partition). * Add support for memory partition mode. * Modify total_xcd to adapt to all gpu models. * Run black and isort. * Make gpu_arch regex more generic. * Add error checking for compute partition mode num xcds. * Set gpu_chip_id as optional. * Fix get_gpu_model. --------- Signed-off-by: xuchen-amd <xuchen@amd.com>
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
|
||||
import argparse
|
||||
import importlib
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import socket
|
||||
@@ -43,6 +42,10 @@ from utils.logger import (
|
||||
setup_file_handler,
|
||||
setup_logging_priority,
|
||||
)
|
||||
from utils.mi_gpu_spec import (
|
||||
get_gpu_series_dict,
|
||||
parse_mi_gpu_spec,
|
||||
)
|
||||
from utils.specs import MachineSpecs, generate_machine_specs
|
||||
from utils.utils import (
|
||||
console_debug,
|
||||
@@ -57,21 +60,6 @@ from utils.utils import (
|
||||
set_locale_encoding,
|
||||
)
|
||||
|
||||
SUPPORTED_ARCHS = {
|
||||
"gfx906": {"mi50": ["MI50", "MI60"]},
|
||||
"gfx908": {"mi100": ["MI100"]},
|
||||
"gfx90a": {"mi200": ["MI210", "MI250", "MI250X"]},
|
||||
"gfx940": {"mi300": ["MI300A_A0"]},
|
||||
"gfx941": {"mi300": ["MI300X_A0"]},
|
||||
"gfx942": {"mi300": ["MI300A_A1", "MI300X_A1"]},
|
||||
}
|
||||
|
||||
MI300_CHIP_IDS = {
|
||||
"29856": "MI300A_A1",
|
||||
"29857": "MI300X_A1",
|
||||
"29858": "MI308X",
|
||||
}
|
||||
|
||||
|
||||
class RocProfCompute:
|
||||
def __init__(self):
|
||||
@@ -87,7 +75,8 @@ class RocProfCompute:
|
||||
"ver_pretty": None,
|
||||
}
|
||||
self.__options = {}
|
||||
self.__supported_archs = SUPPORTED_ARCHS
|
||||
parse_mi_gpu_spec()
|
||||
self.__supported_archs = get_gpu_series_dict()
|
||||
self.__mspec: MachineSpecs = None # to be initalized in load_soc_specs()
|
||||
setup_console_handler()
|
||||
self.set_version()
|
||||
|
||||
Reference in New Issue
Block a user