Skip to content

Commit

Permalink
Improved SoC detection for gfx940
Browse files Browse the repository at this point in the history
Signed-off-by: coleramos425 <colramos@amd.com>
  • Loading branch information
coleramos425 committed Jul 6, 2023
1 parent a38e11e commit ea486e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/omniperf
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def gen_sysinfo(workload_name, workload_dir, ip_blocks, app_cmd, skip_roof):
param += ["32", "32", "mi200", "56", str(hbmBW)]
if not skip_roof:
blocks.append("roofline")
elif mspec.GPU == "gfx940":
param += ["16", "32", "mi300", "56", str(hbmBW)]

# ip block info
if ip_blocks == None:
Expand Down
4 changes: 2 additions & 2 deletions src/soc_params/mi300.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name,numSE,numCU,numSIMD,numWavesPerCU,numSQC,L2Banks,Freq,mclk
mi300,8,38,4,32,56,32,1950,1300
name,numSE,numCU,numSIMD,numWavesPerCU,numSQC,L2Banks,LDSBanks,Freq,mclk
mi300,8,38,4,32,56,16,32,1950,1300
6 changes: 5 additions & 1 deletion src/utils/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ def gpuinfo():
rocminfo = run(["rocminfo"]).split("\n")

for idx1, linetext in enumerate(rocminfo):
gpu_id = search(r"^\s*Name\s*:\s+ ([a-zA-Z0-9]+)\s*$", linetext)
gpu_id = search(r"^\s*Name\s*:\s+ ([a-zA-Z0-9:+]+)\s*$", linetext)
if gpu_id in gpu_list:
break
print(str(gpu_id)[:6])
if str(gpu_id)[:6] in gpu_list:
gpu_id = str(gpu_id)[:6]
break

if not gpu_id in gpu_list:
return None, None, None, None, None, None, None, None, None, None
Expand Down

0 comments on commit ea486e1

Please sign in to comment.