Register TRACE loglevel ahead of parse_args to avoid error in --specs printout
Signed-off-by: coleramos425 <colramos@amd.com>
[ROCm/rocprofiler-compute commit: 706afa7f37]
This commit is contained in:
committed by
Cole Ramos
vanhempi
fa02efc962
commit
e1470d7a38
@@ -64,7 +64,13 @@ class PlainFormatter(logging.Formatter):
|
||||
# Setup console handler - provided as separate function to be called
|
||||
# prior to argument parsing
|
||||
def setup_console_handler():
|
||||
# register a trace level logger
|
||||
logging.TRACE = logging.DEBUG - 5
|
||||
logging.addLevelName(logging.TRACE, "TRACE")
|
||||
setattr(logging, "TRACE", logging.TRACE)
|
||||
setattr(logging, "trace", trace_logger)
|
||||
|
||||
# setup log formatting
|
||||
color_setting = 0
|
||||
if "OMNIPERF_COLOR" in os.environ.keys():
|
||||
color_setting = int(os.environ["OMNIPERF_COLOR"])
|
||||
@@ -97,11 +103,6 @@ def setup_file_handler(loglevel, workload_dir):
|
||||
|
||||
# Setup logger priority - called after argument parsing
|
||||
def setup_logging_priority(verbosity, quietmode, appmode):
|
||||
# register a trace level logger
|
||||
logging.TRACE = logging.DEBUG - 5
|
||||
logging.addLevelName(logging.TRACE, "TRACE")
|
||||
setattr(logging, "TRACE", logging.TRACE)
|
||||
setattr(logging, "trace", trace_logger)
|
||||
|
||||
# set loglevel based on selected verbosity and quietmode
|
||||
levels = [logging.INFO, logging.DEBUG, logging.TRACE]
|
||||
|
||||
@@ -353,15 +353,17 @@ class MachineSpecs:
|
||||
gpu_l1: str = field(
|
||||
default=None,
|
||||
metadata={
|
||||
"doc": "The size of the vL1D cache (per compute-unit) on the accelerators/GPUs in the system in KiB",
|
||||
"doc": "The size of the vL1D cache (per compute-unit) on the accelerators/GPUs.",
|
||||
"name": "GPU L1",
|
||||
"unit": "KiB",
|
||||
},
|
||||
)
|
||||
gpu_l2: str = field(
|
||||
default=None,
|
||||
metadata={
|
||||
"doc": "The size of the vL1D cache (per compute-unit) on the accelerators/GPUs in the system in KiB",
|
||||
"doc": "The size of the vL1D cache (per compute-unit) on the accelerators/GPUs.",
|
||||
"name": "GPU L2",
|
||||
"unit": "KiB",
|
||||
},
|
||||
)
|
||||
cu_per_gpu: str = field(
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user