2
0

kfdtest: Add gfx12 to TargetList for AssembleShaders

Add gfx12 so that it gets tested when KFDASMTest.AssembleShaders is run.
GWS support has been removed for gfx12. Modify shaders to take that into
account.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I70e87febb6388852ea54d69cf9201339a7910581
Este cometimento está contido em:
Harish Kasiviswanathan
2025-01-09 11:17:34 -05:00
cometido por Kent Russell
ascendente b1d6cacf79
cometimento f8ae5c47ba
2 ficheiros modificados com 15 adições e 10 eliminações
+1
Ver ficheiro
@@ -55,6 +55,7 @@ static const std::vector<uint32_t> TargetList = {
0x0a0304,
0x0a0305,
0x0a0306,
0x0c0000,
};
TEST_F(KFDASMTest, AssembleShaders) {
+14 -10
Ver ficheiro
@@ -959,15 +959,18 @@ const char *ReadMemoryIsa =
const char *GwsInitIsa =
SHADER_START
R"(
s_mov_b32 m0, 0
s_nop 0
s_load_dword s16, s[0:1], 0x0 glc
s_waitcnt 0
v_mov_b32 v0, s16
s_waitcnt 0
ds_gws_init v0 offset:0 gds
s_waitcnt 0
s_endpgm
.if (.amdgcn.gfx_generation_number >= 12)
.else
s_mov_b32 m0, 0
s_nop 0
s_load_dword s16, s[0:1], 0x0 glc
s_waitcnt 0
v_mov_b32 v0, s16
s_waitcnt 0
ds_gws_init v0 offset:0 gds
s_waitcnt 0
s_endpgm
.endif
)";
/* Atomically increase a value in memory
@@ -980,7 +983,8 @@ const char *GwsAtomicIncreaseIsa =
SHADER_START
R"(
// Assume src address in s0, s1
.if (.amdgcn.gfx_generation_number >= 10)
.if (.amdgcn.gfx_generation_number >= 12)
.elseif (.amdgcn.gfx_generation_number >= 10)
s_mov_b32 m0, 0
s_mov_b32 exec_lo, 0x1
v_mov_b32 v0, s0