PyPIM is a new method to execute Python code directly in RAM

Alfonso Maruccia

Posts: 2,520   +935
Staff
The bleeding edge: In-memory processing is a fascinating concept for a new computer architecture that can compute operations within the system's memory. While hardware accommodating this type of processing is still in early development, researchers have already proposed a software approach that can effectively leverage the hardware.

Israeli researchers have developed a new software "platform" to turn easily readable Python instructions into low-level machine code and execute it in RAM without going through the CPU. This new in-memory processing (PIM) architecture significantly improves code performance and will be instrumental in turning the PIM research efforts into a proper computer architecture.

Professor Shahar Kvatinsky and his team at the Andrew and Erna Viterbi Faculty of Electrical and Computer Engineering have worked on PIM technology for quite some time. They are trying to solve the memory wall problem – the need for two completely separate hardware components (CPU and RAM) to execute computing tasks.

In a traditional PC architecture, the CPU executes programmed instructions stored in RAM. Finding a way to run the instructions at the RAM level would mitigate the "traffic jam" of data transferred between the processor and memory.

Proper PIM computation could accelerate computer work in many fields, including AI, biotech, finance, and more. Hardware components to facilitate PIM operations are in development, with researchers working on new memory architectures and electronics. So far, little research has gone into computer programs that can work on PIM-enabled machines.

Kvatinsky's team has proposed a concept called PyPIM, a portmanteau of Python and Processing-in-Memory. PyPIM's new interface and development libraries would convert traditional, high-level Python commands into low-level, PIM-enabled machine code that runs more efficiently on PIM hardware.

The approach proposed by PyPIM could accelerate PIM adoption significantly, as programmers would not have to learn a new language. They would continue to code in Python as usual. The researchers created a hardware development simulator and a performance measurement tool so programmers could assess the performance improvements achieved with PIM. The study also proposed math and algorithmic tasks to show how PyPIM could improve computing performance.

Permalink to story:

 
I don't get it, how this is supposed to work. This article doesn't explain that. What is going to execute instructions in memory, without involving the CPU?

UPDATE: Since this article fails to explain what In-Memory Computing is...
 
Last edited:
I don't get it, how this is supposed to work. This article doesn't explain that. What is going to execute instructions in memory, without involving the CPU?

The article is wrong; the CPU is still required to execute the code.
 
I suppose it’s just semantics. Eventually if this happens in RAM, it will have to have some processor inside of RAM itself. Yes, CPU will be free but gears will have to turn elsewhere.
 
The article is wrong; the CPU is still required to execute the code.
That would make sense, I was confused as to how ram could do any computation, but this seems to be more about doing operations directly in RAM vs moving it in and out of the CPU's registers and cache
Strange it is in Python, I would have expected to see it implemented in C or similar
 
I suppose it’s just semantics. Eventually if this happens in RAM, it will have to have some processor inside of RAM itself. Yes, CPU will be free but gears will have to turn elsewhere.

This is how I read the article. The RAM subsystem would need some form of ASIC to run Python code independent of the CPU, but that's not what in-memory computing is.

In-memory computing is just loading up everything from storage to RAM then carry out all the operations in RAM, without ever hitting the slower storage mediums.

Maybe its something less exciting like Directstorage, but for Python rather than gaming/texture loading?
 
Yeah, so at the assembly level, if I understand it right, it's basically

add [variable], 10 ; perform operation directly on a variable stored in RAM, in this case addition

instead of

mov eax, [variable] ; read memory into cpu register "eax"
add eax, 10 ; perform operation
mov [variable], eax ; output result back to RAM

or something of the sort (I'm not a professional assembly programmer).

If they could get Python bytecode to run in-RAM, that might be powerful, since Python is basically a glue language that calls lots of other things that are implemented in C, Fortran, etc. Not sure if their implementation has 100% code coverage or even works for such libraries.

Since I haven't heard about this since this article was written from anywhere else, and I only ended up on this article by clicking on a link to it from a more recent Techspot article, I doubt it's that powerful. Still, interesting.

Eventually if this happens in RAM, it will have to have some processor inside of RAM itself.

If RAM and CPU could be combined, that could make for very fast access to memory (potentially), and thus improving performance. GPUs kinda do this already. Pros and cons, and right now I suppose the cons are far greater than the pros (or some enterprise would be selling it).
 
Back