Force encoding before Omniperf execution (#299)

* Force encoding before Omniperf execution

Signed-off-by: colramos-amd <colramos@amd.com>

* Fix circular dependency in utils module

Signed-off-by: colramos-amd <colramos@amd.com>

---------

Signed-off-by: colramos-amd <colramos@amd.com>

[ROCm/rocprofiler-compute commit: f4511e7280]
This commit is contained in:
Cole Ramos
2024-03-06 17:01:07 -06:00
کامیت شده توسط GitHub
والد 0ddd23b55f
کامیت 4585750893
3فایلهای تغییر یافته به همراه11 افزوده شده و 6 حذف شده
@@ -25,13 +25,19 @@
##############################################################################el
import sys
import locale
import logging
from utils.utils import error
from omniperf_base import Omniperf
def main():
try:
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
except locale.Error as e:
logging.warning("Please ensure that the 'en_US.UTF-8' locale is available on your system.")
error(f"Error setting locale: {e}")
omniperf = Omniperf()
omniperf.parse_args() #TODO: We already do this in the __init__ for Omniperf(). Change that?
mode = omniperf.get_mode()
# major omniperf execution modes
@@ -36,9 +36,8 @@ import pandas as pd
from datetime import datetime
from math import ceil
from dataclasses import dataclass, field, asdict, fields
from dataclasses import dataclass, field, fields
from pathlib import Path as path
from textwrap import dedent
from utils.utils import error, get_hbm_stack_num, get_version
from utils.tty import get_table_string
@@ -32,8 +32,6 @@ import subprocess
import shutil
import pandas as pd
import glob
from utils import specs
from datetime import datetime
from pathlib import Path as path
import config
@@ -324,6 +322,8 @@ def gen_sysinfo(
def detect_roofline(mspec):
from utils import specs
rocm_ver = mspec.rocm_version[:1]
os_release = path("/etc/os-release").read_text()