-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] Set inst_pref_size to maximum
On gfx11 and gfx12 set initial instruction prefetch size to a minimum of kernel size and maximum allowed value. Fixes: SWDEV-513122
- Loading branch information
Showing
4 changed files
with
67 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 --amdgpu-memcpy-loop-unroll=100000 < %s | FileCheck --check-prefixes=GCN,GFX11 %s | ||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 --amdgpu-memcpy-loop-unroll=100000 < %s | FileCheck --check-prefixes=GCN,GFX12 %s | ||
|
||
; GCN-LABEL: .amdhsa_kernel large | ||
; GFX11: .amdhsa_inst_pref_size 3 | ||
; GFX11: codeLenInByte = 3{{[0-9][0-9]$}} | ||
; GFX12: .amdhsa_inst_pref_size 4 | ||
; GFX12: codeLenInByte = 4{{[0-9][0-9]$}} | ||
define amdgpu_kernel void @large(ptr addrspace(1) %out, ptr addrspace(1) %in) { | ||
bb: | ||
call void @llvm.memcpy.p1.p3.i32(ptr addrspace(1) %out, ptr addrspace(1) %in, i32 256, i1 false) | ||
ret void | ||
} | ||
|
||
; GCN-LABEL: .amdhsa_kernel small | ||
; GCN: .amdhsa_inst_pref_size 1 | ||
; GCN: codeLenInByte = {{[0-9]$}} | ||
define amdgpu_kernel void @small() { | ||
bb: | ||
ret void | ||
} |