Avoid crash when profiling data not generated (#694)
* Avoid crash when profiling data not generated -Handle case where program has no kernel launches -Improve error messages -Avoid roofline when profiling data is missing Signed-off-by: benrichard-amd <ben.richard@amd.com> * Update other soc_gfx files to catch missing pmc_perf.csv * Fix formatting * Fix incorrectly ordered imports --------- Signed-off-by: benrichard-amd <ben.richard@amd.com>
Este commit está contenido en:
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
import config
|
||||
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
||||
from roofline import Roofline
|
||||
from utils.logger import console_log, demarcate
|
||||
from utils.logger import console_log, console_warning, demarcate
|
||||
from utils.utils import mibench
|
||||
|
||||
|
||||
@@ -85,6 +85,12 @@ class gfx90a_soc(OmniSoC_Base):
|
||||
super().post_profiling()
|
||||
|
||||
if not self.get_args().no_roof:
|
||||
pmc_path = str(Path(self.get_args().path).joinpath("pmc_perf.csv"))
|
||||
if not Path(pmc_path).is_file():
|
||||
console_warning(
|
||||
"Incomplete or missing profiling data. Skipping roofline."
|
||||
)
|
||||
return
|
||||
console_log(
|
||||
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
import config
|
||||
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
||||
from roofline import Roofline
|
||||
from utils.logger import console_error, console_log, demarcate
|
||||
from utils.logger import console_error, console_log, console_warning, demarcate
|
||||
from utils.utils import mibench
|
||||
|
||||
|
||||
@@ -85,6 +85,12 @@ class gfx940_soc(OmniSoC_Base):
|
||||
super().post_profiling()
|
||||
|
||||
if not self.get_args().no_roof:
|
||||
pmc_path = str(Path(self.get_args().path).joinpath("pmc_perf.csv"))
|
||||
if not Path(pmc_path).is_file():
|
||||
console_warning(
|
||||
"Incomplete or missing profiling data. Skipping roofline."
|
||||
)
|
||||
return
|
||||
console_log(
|
||||
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
import config
|
||||
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
||||
from roofline import Roofline
|
||||
from utils.logger import console_error, console_log, demarcate
|
||||
from utils.logger import console_error, console_log, console_warning, demarcate
|
||||
from utils.utils import mibench
|
||||
|
||||
|
||||
@@ -85,6 +85,12 @@ class gfx941_soc(OmniSoC_Base):
|
||||
super().post_profiling()
|
||||
|
||||
if not self.get_args().no_roof:
|
||||
pmc_path = str(Path(self.get_args().path).joinpath("pmc_perf.csv"))
|
||||
if not Path(pmc_path).is_file():
|
||||
console_warning(
|
||||
"Incomplete or missing profiling data. Skipping roofline."
|
||||
)
|
||||
return
|
||||
console_log(
|
||||
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
import config
|
||||
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
||||
from roofline import Roofline
|
||||
from utils.logger import console_error, console_log, demarcate
|
||||
from utils.logger import console_error, console_log, console_warning, demarcate
|
||||
from utils.utils import mibench
|
||||
|
||||
|
||||
@@ -85,6 +85,13 @@ class gfx942_soc(OmniSoC_Base):
|
||||
super().post_profiling()
|
||||
|
||||
if not self.get_args().no_roof:
|
||||
pmc_path = str(Path(self.get_args().path).joinpath("pmc_perf.csv"))
|
||||
if not Path(pmc_path).is_file():
|
||||
console_warning(
|
||||
"Incomplete or missing profiling data. Skipping roofline."
|
||||
)
|
||||
return
|
||||
|
||||
console_log(
|
||||
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ import config
|
||||
from rocprof_compute_soc.soc_base import OmniSoC_Base
|
||||
from roofline import Roofline
|
||||
from utils.logger import demarcate
|
||||
from utils.utils import console_error, console_log, mibench
|
||||
from utils.utils import console_error, console_log, console_warning, mibench
|
||||
|
||||
|
||||
class gfx950_soc(OmniSoC_Base):
|
||||
@@ -86,6 +86,12 @@ class gfx950_soc(OmniSoC_Base):
|
||||
super().post_profiling()
|
||||
|
||||
if not self.get_args().no_roof:
|
||||
pmc_path = str(Path(self.get_args().path).joinpath("pmc_perf.csv"))
|
||||
if not Path(pmc_path).is_file():
|
||||
console_warning(
|
||||
"Incomplete or missing profiling data. Skipping roofline."
|
||||
)
|
||||
return
|
||||
console_log(
|
||||
"roofline", "Checking for roofline.csv in " + str(self.get_args().path)
|
||||
)
|
||||
|
||||
Referencia en una nueva incidencia
Block a user