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>
This commit is contained in:
Cole Ramos
2024-03-06 17:01:07 -06:00
committed by GitHub
orang tua 525eb3f527
melakukan f4511e7280
3 mengubah file dengan 11 tambahan dan 6 penghapusan
+8 -2
Melihat File
@@ -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
+1 -2
Melihat File
@@ -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
+2 -2
Melihat File
@@ -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()