Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/dev/install-opencl/pt BR

< Rockpi4‎ | dev‎ | install-opencl
Revision as of 01:03, 3 July 2019 by Samuca (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi 4 >  Development >  Install OpenCL

Driver OpenCL funcionando no ROCK Pi 4

Instalação do pacote libmali

 $ sudo apt-get install rockchip-mali-midgard14
 $ sudo apt-get install rockchip-mali-midgard-dev

Verificação de funcionalidade com clpeak

Para ver se o driver opencl funciona corretamente no ROCK Pi 4, use a ferramenta de benchmark clpeak

 $ sudo apt-get update && sudo apt-get install cmake git
 $ git clone https://github.com/krrishnarraj/clpeak
 $ cd clpeak
 $ cmake . -DCMAKE_CXX_COMPILER=g++
 $ make
 $ ./clpeak

Depois de executar o comando clpeak, mostrará as seguintes saídas:

 Platform: ARM Platform
   Device: Mali-T860
     Driver version  : 1.2 (Linux ARM64)
     Compute units   : 4
     Clock frequency : 200 MHz
 
     Global memory bandwidth (GBPS)
       float   : 3.68
       float2  : 5.95
       float4  : 6.70
       float8  : 5.59
       float16 : 5.15
 
     Single-precision compute (GFLOPS)
       float   : 25.12
       float2  : 47.47
       float4  : 46.81
       float8  : 41.68
       float16 : 46.45
 
     Half-precision compute (GFLOPS)
       half   : 23.11
       half2  : 50.10
       half4  : 98.10
       half8  : 93.34
       half16 : 88.61
 
     Double-precision compute (GFLOPS)
       double   : 5.85
       double2  : 3.27
       double4  : 20.97
       double8  : 20.65
       double16 : 20.40
 
     Integer compute (GIOPS)
       int   : 22.67
       int2  : 49.85
       int4  : 47.96
       int8  : 34.30
       int16 : 47.78
 
     Transfer bandwidth (GBPS)
       enqueueWriteBuffer         : 1.24
       enqueueReadBuffer          : 1.31
       enqueueMapBuffer(for read) : 5.22
         memcpy from mapped ptr   : 2.56
       enqueueUnmap(after write)  : 5.32
         memcpy to mapped ptr     : 2.73
 
     Kernel launch latency : 307.37 us

Solução de problemas