-
Notifications
You must be signed in to change notification settings - Fork 49
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
Some tests failing in the M3 Max #10
Comments
I had been wondering whether there were any additions/enhancements in M3, and seemingly the answer is yes. I don't have any M3 hardware of my own at the moment, and to do the reverse engineering myself I'd need SSH access to an M3 machine for a few days. |
Thanks for the reply. I can gladly create an account for ssh access on my M3. However it is my personal laptop, so (rarely) it may be offline — however it’s even more rare for me to shut it down completely. So using If you’re up for this, we just need a way to contact each other. I don’t see an email listed either in your repository or in your website. How can I contact you? I’m not familiar with any GitHub features like direct messages. Failing that I could reply here with my email address. |
For |
This is the output of
make test
in an Apple M3 Max:This suggests either Apple broke compatibility with the previous versions, or there are new features using some of the previously-ignored bit in the parameters to these instructions.
I think the former is unlikely, as I have been writing lots of AMX code lately, with excellent test coverage, and I'm yet to see any unexplained failures in my software tests, e.g. something that behaves differently from the M3 than the M1 I also have here (using your documented M1 features, and also some of the documented M2 features, which work as expected on the M3). So hopefully there are new features in the M3.
I investigated this a bit by changing the random values, and I see that for
AMX_LDX
andAMX_LDY
, out of the previously ignored bits (63, 61 and 59), only bit 61 is always set in case of a test error; for 63 and 59, they are sometimes set and sometimes not (indeed, I've seen an error for which bits 63 and 59 were not set, only 61 was).So I wrote a small program to investigate this, and found that bit 61 represents a strided load: when loading pairs, the stride is 4 (that is, if you start at
X0
, it loads toX0
andX4
), whereas when loading 4 at a time, the stride is 2 (e.g.X0
,X2
,X4
,X6
). I will attach a test program and its output on my M3. ForAMX_LDY
, results are identical.As for
AMX_MATINT
, I collected a bunch of values where the tests fail:ANDing these together, the common theme is bits 44, 45, 53 and 54 set. I see that having bits 53 and 54 set means an indexed load in ALU mode 8. For that mode, there are two lane width modes (i.e. bits 45:42): 10 or any other value. However, having bits 44 and 45 set would correspond to 12.
If you'd like to investigate, but don't have access to an M3, I can run any tests you need; just let me know.
ldx_m3_src.txt
ldx_m3_out.txt
The text was updated successfully, but these errors were encountered: