Live data from Hacker News

AI PCs Aren't Good at AI: The CPU Beats the NPU

github.com

301–303 of 303 posts

Re: AI PCs Aren't Good at AI: The CPU Beats the NPU

#301

Earlier quoted context omitted.

Why would the two not be entirely comparable? PyTorch may be slower at building the models; but once the model is compiled and loaded on the NPU, there's just not a whole lot of Python involved anymore. A few hundred CPU cycles to push the input data using python; a few hundred CPU cycles to receive the results using python. And everything in-between gets executed on the NPU.

I really wish Python wasn't the language controlling all the C code. You need a controller, in a scripting language that's easy to modify, but it's a rather hideous choice. It would be like choosing to build the world's largest social network in PHP or something. lol.

Be careful for what you wish for.

I've just spent a week writing Neural net code in C++, so i have direct insight into what a C++ implementation might look like.

Much as I dislike python, and having to deal with endless runtime errors when your various inputs and outputs are mismatched, the inconvenience pales in comparison with having to wade through three pages of error messages that a C++ compiler generates when you have a single mismatched templated Eigen matrix with the incorrect dimension. The "Required from here" message you are actually interested in is typically the 3rd or fourth "Required from here", amongst a massive stack of cascading errors, each of which wraps to about 4 lines when displayed. You know what I mean. Sometimes you don't get a "Required from here" at all, which is horrifying. And it's infuriating to find and parse the template arguments of classes involved.

Debugging Python runtime errors is kind of horrible, and rubs me the wrong way on principle. But it is sweetness and light compared to debugging C++ compile-time error messages, which are unimaginably horrible.

The project: converting a C++ Neural Amp Modeller LV2 plugin to use fixed-size matrices (Eigen::Matrix) instead of dynamic matrixes (Eigen::MatrixXf) to see if doing so would improve performance. (It does. Signficantly). So a substantial and realistic experiment in doing ML work in C++. Not directly comparable to working in Pytorch, but directly analogous in that it involves hooking up high-level ML constructs, like Conv1D, LayerT, WaveNet ML chunks.

Re: AI PCs Aren't Good at AI: The CPU Beats the NPU

#302

Earlier quoted context omitted.

isn't that the case? Which then became a dialect of php with a custom interpreter (and then compiler) as they scaled.

Yes, that was the case. I was being sarcastic. Zuck wrote facebook in PHP and spent millions of dollars then writing a custom interpreter to let his janky code run slightly faster than normal.

Zuck's obvious mistake: he should have written the PHP compiler to precompile chunks of GPU code that would be the only code that actually runs when serving web pages.

Facebook isn't really a comparable problems, because ALL of the performance-critical code in PyTorch does runs on a GPU.

Re: AI PCs Aren't Good at AI: The CPU Beats the NPU

#303
post #294

Earlier quoted context omitted.

Apple hasn’t shipped any ai features besides betas. I trust the people responsible for the useless abomination that is Siri to deliver a useful ai tool as much as I would trust Joe Biden to win a breakdancing competition.

Well fortunately for all of us the people delivering client side ML today are totally different from the people who implemented a server side rule base assistant 10 years ago.

The fact that they couldn’t deliver something even approaching kindergarten levels of understanding a year ago makes me worry that either zero of the people who know what they’re doing in present-day “AI” work at Apple, or, plenty of great minds do but they can’t get anything done because Apple’s management is too conservative to release something that would be vastly more powerful than Siri but might possibly under certain circumstances hurt someone’s feelings or otherwise embarrass Apple.

Nothing would make me happier than to finally be wrong betting against “Siri,” though.

Post reply on HN