Creating an updated OpenCL GPU Miner

I’ve gotten sgminer_arm working with the Rock Pi A board, I didn’t need wifi and I don’t use Bluetooth.

Screen shoots

This is running the Cryptonight-ASIC algo.

Nice.

If you could share how to do this, we are happy to add it on the wiki.

No, Problem, I’ll write a doc up for guys. It was easy after I found the forum topic for OpenCL driver setup and testing.

1 Like

Basic Guide for installing sgminer-arm on a Rock Pi 4.

Install OS Image and Basic Utilities

Download the Ubuntu offical image from: https://wiki.radxa.com/Rockpi4/downloads
choose the offical Ubuntu server image
sudo apt-get update && sudo apt-get -y upgrade
Since this a minimal image you’ll need to install some applications first
sudo apt-get install -y nano screen clinfo

Adding the Radxa testing respository

echo “deb http://apt.radxa.com/bionic-testing/ bionic main” | sudo tee /etc/apt/sources.list.d/apt-radxa-com.list
wget -O - apt.radxa.com/bionic-testing/public.key | sudo apt-key add -
sudo apt-get update && sudo apt-get -y upgrade

Installing the GPU Drivers
sudo apt-get install -y rockchip-mali-midgard14
sudo apt-get install -y rockchip-mali-midgard-dev
sudo apt-get install -y mali-midgard-dkms
sudo reboot now
After Reboot
clinfo
other option is to install and run clpeak, it will give you more detailed information on GPU performance
Optional:
apt-get install cmake git gcc-8 g+±8
export CC=gcc-8
export CXX=gcc-8
git clone https://github.com/krrishnarraj/clpeak
cd clpeak
cmake . -DCMAKE_CXX_COMPILER=g++
make
./clpeak

Build sgminer-arm-rc1
Download the Arm Developer compute Library
wget https://github.com/ARM-software/ComputeLibrary/releases/download/v19.05/arm_compute-v19.05-bin-linux.tar.gz
extract the downloaded filed
tar -xf arm_compute-v19.05-bin-linux.tar.gz
mv -r arm_compute-v19.05-bin-linux /usr/lib/
export CC=gcc-8
export CXX=g+±8
sudo apt-get install -y automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ git libgmp-dev libncurses5-dev libtool opencl-headers
git clone https://github.com/hominoids/sgminer-arm.git
cd sgminer-arm
git submodule init
git submodule update
autoreconf -fi
CFLAGS="-g -Ofast -Wall -march=native -mtun=cortex-a72.cortex-a53" LDFLAGS="-L/usr/lib/arm_compute-v19.05-bin-linux/lib/linux-armv8a-neon-cl" ./configure --disable-adl --disable-adl-checks
make

1 Like

thanks for this instruction

what hash-rate did you reached?

greetings

Out of ignorance can you mine on a rk1808?

or maybe

Here are the algo’s that I’ve tested and confirmed working:
hashrates Settings
CN-asic= ~16.5H/s -I 7 -w 32 --thread-concurrency 8192
Keccak = ~1.1MH/s -I 4 -w 4 --shaders 4
myr-gr = ~50KH/s -I 8 -32 --shaders 4

autoconfiguration doesn’t work as far as I can tell, so it’s been a slow go with testing of the algorithms. yescrypt is the one I want to get working most since it doesn’t need a high hashrate to be profitable with the amount of power the board will draw and uses little mrmory so you can still CPU mine with it as well

In theory the answer is no, however I have seen some projects on GitHub for people trying to make tensorflow or caffe in to a miner, in that case it would work for mining. The Chip should be able to cpu mine though, don’t have any idea on the hashrate, but its the same basic chips as that on the Rock Pi S

Pointless cpu mining but the NPU has computing performance up to 3.0TOPs supporting INT8/INT16/FP16 hybrid operation @300mW.
Thats the point of the rk1808 the NPU.

That is 9 Tera Operations Per Second per watt that I presume can hash

CPU mining isn’t pointless, but to each their own. The RockPi 4 can do 1.35KH/s on cn-pico. You really have to look at the numbers when CPU mining, which is all an NPU is, It will matter how large the cache sizes are and latency. Also the NPU only supports up to 16-bits of data most miners are built on 64-bit code, so you NPU is going to have to cache at least 4 times per calculation. Lowering the peak tops from 3TOPS to 750GOPS at peak. It will likely be lower as those registers have to clear 4 time before one output. That is just a simple number calculation this isn’t even what your likely to get in output because we aren’t even talking about the final code output.