-
Notifications
You must be signed in to change notification settings - Fork 790
[Matrix] Enable joint_matrix_fill for joint_matrix feature #4994
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
Conversation
|
||
// AMX: 8 register tiles : 1k byte size, SMmaxxSKmax =16x64 | ||
// strideX = X's cols, so strideC = N, strideA = K, strideB = N*4 | ||
joint_matrix_fill(sg, sub_c, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a new test, I would suggest changing the existing one to use fill instead of load for C.
// AMX: 8 register tiles : 1k byte size, SMmaxxSKmax =16x64 | ||
// strideX = X's cols, so strideC = N, strideA = K, strideB = N*4 | ||
joint_matrix_fill(sg, sub_c, 0); | ||
joint_matrix_load(sg, sub_c, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load for C is redundant here
__spv::MatrixLayout L = __spv::MatrixLayout::RowMajor, | ||
__spv::Scope::Flag S = __spv::Scope::Flag::Subgroup> | ||
extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL<T, R, C, L, S> * | ||
__spirv_JointMatrixFillINTEL(const T &v, __spv::Scope::Flag Sc = S); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__spirv_JointMatrixFillINTEL(const T &v, __spv::Scope::Flag Sc = S); | |
__spirv_CompositeConstruct(const T &v); |
Note, there is not Scope flag for the instruction, but it should be OK, since it presence in the result type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__spirv_JointMatrixFillINTEL(const T &v, __spv::Scope::Flag Sc = S); | |
__spirv_JointMatrixFillINTEL(const T v, __spv::Scope::Flag Sc = S); |
Like const T& the compiler will emit a temporary reference of value T, while we want to pass a constant expression to the instructions below and not load from this temporary reference.
339a0eb
to
d1fc3c6
Compare
d1fc3c6
to
978ec48
Compare
Ping? |
joint_matrix_fill(Group sg, | ||
joint_matrix<T, NumRows, NumCols, Layout, Group> &res, | ||
const T v) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
joint_matrix_fill(Group sg, | |
joint_matrix<T, NumRows, NumCols, Layout, Group> &res, | |
const T v) { | |
joint_matrix_fill(joint_matrix<T, NumRows, NumCols, Layout, Group> &res, | |
const T v) { |
sg
was unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not using scope on the SPIRV instruction as we are using the existing spirv_CompositeConstruct instruction. This argument will remain unused.
But we still need it on the DPC++ function to match the other DPC++ functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case please cast it to void, otherwise the compiler will emit a diagnostic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than unused scope the patch is LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ping again. |
joint_matrix_fill(Group sg, | ||
joint_matrix<T, NumRows, NumCols, Layout, Group> &res, | ||
const T v) { | ||
(void)sg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be worth to put a comment here, why we kept (sg) parameter (to be aligned with other AMX API?, to may be replace __spirv_CompositeConstruct with some other instruction in case if we are not satisficed without breaking API/ABI with returning 'sg' back?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ping? @intel/llvm-reviewers-runtime |
@bader is the fail in pre-checkin is known issue? |
I haven't seen |
e07b931
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@intel/llvm-reviewers-runtime ping? |
@bader ping? |
Waiting on code owner review from intel/llvm-reviewers-runtime.
The test was re-enabled by intel/llvm-test-suite#659 |
@intel/llvm-reviewers-runtime ping? |
@vladimirlaz ping? |
The failed test in SYCL / Default Linux / HIP AMD GPU Test Suite can also be observed in other PRs such as #5218 |
@bader ping |
@AGindinson is working on free_function_* failure @psamolysov-intel is working on AtomicRef failures. The ticket is ready for merge |
@vladimirlaz, please, approve and merge. |
No description provided.