Skip to content

Corrected the NVDLA driver to work with 5.13

atlas.luo requested to merge github/fork/cybergaszcz/nvdla_driver into esmil_starlight

Created by: cybergaszcz

Corrected changes in API for the NVDLA driver to work with upstream kernel. Below results of tests:

./nvdla_runtime --loadable fast-math.nvdla --image 0_3.jpg --rawdump
creating new runtime context...
Emulator starting
dlaimg height: 28 x 28 x 1: LS: 128 SS: 0 Size: 3584
Enter:dla_read_network_config
(DLA_TEST) Error 0x00000004: Mismatched channel: 1 != 4 (in TestExit:dla_read_network_config status=0
Utils.cpp, function createImageCopy(), line 160)
submitting tasEnter: dla_initiate_processors
ks...
...
reset engine done
Work Found!
Work Done
execution time = 1797976.000000 s
Shutdown signal received, exiting
Test pass
[riscv@fedora-starfive ~]$ ./nvdla_runtime --loadable fast-math.nvdla 
[riscv@fedora-starfive ~]$ cat output.dimg 
0 0 0 117 0 2 0 0 0 0

./nvdla_runtime --loadable fast-math.nvdla --image 0_3.jpg --rawdump
creating new runtime context...
Emulator starting
dlaimg height: 28 x 28 x 1: LS: 128 SS: 0 Size: 3584Enter:dla_read_network_config

(DLA_TEST) Error 0x00000004: Mismatched channel: 1 != 4 (in TeExit:dla_read_network_config status=0
stUtils.cpp, function createImageCopy(), line 160)
submitting tEnter: dla_initiate_processors
asks
...
reset engine done
Work Found!
Work Done
execution time = 1794760.000000 s
Shutdown signal received, exiting
Test pass
[riscv@fedora-starfive ~]$ ls
0_3.jpg  fast-math.nvdla        libjpeg.a      output.dimg
0_7.jpg  fast-math-small.nvdla  nvdla_runtime
[riscv@fedora-starfive ~]$ cat output.dimg 
0 0 0 0 0 0 0 119 0 0

Merge request reports