Skip to content

[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

Merged
merged 5 commits into from
Dec 24, 2021

Conversation

yubingex007-a11y
Copy link
Contributor

No description provided.


// 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);
Copy link
Contributor

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,
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__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.

@yubingex007-a11y
Copy link
Contributor Author

Ping?

Comment on lines +198 to +200
joint_matrix_fill(Group sg,
joint_matrix<T, NumRows, NumCols, Layout, Group> &res,
const T v) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

@MrSidims MrSidims left a 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.

dkhaldi
dkhaldi previously approved these changes Dec 14, 2021
Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

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

LGTM

@yubingex007-a11y
Copy link
Contributor Author

ping again.

MrSidims
MrSidims previously approved these changes Dec 15, 2021
joint_matrix_fill(Group sg,
joint_matrix<T, NumRows, NumCols, Layout, Group> &res,
const T v) {
(void)sg;
Copy link
Contributor

@MrSidims MrSidims Dec 15, 2021

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?)

dkhaldi
dkhaldi previously approved these changes Dec 21, 2021
Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

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

LGTM

@yubingex007-a11y
Copy link
Contributor Author

ping? @intel/llvm-reviewers-runtime

vladimirlaz
vladimirlaz previously approved these changes Dec 21, 2021
@yubingex007-a11y
Copy link
Contributor Author

@bader is the fail in pre-checkin is known issue?

@bader
Copy link
Contributor

bader commented Dec 22, 2021

@bader is the fail in pre-checkin is known issue?

I haven't seen DiscardEvents/invalid_event.cpp failures before, but it's better to ask test owners.

@yubingex007-a11y yubingex007-a11y dismissed stale reviews from vladimirlaz and dkhaldi via e07b931 December 22, 2021 15:03
@yubingex007-a11y yubingex007-a11y requested review from dkhaldi, MrSidims and vladimirlaz and removed request for MrSidims December 22, 2021 15:04
Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

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

LGTM

@yubingex007-a11y
Copy link
Contributor Author

@intel/llvm-reviewers-runtime ping?
The basic_event_collection.cpp is expected I think. I saw intel/llvm-test-suite#658 disable this case.

@yubingex007-a11y
Copy link
Contributor Author

yubingex007-a11y commented Dec 23, 2021

@bader ping?
The basic_event_collection.cpp is expected I think. I saw intel/llvm-test-suite#658 disable this case.

@bader
Copy link
Contributor

bader commented Dec 23, 2021

@bader ping?

Waiting on code owner review from intel/llvm-reviewers-runtime.

The basic_event_collection.cpp is expected I think. I saw intel/llvm-test-suite#658 disable this case.

The test was re-enabled by intel/llvm-test-suite#659

@yubingex007-a11y
Copy link
Contributor Author

@intel/llvm-reviewers-runtime ping?

@yubingex007-a11y
Copy link
Contributor Author

@vladimirlaz ping?

@yubingex007-a11y
Copy link
Contributor Author

yubingex007-a11y commented Dec 24, 2021

The failed test in SYCL / Default Linux / HIP AMD GPU Test Suite can also be observed in other PRs such as #5218

@yubingex007-a11y
Copy link
Contributor Author

@bader ping

@vladimirlaz
Copy link
Contributor

@AGindinson is working on free_function_* failure @psamolysov-intel is working on AtomicRef failures. The ticket is ready for merge

@bader
Copy link
Contributor

bader commented Dec 24, 2021

The ticket is ready for merge

@vladimirlaz, please, approve and merge.

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.

5 participants