-
Notifications
You must be signed in to change notification settings - Fork 130
[SYCL][Matrix] Add a more general query example #1492
base: intel
Are you sure you want to change the base?
Conversation
…he same joint matrix kernel on different devices using the query interface
This example seems to have a routine that can work with different sub group joint_matrix sizes. Then it is called using the defaults specified for different architectures. My initial question is whether it is a good idea to have a default for a given arch or not. I'm not saying it isn't a good idea. I'm not sure of the answer right now, I'm trying to frame the decision in a simple way. I think it would definitely be a good idea if we can pick a default value that is good (preferably the best choice) for a large proportion of the problems (or at least much larger than the proportion of problems that other) that people are likely to use joint_matrix for. Then it would make sense to me to provide some kind of encouragement/guidance to programmers to use a default value, and I think this would be a nice feature. I think it would be a not so good idea if we can't pick a default value that is very good for a large proportion of problems. |
} | ||
|
||
if (is_this_xmx8_device(q)) { | ||
using myparams2 = tpu_params<tpu::xmx8, int8_t, int8_t, int>; |
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 variables TM
, TN
, and TK
aren't defined here. I assume that is just a typo?
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.
you are right this is a typo. I only run the code on SPR (AMX) and PVC (XMX16).
Since I did not run it on ATS-M (that has XMX8), i did not catch the typo. I will run on ATS-M and fix it.
The default in this case is the maximum supported which is a good choice for many problems. |
👍 That's a very good point: there's a big range of sizes (in terms of total number of matrix elements) in XMX and AMX. Picking a default that is large makes sense to me: but then what about the aspect ratio: should it be the largest possible size irrespective of aspect ratio: e.g. for bfloat16 m16n16k32 for amx and m8n16k16 for xmx or is there a preferable aspect ratio, e.g. square matrix for A,B, and C all the same size: then perhaps m16n16k16 and m8n8k8 would be more preferable? By the way, does AMX not have mixed precision float? Or is it just missing from the table? |
that shows dispatching the same joint matrix kernel on different devices using the query interface