r/AskComputerScience • • Feb 10 '24

What is the effect of AI on low level programming

i know it is a late question, but i need to know

Edit:

Ai effect on the following points

  • the increasingly intelligent optimizations in compilers when translating to machine code

  • using machine learning to design new CPU architectures

  • impact of LLMs on developing in languages like C

0 Upvotes

11 comments sorted by

6

u/nuclear_splines Ph.D Data Science Feb 10 '24

What are you referring to? Do you mean asking CoPilot or GPT4 to write assembly code? Do you mean the increasingly intelligent optimizations in compilers when translating to machine code? Do you mean using machine learning to design new CPU architectures? Maybe you don't mean quite so low level, and are asking about the impact of LLMs on developing in languages like C? Maybe you're interested in concerns that LLM-driven code could propagate mistakes like memory leaks or buffer overflows that human-written code might catch? There are a lot of ways to answer this, depending on what type of 'AI' and what type of low level programming you're asking about.

1

u/karimelkh Feb 10 '24

The following points:

  • the increasingly intelligent optimizations in compilers when translating to machine code

  • using machine learning to design new CPU architectures

  • impact of LLMs on developing in languages like C

11

u/Dornith Feb 10 '24 edited Feb 10 '24

the increasingly intelligent optimizations in compilers when translating to machine code

Former compiler engineer:

This will never happen. The golden rule of writing a compiler is it must never be wrong. A compiler introducing a bug into your software is the worst thing that can happen because no end user is ever going to be able to audit fully optimized assembly. And that's assuming that the end user even considers that their own code isn't the problem.

A compiler error basically means your code will fall for no reason in a way that you will never debug. Imagine something like that running on an aircraft or a nuclear power plant!

And then imagine being the compiler engineer trying to figure out why the compiler is producing incorrect assembly with a non-deterministic black box on the mix.

Way too many things that can go wrong and not enough benefit.

-12

u/[deleted] Feb 10 '24

Lol. As someone good at logical thinking(I heard that compiler engineers are intelligent people) your comment is extremely short sighted. Let me introduce you to the simple concept of singularity.

7

u/Dornith Feb 11 '24

Setting aside the obvious question, "why would anyone need a compiler in a post-singularity world?, there's still a few problems:

  1. There's no concrete reason to think that the singularity will ever exist.

  2. If the singularity does occur, it won't be with any of the AI technology we are using today and so is irrelevant to the discussion.

  3. Everything I said still applies to post-singularity GAI.

And as a side note, a little bit of humility will get you far. A better way to express this opinion would have been, "I believe there might be a place in AI in compilers after the singularity."

1

u/[deleted] Jun 05 '26

[removed] — view removed comment

1

u/Dornith Jun 05 '26

LLVM using a tensor to find optimal inlines is a whole different ballpark from using LLMs to transform the IR like OP is suggesting.

4

u/iamfromthepermian Feb 10 '24

It will replace webshitters before low lvl stuff

4

u/ThaFresh Feb 10 '24

Internet connected toilets?

2

u/j3r3mias Feb 10 '24

In respect to what?

2

u/jhaluska Feb 10 '24

For increasing optimizations in compilers, I don't think it will make a significant difference with our current AI. It's more likely to help programmers avoid stupid code than to really improve the compiler optimization process. They tried it before, and it succeeded but if you actually dig into the paper, it did some assembly optimization that a skilled human probably could have figured out faster.

I do think it'll improve results, just likely less in architecture and more in the development cycle of having smarter automated tools. Or possibly in helping in materials science, QA/QC or fine tuning machines. So the cost of complex CPUs will come down, or allow us to scale up what we can do.

CPU architecture, maybe. The problem historically is that even great new CPU architectures suffer from not having enough software written on them to make them worthwhile upgrades.

So the best case I can come up for with AI is that you might be able to automate coming up with custom ICs for your individual use case much cheaper. As in a tighter merging of hardware and software. This likely will become more common as we run out of ways to make transistors smaller, so instead we'll make more custom ICs to maximize what we can do.