
Helping Someone Get a Domestic Accelerator Card Working: Notes from the Process
I compared two online tutorials about Hygon's DCU (Deep Computing Unit) — one was PaddlePaddle's official doc, the other a personal blog — then found a machine with the card and actually ran through it. The goal was to get the machine to recognize text in an image.
I picked text recognition as the first task for a simple reason. It doesn't demand much compute, produces results fast, and if it fails, it's easy to tell which step went wrong.
First, let's get the concepts straight. DCU is an accelerator card made by Hygon, plugged into a server, specifically for AI-type computation. You can think of it as a domestic compute board, the same category of thing as a graphics card, but it can't be plugged into a desktop and used as a GPU. It uses a GPGPU architecture and is ecosystem-compatible with the ROCm stack; supposedly the underlying layer is converted through the HIP interface, so code originally running on CUDA can be migrated with some changes.
Step one: confirm the machine recognizes the card.
Log into the server, but don't rush to install things. Hygon's toolchain follows the ROCm path, and card status is usually checked with that smi tool. When I ran it, a table popped up with card number, temperature, and memory usage. The card number column had a number and memory usage was near zero, meaning the driver was alive.
If that column is empty, or it directly reports no device found, don't go further. It's most likely the driver isn't installed, or the container isn't passing the card through.
Step two: pull the image.
Running PaddlePaddle models on Hygon has a ready-made path. PaddleOCR-VL has an image built specifically for DCU, around 22 GB in size. Be mentally prepared for that size — on a slow network, one to two hours is normal.
This is where I hit my first pitfall. It dropped once mid-way, and when I re-pulled, it didn't resume — started from scratch. Later I switched approaches: pull the image locally first, then import it, which is more stable than pulling directly.
Step three: start the service.
After pulling the image, run it. At this step the interface is just a stream of logs scrolling up. Watch the last few lines to see whether it loaded the model and whether the port came up. On my end I waited about three or four minutes, and the logs stopped at a local port.
Then open another window and send an image over. What comes back is text with positions — each recognized word followed by a coordinate box.
Let's talk about the pitfalls separately.
The biggest pitfall is mounting the card in the container. If this machine is shared by multiple people, the DCU is usually virtualized and partitioned. Each container can mount at most one virtual DCU device; if you want to stuff two into one container, you have to turn off multiplexing.
There's an even more hidden one. You can't use DCU multiplexing in an init container — if you do, the task simply won't be scheduled. I got stuck here at first: the logs reported nothing, and the task just hung. I dug around for a long time before I found this restriction.
The characteristic of this pitfall is that there's no error at all — you can only rely on experience or digging through docs. Newbies easily think they wrote the image wrong, then re-pull that 22 GB image over and over.
Let's walk through the four stages side by side. Recognizing the card is just running the smi tool — mine was normal; if the column is empty, check the driver first. Pulling the image is one command in the docs, but in practice a drop means starting over; my approach is to pull locally then import. Starting the service is just waiting on logs — I waited three or four minutes, watching the port line. Mounting the card is configuring annotations in the docs, but in practice it doesn't take effect in an init container — don't enable multiplexing in init.
On the plus side, the process is ready-made; PaddlePaddle and DCU have already been mutually verified, the image works out of the box, and first-timers don't need to tune parameters.
On the minus side, the image is huge, and one network drop means starting over; some restrictions don't throw errors, so troubleshooting is all about digging through docs.
This whole process only works if the machine was set up by someone else. Starting from bare metal — installing drivers, installing the container runtime — that's another article's worth. The hardest part of the tutorial is those restrictions that don't throw errors.
The image size is another thing that's easy to get burned by. 22 GB sounds like just a number, but once you drop once and start over, you'll know what it means.
Next you can swap in your own images and run a batch to check recognition rates. After that, you can hook this service into a batch script so images in a folder get processed automatically. If you have other PaddlePaddle models on hand, the process is much the same — just swap the image.
For cards shared by multiple people, after partitioning, what rule determines how compute is divided — I still haven't figured that out. How do you all manage it on your end?
Physix Frontier