-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][Matrix] Fix __spirv_JointMatrixINTEL signature #6957
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
[SYCL][Matrix] Fix __spirv_JointMatrixINTEL signature #6957
Conversation
b68041e
to
63f6307
Compare
@@ -22,11 +22,20 @@ | |||
#endif | |||
|
|||
#ifdef __SYCL_DEVICE_ONLY__ | |||
|
|||
#if SYCL_EXT_ONEAPI_MATRIX == 1 |
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.
Could you please clarify where this macro is defined? I've got an impression that the macro should be defined to some specific value in our headers.
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.
The macro is defined here: https://github.com/intel/llvm/blob/sycl/sycl/include/sycl/feature_test.hpp.in
Default SYCL_EXT_ONEAPI_MATRIX to 1 Only add 'Use' parameter if testing macro __SYCL_EXT_ONEAPI_MATRIX_USE__ is defined. Signed-off-by: Sidorov, Dmitry <[email protected]>
63f6307
to
17b81ff
Compare
#if (SYCL_EXT_ONEAPI_MATRIX == 1) | ||
#include <sycl/ext/oneapi/matrix/matrix-jit.hpp> | ||
#include <sycl/ext/oneapi/matrix/static-query.hpp> | ||
#if (SYCL_EXT_ONEAPI_MATRIX == 3) |
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.
@JackAKirk it doesn't look like a correct usage of SYCL_EXT_ONEAPI_MATRIX
(users shouldn't pass such macro during compilation, see #6662 (comment) ). What would be an appropriate replacement for it?
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.
There isn't an intention of using any macro in the future in order to decide the APIs to use. Initially for the initial Tensor Cores experimental implementation we followed the existing pattern used by the AOT and JIT intel implementations by setting a new value to the feature test macro. The SYCL spec itself doesn't appear to forbid this, although it sounds like the extension document itself contradicts the implementation in this regard!
We plan to add a separate macro analogous to SYCL_EXT_ONEAPI_MATRIX_LEGACY_API. We could name it SYCL_EXT_ONEAPI_MATRIX_LEGACY_CUDA_API for example.
Since the interfaces for the combined Intel/CUDA implementation has been decided I could also open a PR that supports both Intel and CUDA backends within the same implementation. #5920 is blocked on a spirv builtin atm, so it sounds like we shouldn't wait on this PR before starting the combined implementation. We could add the macro for the legacy version at the same time.
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.
I just talked with @dkhaldi, and it sounds like she prefers to have a different name for the macro that chooses the API.
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
/verify |
Signed-off-by: Sidorov, Dmitry <[email protected]>
Signed-off-by: Sidorov, Dmitry <[email protected]>
/verify with intel/llvm-test-suite#1311 |
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
Signed-off-by: Sidorov, Dmitry <[email protected]>
/verify with intel/llvm-test-suite#1311 |
It does look like verify with doesn't attach tests from llvm-test-suite, so will try to do testing from an opposite direction. |
@romanovvlad could you please take one more look? I can't tell for sure, why 'verify with' is failing for CUDA in this PR. At the same time in intel/llvm-test-suite#1311 CUDA tests are passing with this PR attached. |
@intel/llvm-gatekeepers could you please take a look and merge? |
CUDA doesn't run in "verify with" mode. Have you checked tests modifications locally on CUDA? |
No, I didn't . I've just tried and in both cases with and without the patch the tests are failing to compile. Trying to figure out, what else is missing. I would assume that the fact of successful compilation of the tests is good enough since CUDA is only affected by modification of a macro. |
Signed-off-by: Sidorov, Dmitry <[email protected]>
Made an NFC update for exceptions' messages. |
With a help from Steffen was able to compile not only the device code, but all the test. All went fine. Execution though actually requires something like A1000 to run AMX code. |
…SION (#1311) [SYCL][Matrix] Replace SYCL_EXT_ONEAPI_MATRIX with SYCL_EXT_ONEAPI_MATRIX_VERSION Related to intel/llvm#6957 Signed-off-by: Sidorov, Dmitry <[email protected]>
…SION (intel#1311) [SYCL][Matrix] Replace SYCL_EXT_ONEAPI_MATRIX with SYCL_EXT_ONEAPI_MATRIX_VERSION Related to intel#6957 Signed-off-by: Sidorov, Dmitry <[email protected]>
…SION (intel/llvm-test-suite#1311) [SYCL][Matrix] Replace SYCL_EXT_ONEAPI_MATRIX with SYCL_EXT_ONEAPI_MATRIX_VERSION Related to intel#6957 Signed-off-by: Sidorov, Dmitry <[email protected]>
Default SYCL_EXT_ONEAPI_MATRIX to 1
Added SYCL_EXT_ONEAPI_MATRIX_VERSION to differentiate API versions.
Only add 'Use' parameter if testing macro SYCL_EXT_ONEAPI_MATRIX_VERSION = 2
is defined.
Signed-off-by: Sidorov, Dmitry [email protected]