Holochain and FPGA Hardware

Customer Service received this question and I felt it could be valuable to share it here:

"I’d like to know if the holochain is compatible with FPGA based hardware and if so whether it could one day become price competitive with Amazon’s cloud based supercomputer?

Alastair Ong:

What an interesting and specific question. Here’s my take (please correct me if I’m wrong anyone!):

Can Holochain run on FPGAs?

For the immediate future we only support Holochain on Linux_x64 or Linux_aarch64. As long as the FPGA can synthesise a compatible microprocessor / CPU, then it can run Holochain binaries. So this probably depends on the specific FPGA make/model.

Can Holo Hosting run on FPGAs?

The answer is similar to above (i.e. as long as the FPGA can synthesise the required CPU) but it might be complicated by NixOS.

Price competitive with AWS’s supercomputer?

We can’t speculate on price competitiveness as it is driven by markets and our hosts, not by us.

More broadly:

I would be surprised if Holochain and HPC (the AWS “supercomputing”) are considered competitors in the near or even medium term, given the focus on user sovereignty, Holochain is geared towards consumer-facing applications. In contrast, HPC, especially with FPGAs, is used for specialised, scientific applications like protein folding simulations. I think it’s not really a field where user-sovereignty is a high priority issue, but I might be missing something.

@artbrock:

I would add that Holochain applications run in web assembly and are executed by the Holochain conductor. The apps do not have direct access to system resources (file system / hard drives, printers, GPUs, etc.). However, we are building the Holochain conductor to be extensible through plug-ins – and through the plug-in API one could provide the bridge for Holochain Apps to pass special-purpose calls to system components.

For example, if blockchain GPU mining were to become obsolete, we’d expect a market to emerge to tap into all that GPU hardware for special processing tasks and someone could make a plug-in which could pass GPU tasks from the app to the system and return results to the app. Theoretically, the same possibility exists for FPGAs if there’s enough reason for someone to build that plug-in. The data would have to be passed to/from the FPGAs in some kind of generic wrapper, because there’s likely no way for the Holochain plug-in to know how the FPGAs structure their inputs or results.

In any case, it seems feasible at some point that Holo hosts could differentiate the type of hosting they can deliver, by the flavors of specialized hardware they have, but initially, Holo hosting is only tapping into basic CPU compute power.

Alastair Ong:

I think there is some context here for beginners:

In general there are two types of integrated circuits - general purpose ones like CPUs and modern GPUs which can run any program designed for it, and application specific chips (ASICs) which are designed at a hardware level for a specific purpose.

ASICs are far more efficient since they are specialised. This is why Bitcoin and Ethereum mining has migrated from general purpose to specific (CPU --> GPU --> ASIC).

FPGAs (Field-Programmable Gate Arrays) are a class of integrated circuits which can be programmed and reprogrammed at a hardware level. So they can be different types of ASICs or even a general purpose chip.

In the context of AWS, they are used as specialised accelerators. I.e. paired with a CPU. But they can also be used standalone I believe.

So my answer was more from the perspective of “can Holochain itself run on FPGAs?”, whereas Art’s is “Can Holochain running on CPUs offload compute to FPGAs?”

Art Brock:

Totally… there would be no advantage for Holo hosting in general to use FPGAs because it is not just repeating predictable tasks that could be programmed into hardware (aside from maybe some network/routing functions common to all Holochain apps which at some future point after they’re stabilized, we could consider programming into specialized hardware). Different apps perform different computing, so we use CPUs because they’re generalized.

I guess I assumed the question was asking could Holo/chain provide access to supercomputing computing-like functionality, rather than would Holo hosting itself be running on FPGAs.

2 Likes