Skip to content
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

support joint matrix prefetch #2212

Merged

Conversation

VyacheslavLevytskyy
Copy link
Contributor

@VyacheslavLevytskyy VyacheslavLevytskyy commented Nov 13, 2023

This PR aims to introduce CooperativeMatrixPrefetchINTEL capability and operation, and make initial introduction of entities in llvm-spirv translator.

@MrSidims MrSidims marked this pull request as ready for review November 13, 2023 21:35
@MrSidims MrSidims marked this pull request as draft November 13, 2023 21:35
@MrSidims
Copy link
Contributor

Failed Tests (1):
LLVM_SPIRV :: lshr-constexpr.ll

not related to the patch

@MrSidims MrSidims marked this pull request as ready for review November 14, 2023 16:01
@@ -0,0 +1,171 @@
; This is an adapted copy of test/extensions/KHR/SPV_KHR_cooperative_matrix/cooperative_matrix.ll
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets name the test appropriately, like cooperative_matrix_prefetch.ll


; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i32, 3, 12, 12, 3) @_Z26__spirv_CompositeConstructi(i32 0)
; CHECK-LLVM: call spir_func void @_Z38__spirv_CooperativeMatrixPrefetchINTELPU3AS4ciiiiil(ptr addrspace(4) %call.ascast.i66.i, i32 0, i32 0, i32 1, i32 1, i32 0, i64 %_arg_K)
; CHECK-LLVM: call spir_func target("spirv.CooperativeMatrixKHR", i8, 0, 12, 48, 3) @_Z86__spirv_CooperativeMatrixLoadKHR_RPU3AS144__spirv_CooperativeMatrixKHR__char_0_12_48_3PU3AS4clii
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And check for %[[MatrixPtr]] parameter here

virtual SPIRVValue *getOperand(unsigned I) {
return getOpValue(I);
}
virtual SPIRVValue *getOperand(unsigned I) { return getOpValue(I); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better not to add non-related changes to the patch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, this and following are clang-formats artifacts, I'll revert to the previous state

@@ -400,12 +398,12 @@ class SPIRVMemoryAccess {
}
if (MemoryAccess[0] & MemoryAccessAliasScopeINTELMaskMask) {
assert(MemoryAccess.size() > MemAccessNumParam &&
"Aliasing operand is missing");
"Aliasing operand is missing");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

ILTPrev = LinkageTypeMax - 2,
ILTInternal
};
enum InternalLinkageType { ILTPrev = LinkageTypeMax - 2, ILTInternal };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this suggesting comes from clang-format, probably enums should be better to be split into multiple lines. I'll add ignore format to this file I guess

@VyacheslavLevytskyy
Copy link
Contributor Author

@MrSidims thanks for suggestions; can you please check them applied

@MrSidims
Copy link
Contributor

clang-format is unrelated (and seems like something is no longer working, as it no longer is printing the patch file that should be applied, will take a look tomorrow).

@MrSidims MrSidims merged commit 3cfffb2 into KhronosGroup:main Nov 16, 2023
8 of 9 checks passed
MrSidims pushed a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Feb 13, 2024
This PR aims to introduce CooperativeMatrixPrefetchINTEL capability and operation, and make initial introduction of entities in llvm-spirv translator.
mateuszchudyk pushed a commit to mateuszchudyk/SPIRV-LLVM-Translator that referenced this pull request Mar 26, 2024
This PR aims to introduce CooperativeMatrixPrefetchINTEL capability and operation, and make initial introduction of entities in llvm-spirv translator.
MrSidims pushed a commit that referenced this pull request Apr 2, 2024
This PR aims to introduce CooperativeMatrixPrefetchINTEL capability and operation, and make initial introduction of entities in llvm-spirv translator.

Co-authored-by: Vyacheslav Levytskyy <89994100+VyacheslavLevytskyy@users.noreply.github.com>
YuriPlyakhin pushed a commit to YuriPlyakhin/SPIRV-LLVM-Translator that referenced this pull request Jul 3, 2024
This PR aims to introduce CooperativeMatrixPrefetchINTEL capability and operation, and make initial introduction of entities in llvm-spirv translator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants