News for hackers. Stuff that matters.
Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by blobbers on Monday March 02, 2026 @04:56PM (#47224728)
Can someone help me understand when these neural engines kick in in open source software?

I typically use python ML libraries like lightgbm, sklearn, xgboost etc.

I also use numpy for large correlation matrices, covariance etc.

Are these operations accelerated? Is there a simple way to benchmark?

I see a lot of benchmarks on what look like C functions, but today in my jobs I rely on higher level libraries. I don't know if they perform any better on apple HW, and unless they have a flag like use_ane I'm inclined to think they do better.

Of course chatgpt suggested I benchmark an Intel Mac vs. newer apple silicon. Thanks chatgpt, there's a reason people still hate AI.

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by zozbot234 on Monday March 02, 2026 @05:11PM (#47224909)
> when these neural engines kick in in open source software?

It mostly doesn't because NPUs are bespoke and vendor-specific (which incents neglect by software devs working on open source numerics and ML/AI infrastructure), and the Apple ANE is no exception. Part of this effort is most likely about fixing that for the specific case of the Apple ANE.

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by blobbers on Monday March 02, 2026 @05:52PM (#47225363)
Part of which effort? The Reverse engineering is so it can be used blog article?

I just think: great it seems like I'm paying for a hardware accelerator that makes Siri go faster. And I use siri on my laptop exactly 0 times in the last infinite years.

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by bri3d on Monday March 02, 2026 @08:26PM (#47226703)
It also makes a lot of really useful features like on device OCR, captions, voice isolation, temporal antialiasing in metalfx, an enormous host of things in the apple pro apps, etc. work
Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by blobbers on Tuesday March 03, 2026 @01:38AM (#47228932)
Yeah, I don't use any of those features. So it sounds like its for folks who are creatives running lightroom or apple movie, or some kind of apple sound program?

I'm a dev, not a creative, unfortunately. I don't use other people's software, I generally write my own (or used to before Claude took over my world).

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by saagarjha on Tuesday March 03, 2026 @03:14AM (#47229634)
You bought a truck. Obviously there will be some part of it you don’t use.
Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by blobbers on Tuesday March 03, 2026 @12:02PM (#47235330)
I think its more like it advertises it can climb hills in crawl mode, but turns out its only specific hills.

So fundamentally, it still comes down to CPUs + RAM.

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by this-is-why on Monday March 02, 2026 @11:52PM (#47228228)
Yes. Numpy will accelerate if it detects hardware that it supports.
Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by blobbers on Tuesday March 03, 2026 @01:40AM (#47228948)
I can't find any docs that numpy will do this.

https://opensource.apple.com/projects/mlx/ is needed to do this?

Re:Inside the M4 Apple Neural Engine, Part 1: Reverse Engine... by this-is-why on Tuesday March 03, 2026 @10:47PM (#47242812)
Normally I’d help a bro out but I started and googled and got hundreds of results and realized why does everyone need to be spoon fed. Please go do some work yourself mkay?