Fixes for roofline datatype plot outputs (#659)
Profile mode: Fix roofline plots for datatypes that have peakVALU only. Check for highest roofline to plot the bandwidth lines to proper height, don't rely on existence of peakMFMA for every datatype. Analyze mode: Add roofline-data-type option for viewing pdfs in standalone gui. Default is same as profile mode, FP32. --------- Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
This commit is contained in:
+14
-1
@@ -386,7 +386,7 @@ Examples:
|
||||
nargs="+",
|
||||
type=str,
|
||||
default=["FP32"],
|
||||
help="\t\t\tChoose datatypes to generate plotted roofline PDFs for: (DEFAULT: FP32)\n\t\t\t FP8\n\t\t\t FP16\n\t\t\t BF16\n\t\t\t FP32\n\t\t\t FP64\n\t\t\t I8",
|
||||
help="\t\t\tChoose datatypes to view roofline PDFs for: (DEFAULT: FP32)\n\t\t\t FP8\n\t\t\t FP16\n\t\t\t BF16\n\t\t\t FP32\n\t\t\t FP64\n\t\t\t I8\n\t\t\t I32\n\t\t\t I64\n\t\t\t ",
|
||||
)
|
||||
|
||||
# roofline_group.add_argument('-w', '--workgroups', required=False, default=-1, type=int, help="\t\t\tNumber of kernel workgroups (DEFAULT: 1024)")
|
||||
@@ -591,6 +591,19 @@ Examples:
|
||||
const=8050,
|
||||
help="\t\tActivate a GUI to interate with rocprofiler-compute metrics.\n\t\tOptionally, specify port to launch application (DEFAULT: 8050)",
|
||||
)
|
||||
|
||||
analyze_group.add_argument(
|
||||
"-R",
|
||||
"--roofline-data-type",
|
||||
required=False,
|
||||
choices=["FP8", "FP16", "BF16", "FP32", "FP64", "I8", "I32", "I64"],
|
||||
metavar="",
|
||||
nargs="+",
|
||||
type=str,
|
||||
default=["FP32"],
|
||||
help="\t\t\tChoose datatypes to view roofline PDFs for: (DEFAULT: FP32)\n\t\t\t FP8\n\t\t\t FP16\n\t\t\t BF16\n\t\t\t FP32\n\t\t\t FP64\n\t\t\t I8\n\t\t\t I32\n\t\t\t I64\n\t\t\t ",
|
||||
)
|
||||
|
||||
analyze_advanced_group.add_argument(
|
||||
"--random-port",
|
||||
action="store_true",
|
||||
|
||||
@@ -61,6 +61,9 @@ class webui_analysis(OmniAnalyze_Base):
|
||||
# define any elements which will have full width
|
||||
self.__full_width_elements = {1801}
|
||||
|
||||
if hasattr(args, "roofline_data_type") and args.roofline_data_type != ["FP32"]:
|
||||
self.__roofline_data_type = args.roofline_data_type
|
||||
|
||||
@demarcate
|
||||
def build_layout(self, input_filters, arch_configs):
|
||||
"""
|
||||
@@ -186,6 +189,7 @@ class webui_analysis(OmniAnalyze_Base):
|
||||
"mem_level": "ALL",
|
||||
"include_kernel_names": False,
|
||||
"is_standalone": False,
|
||||
"roofline_data_type": self.__roofline_data_type,
|
||||
}
|
||||
)
|
||||
roof_obj = self.get_socs()[self.arch].roofline_obj
|
||||
|
||||
+1
-1
@@ -302,7 +302,7 @@ class Roofline:
|
||||
None
|
||||
if self.__run_parameters["is_standalone"]
|
||||
else "{} G{}/s".format(
|
||||
to_int(self.__ceiling_data["valu"][2], ops_flops)
|
||||
to_int(self.__ceiling_data["valu"][2]), ops_flops
|
||||
)
|
||||
),
|
||||
"{} G{}/s".format(
|
||||
|
||||
@@ -153,13 +153,21 @@ def calc_ceilings(roofline_parameters, dtype, benchmark_data):
|
||||
x2_mfma = peakMFMA / peakBw
|
||||
y2_mfma = peakMFMA
|
||||
|
||||
# Check which peak is higher for formatting bandwidth lines
|
||||
if y2_mfma > y1_mfma: # peakMFMA
|
||||
peakX = x2_mfma
|
||||
peakY = y2_mfma
|
||||
else: # peakVALU
|
||||
peakX = x1_mfma
|
||||
peakY = y1_mfma
|
||||
|
||||
# These are the points to use:
|
||||
console_debug("roofline", "coordinate points:")
|
||||
console_debug("x = [{}, {}]".format(x1, x2_mfma))
|
||||
console_debug("y = [{}, {}]".format(y1, y2_mfma))
|
||||
console_debug("x = [{}, {}]".format(x1, peakX))
|
||||
console_debug("y = [{}, {}]".format(y1, peakY))
|
||||
|
||||
graphPoints[cacheHierarchy[i].lower()].append([x1, x2_mfma])
|
||||
graphPoints[cacheHierarchy[i].lower()].append([y1, y2_mfma])
|
||||
graphPoints[cacheHierarchy[i].lower()].append([x1, peakX])
|
||||
graphPoints[cacheHierarchy[i].lower()].append([y1, peakY])
|
||||
graphPoints[cacheHierarchy[i].lower()].append(peakBw)
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
@@ -177,7 +185,7 @@ def calc_ceilings(roofline_parameters, dtype, benchmark_data):
|
||||
graphPoints["valu"].append(peakOps)
|
||||
|
||||
# Plot MFMA roof
|
||||
if x1_mfma != -1 and (dtype in MFMA_DATATYPES): # assert that mfma has been assigned
|
||||
if dtype in MFMA_DATATYPES: # assert that mfma has been assigned
|
||||
x0_mfma = XMAX
|
||||
if x2_mfma < x0_mfma:
|
||||
x0_mfma = x2_mfma
|
||||
|
||||
Reference in New Issue
Block a user