3 ms·
The link to SIMD.AI is interesting. I didn't have a perfect experience trying to get Claude to convert a scalar code to AVX512. Claude seems to enjoy storing 1
by fancyfredbot 1y ago
The link to SIMD.AI is interesting. I didn't have a perfect experience trying to get Claude to convert a scalar code to AVX512.
Claude seems to enjoy storing 16 bit masks in 512 bit vectors but the compiler will find that easily.
The biggest issue I encountered was that when converting nested if statements into mask operations, it would frequently forget to and the inner and outer mask together.
- vectorcamp 1y agoGetting an LLM to translate code is very tricky, we haven't included AVX2 and AVX512 yet in our SIMD.ai because it requires a lot more work. However, translating code between similarly sized vector engines is doable when we finetuned our own data to the LLM. We tested both ChatGPT and Claude -and more- but none could do even the simplest translations between eg SSE4.2 and Neon or VSX. So trying something harder like AVX512 felt like a bit of a stretch. But we're working on it.
- fancyfredbot 1y agoIt used to be the case that if you wanted to write code once and run it on multiple platforms you'd use a library, and if you wanted to avoid writing code which was ISA specific you used a compiler. Now we use an LLM. This is progress. Probably. It's definitely different anyway.
- vectorcamp 1y agoYou still have to use the library, and it will still work the same way for normal scalar C code. The whole point is that the vectorization is difficult to write and an LLM just might be able to help with some cases, not all.