-
Notifications
You must be signed in to change notification settings - Fork 901
[SM6.10] LinAlg Validation: MatrixLoadFromMemory #8836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Ashley Coleman (V-FEXrt)
merged 1 commit into
main
from
linalg-vali-matrixloadfrommemory
Sep 3, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
111 changes: 111 additions & 0 deletions
111
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixloadfrommemory.ll
This file contains hidden or 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,111 @@ | ||
| ; REQUIRES: dxil-1-10 | ||
| ; RUN: not %dxv %s 2>&1 | FileCheck %s | ||
|
|
||
| target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" | ||
| target triple = "dxil-ms-dx" | ||
|
|
||
| %dx.types.LinAlgMatrixC9M4N4U0S1 = type { i8* } | ||
| %dx.types.LinAlgMatrixC9M4N4U0S0 = type { i8* } | ||
| %dx.types.LinAlgMatrixC6M4N4U0S2 = type { i8* } | ||
| %dx.types.LinAlgMatrixC9M8N8U0S1 = type { i8* } | ||
| %dx.types.LinAlgMatrixC9M9N8U0S1 = type { i8* } | ||
| %dx.types.LinAlgMatrixC9M8N9U0S1 = type { i8* } | ||
|
|
||
| @"\01?SharedArr@@3PAMA" = external addrspace(3) global [64 x float], align 4 | ||
| @"\01?SharedVecArr@@3PAV?$vector@M$03@@A" = external addrspace(3) global [16 x <4 x float>], align 4 | ||
|
|
||
| define void @main() { | ||
| ; okay | ||
| %1 = call %dx.types.LinAlgMatrixC9M4N4U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK: Function: main: error: parameter 'Offset' must be a multiple of 128, got 129 | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32 | ||
| %2 = call %dx.types.LinAlgMatrixC9M4N4U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 129, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: parameter 'Stride' must be a multiple of 16, got 17 | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32 | ||
| %3 = call %dx.types.LinAlgMatrixC9M4N4U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 17, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Return matrix scope 'Thread' does not match expected scope Wave or ThreadGroup. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S0.f32 | ||
| %4 = call %dx.types.LinAlgMatrixC9M4N4U0S0 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S0.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Groupshared memory inner type 'float' must match return matrix type 'I64'. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC6M4N4U0S2.f32 | ||
| %5 = call %dx.types.LinAlgMatrixC6M4N4U0S2 @dx.op.linAlgMatrixLoadFromMemory.mC6M4N4U0S2.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; okay | ||
| %6 = call %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.f32 | ||
| %7 = call %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.f32 | ||
| %8 = call %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.f32(i32 -2147483633, float addrspace(3)* getelementptr inbounds ([64 x float], [64 x float] addrspace(3)* @"\01?SharedArr@@3PAMA", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; okay | ||
| %9 = call %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.v4f32(i32 -2147483633, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.v4f32 | ||
| %10 = call %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.v4f32(i32 -2147483633, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Function: main: error: Groupshared memory holds '64' scalars but must hold at least '72' scalars. | ||
| ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.v4f32 | ||
| %11 = call %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.v4f32(i32 -2147483633, <4 x float> addrspace(3)* getelementptr inbounds ([16 x <4 x float>], [16 x <4 x float>] addrspace(3)* @"\01?SharedVecArr@@3PAV?$vector@M$03@@A", i32 0, i32 0), i32 128, i32 16, i32 0) ; LinAlgMatrixLoadFromMemory(memory,offset,stride,layout) | ||
|
|
||
| ; CHECK-NEXT: Validation failed. | ||
| ret void | ||
| } | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M4N4U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S1.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M4N4U0S0 @dx.op.linAlgMatrixLoadFromMemory.mC9M4N4U0S0.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC6M4N4U0S2 @dx.op.linAlgMatrixLoadFromMemory.mC6M4N4U0S2.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.f32(i32, float addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M8N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N8U0S1.v4f32(i32, <4 x float> addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M9N8U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M9N8U0S1.v4f32(i32, <4 x float> addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| ; Function Attrs: nounwind | ||
| declare %dx.types.LinAlgMatrixC9M8N9U0S1 @dx.op.linAlgMatrixLoadFromMemory.mC9M8N9U0S1.v4f32(i32, <4 x float> addrspace(3)*, i32, i32, i32) #0 | ||
|
|
||
| attributes #0 = { nounwind } | ||
|
|
||
| !dx.targetTypes = !{!0, !1, !2, !3, !4, !5} | ||
| !llvm.ident = !{!6} | ||
| !dx.version = !{!7} | ||
| !dx.valver = !{!7} | ||
| !dx.shaderModel = !{!8} | ||
| !dx.entryPoints = !{!9} | ||
|
|
||
| !0 = !{%dx.types.LinAlgMatrixC9M4N4U0S0 undef, i32 9, i32 4, i32 4, i32 0, i32 0} | ||
| !1 = !{%dx.types.LinAlgMatrixC9M4N4U0S1 undef, i32 9, i32 4, i32 4, i32 0, i32 1} | ||
| !2 = !{%dx.types.LinAlgMatrixC6M4N4U0S2 undef, i32 6, i32 4, i32 4, i32 0, i32 2} | ||
| !3 = !{%dx.types.LinAlgMatrixC9M8N8U0S1 undef, i32 9, i32 8, i32 8, i32 0, i32 1} | ||
| !4 = !{%dx.types.LinAlgMatrixC9M9N8U0S1 undef, i32 9, i32 9, i32 8, i32 0, i32 1} | ||
| !5 = !{%dx.types.LinAlgMatrixC9M8N9U0S1 undef, i32 9, i32 8, i32 9, i32 0, i32 1} | ||
| !6 = !{!"dxc(private) 1.9.0.5467 (linalg-vali-matrixaccumulatetomemory, 37b85f973-dirty)"} | ||
| !7 = !{i32 1, i32 10} | ||
| !8 = !{!"cs", i32 6, i32 10} | ||
| !9 = !{void ()* @main, !"main", null, null, !10} | ||
| !10 = !{i32 0, i64 8388608, i32 4, !11} | ||
| !11 = !{i32 1, i32 1, i32 1} | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.