Skip to content

Commit

Permalink
Check for missing mclk, use hard-coded values if needed
Browse files Browse the repository at this point in the history
Signed-off-by: benrichard-amd <[email protected]>
  • Loading branch information
benrichard-amd committed Oct 25, 2024
1 parent 13a06f5 commit 8e64dec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/omniperf_soc/soc_gfx908.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def __init__(self, args, mspec):
self._mspec.lds_banks_per_cu = 32
self._mspec.pipes_per_gpu = 4
# --showmclkrange is broken in Mi100, hardcode freq
self._mspec.max_mclk = 1200
self._mspec.cur_mclk = 1200
if self._mspec.gpu_model == "MI300":
if self._mspec.max_mclk == None or self._mspec.cur_mclk == None:
self._mspec.max_mclk = 1200
self._mspec.cur_mclk = 1200

@demarcate
def get_profiler_options(self):
Expand Down
7 changes: 7 additions & 0 deletions src/omniperf_soc/soc_gfx90a.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ def __init__(self, args, mspec):
)
self.roofline_obj = Roofline(args, self._mspec)

# Workaround for broken --showmclkrange
# MI210/MI250/MI250X have 1600MHz mclk
if self._mspec.gpu_model == "MI200":
if self._mspec.max_mclk == None or self._mspec.cur_mclk == None:
self._mspec.max_mclk = 1600
self._mspec.cur_mclk = 1600

# Set arch specific specs
self._mspec._l2_banks = 32
self._mspec.lds_banks_per_cu = 32
Expand Down
10 changes: 6 additions & 4 deletions src/omniperf_soc/soc_gfx942.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ def __init__(self, args, mspec):
)
# self.roofline_obj = Roofline(args, self._mspec)

# --showmclkrange is broken in MI308X, hardcode freq
if self._mspec.gpu_model == "MI308X":
self._mspec.max_mclk = 1300
self._mspec.cur_mclk = 1300
# Workaround for broken --showmclkrange
# MI300X/MI300A/MI308X have 1300MHz mclk
if self._mspec.gpu_model == "MI300":
if self._mspec.max_mclk == None or self._mspec.cur_mclk == None:
self._mspec.max_mclk = 1300
self._mspec.cur_mclk = 1300

# Set arch specific specs
self._mspec._l2_banks = 16
Expand Down

0 comments on commit 8e64dec

Please sign in to comment.