(Local) AI, Please Reason about Code

“Reasoning” models have become popular as a way to expand the capabilities of large language models (LLMs). Such models take more time “considering” a prompt and iterating it through the model several times, with the goal of mimicking how a human might go about solving a problem by breaking it down into steps. I tried the reasoning QwQ model on the coding problems from my previous blog posts (1,2). Quite funny and elucidating; I will quote the replies in full as they are worth reading.

Continue reading “(Local) AI, Please Reason about Code”

(Local) AI, Please Write some Code

My previous blog post in this series tested the ability of a range of large language models to analyze a piece of C code and determine what a mystery function did. That was interesting and entertaining, but possibly not a particularly “fair” test of the models’ capabilities. Most of time, I think people use “AI” to help write code, not to understand some tricky piece of algorithmic code. Thus, I turn the problem around and ask the models to write code for the algorithm I previously asked them to analyze.

Continue reading “(Local) AI, Please Write some Code”

(Local) AI, Please Explain This Code

Continuing my exploration of what a local AI model can do, I decided to test them on the task of code analysis. It would be so nice to have an AI model that is tuned and trained on a particular tool or programming system, and that can be distributed for users to run on their own on their local machine, server, or cloud VM. Avoiding the need to run and charge for a custom cloud service and ensuring confidentiality and availability.

Updated 2024-12-12 with Llama-3.3-70B

Continue reading “(Local) AI, Please Explain This Code”

Reversing out of Reverse

The Intel Simics simulator version 7 removed a long-standing feature from the simulator framework. Reverse execution is no longer available. In its place, in-memory snapshots were introduced, which arguably offer most of the benefits at a lower implementation cost. What happened? I’ve been asked about the reasoning behind the chance on several occasions since I left Intel. I’d like to share my perspective on the decision, as it highlights the challenges of turning an idea into a robust, shippable feature.

Continue reading “Reversing out of Reverse”

“Processor Performance Insights and Optimization” – Computer and System Architecture Unraveled Event Four

Finally, the fourth CaSA, Computer and System Architecture Unraveled, meetup happened on November 6. It took far too long to get it organized, but we finally did it. The theme was about processor performance analysis and efficient processor implementation, offering two talks from very different perspectives. The location was almost the same as before, on the 19th floor of the Kista Science Tower building. Once more thanks to the sponsorship from Vasakronan and Kista Science City.

Continue reading ““Processor Performance Insights and Optimization” – Computer and System Architecture Unraveled Event Four”

The Quarterly Product and Feature Update

I think of myself to be a technical person. I like computers, simulators, code, things like that. And obviously interacting with people and helping them solve their technical problems using technology I know. However, it seems that one of the most impactful contributions made during my time at Intel was to start a meeting series. Maybe you can call it a process innovation.

Continue reading “The Quarterly Product and Feature Update”

Just Get the Right Tool!

We recently repaired a fence in our back yard. Not very exciting, but it provides a good case study in how to think about getting the right tools for the job. Or not getting the right tools. And the trade-offs inherent in improving the tools vs just getting a job done with what you have at hand. Which is something all software developers should have sympathy with.

Continue reading “Just Get the Right Tool!”

Delivering AI-Based Solutions is not Always Easy

One of the nice properties of delivering software that users install on their own machines is that once the software has been built and shipped, the cost of running it is handed over to the user. The cost per installation and per user is minimal in terms of compute load on the developing company. Of course there are costs for things like support, but that is different. However, having the customer provide the compute resources is not necessarily that easy when it comes to AI-based setups.

Continue reading “Delivering AI-Based Solutions is not Always Easy”

Teaching a Class at Uppsala University

In the first quarter of 2024, I did a short stint as a teacher at Uppsala University. I taught the class “platform-spanning systems” (PSS), which is a fourth-year/masters-level course for engineering and computer science students. It was fun and rewarding to be back at the university, and I probably learnt as much as the my students.

Continue reading “Teaching a Class at Uppsala University”

“RISC-V in Practice” – Computer and System Architecture Unraveled Event Three

On Wednesday, March 13, we had our third CaSA, Computer and System Architecture Unraveled, meetup. Same place as the previous, the 25th floor of the Kista Science Tower building, thanks to the kind sponsorship of Vasakronan and our collaboration with Kista Science City. The theme this time was “The RISC-V ISA in Practice”, with two speakers named Björn. Another great event!

Continue reading ““RISC-V in Practice” – Computer and System Architecture Unraveled Event Three”

“Packet Networks are not Socket Science” – Computer and System Architecture Unraveled Event Two

On Wednesday, November 22, we had our second CaSA, Computer and System Architecture Unraveled, meetup. Same place in Kista as the last time, the 25th floor of the Kista Science Tower building, thanks to the kind sponsorship of Vasakronan and our collaboration with Kista Science City. This time, the theme was networking – but not at the socket level. Per Holmberg presented how his team used “micro sleep” for power management in line-rate network processing, and Hans Brandberg talked about the Precision Time Protocol. Another great event!

Continue reading ““Packet Networks are not Socket Science” – Computer and System Architecture Unraveled Event Two”

The first Computer and System Architecture Unraveled Event in Kista – Great Speakers, Great Fun!

On the evening of the last Wednesday in September, we had our first CaSA, Computer and System Architecture Unraveled, event. CaSA is a meetup in Kista (Sweden) for people interested in computer architecture, system architecture, and how software and hardware interact down towards the lower levels of the stack. The topic for the inaugural event was “Core Count Explosion: A Challenge for Hardware and Software”, and it was great in some many ways!

Continue reading “The first Computer and System Architecture Unraveled Event in Kista – Great Speakers, Great Fun!”

RI.SE AI Day – More on LLMs (and some)

The Swedish research institute RI.SE hosted an “Artificial Intelligence and Computer Science day” (AI and CS day) last week. RI.SE has a long tradition of hosting interesting open houses, both as RI.SE and in their previous guide as SiCS. The day was a mix of organized talks in the morning, and an open house where RI.SE researchers showed off their work in the afternoon. Most of the AI discussions were related to large language models (LLMs), but not all. I got some new insights about LLMs in general and using LLMs for coding in particular.

Continue reading “RI.SE AI Day – More on LLMs (and some)”

That’s Odd: How iCue and Windows 11 Ruin Simics Performance

While working on some screenshots for an upcoming blog, I noticed something that something was off with the performance of Simics on my Windows 11 laptop. The CPU load did not quite go as high as I am used to – typically, compute-intense run should get close to 100% processor load using a single host thread to execute the simulation. Instead, I got to no more than about 50%, which was decidedly odd. I also had a screenshot from a few days earlier that showed some 90% CPU load. Turns out the culprit was a combination of factors, including the Windows 11 scheduler and the Corsair iCUE software pack.

Continue reading “That’s Odd: How iCue and Windows 11 Ruin Simics Performance”

ChatGPT and Code

In my previous blog post about ChatGPT and Simics, I tested it on its knowledge and abilities with a fairly niche subject. Not unsurprisingly it did not do all that well. However, one area where ChatGPT appears to really work well is when dealing with program code. This seems more practically useful as well, especially as a generator of starting points and boiler-plate code. It can also sometimes do a decent job explaining code, subject to quite common bizarre mistakes and errors. Update: Part 3, a critique of ChatGPT has been published.

Continue reading “ChatGPT and Code”