Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add canny, scharr and sobel for riscv-rvv hal. #27378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
Loading
from

Conversation

damon-spacemit
Copy link

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Contributor

The PR triggers oom killer on Muse Pi v30 board:

[ 3229.557656] opencv_perf_img invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
[ 3229.557700] CPU: 5 PID: 2190 Comm: opencv_perf_img Not tainted 6.6.36 #2.0.3.2
[ 3229.557711] Hardware name: spacemit k1-x MUSE-Pi board (DT)
[ 3229.557716] Call Trace:
[ 3229.557722] [<ffffffff8000688e>] dump_backtrace+0x1c/0x24
[ 3229.557745] [<ffffffff80f48540>] show_stack+0x2c/0x38
[ 3229.557757] [<ffffffff80f62804>] dump_stack_lvl+0x3c/0x54
[ 3229.557769] [<ffffffff80f62830>] dump_stack+0x14/0x1c
[ 3229.557777] [<ffffffff80f49a68>] dump_header+0x38/0x20a
[ 3229.557784] [<ffffffff801930fe>] oom_kill_process+0x1de/0x1e0
[ 3229.557795] [<ffffffff8019381a>] out_of_memory+0x142/0x2be
[ 3229.557802] [<ffffffff801edd88>] __alloc_pages+0xbea/0xe6e
[ 3229.557813] [<ffffffff801ee51e>] __folio_alloc+0x18/0x42
[ 3229.557821] [<ffffffff801cdd60>] __handle_mm_fault+0x4d4/0xc1e
[ 3229.557833] [<ffffffff801ce614>] handle_mm_fault+0x16a/0x254
[ 3229.557842] [<ffffffff8000d2d8>] handle_page_fault+0xbc/0x42c
[ 3229.557851] [<ffffffff80f63316>] do_page_fault+0x1e/0x36
[ 3229.557859] [<ffffffff80f6ca42>] ret_from_exception+0x0/0x6e
[ 3229.557875] Mem-Info:
[ 3229.557884] active_anon:3937100 inactive_anon:52305 isolated_anon:0
                active_file:107 inactive_file:66 isolated_file:0
                unevictable:0 dirty:0 writeback:0
                slab_reclaimable:5574 slab_unreclaimable:16172
                mapped:409 shmem:1715 pagetables:9826
                sec_pagetables:0 bounce:0
                kernel_misc_reclaimable:0
                free:25196 free_pcp:436 free_cma:7664
[ 3229.557901] Node 0 active_anon:15748400kB inactive_anon:209220kB active_file:428kB inactive_file:264kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:1636kB dirty:0kB writeback:0kB shmem:6860kB shmem_thp:0kB shmem_pmdmapped:0kB anon_thp:0kB writeback_tmp:0kB kernel_stack:7504kB pagetables:39304kB sec_pagetables:0kB all_unreclaimable? no
[ 3229.557916] DMA32 free:61096kB boost:0kB min:5256kB low:7152kB high:9048kB reserved_highatomic:0KB active_anon:1821824kB inactive_anon:13644kB active_file:128kB inactive_file:304kB unevictable:0kB writepending:0kB present:2097152kB managed:1912480kB mlocked:0kB bounce:0kB free_pcp:508kB local_pcp:0kB free_cma:30656kB
[ 3229.557928] lowmem_reserve[]: 0 14018 14018
[ 3229.557941] Normal free:39688kB boost:0kB min:39796kB low:54148kB high:68500kB reserved_highatomic:0KB active_anon:13926296kB inactive_anon:195932kB active_file:328kB inactive_file:508kB unevictable:0kB writepending:0kB present:14680064kB managed:14355228kB mlocked:0kB bounce:0kB free_pcp:1236kB local_pcp:0kB free_cma:0kB
[ 3229.557952] lowmem_reserve[]: 0 0 0
[ 3229.557962] DMA32: 30*4kB (UMEC) 20*8kB (UME) 30*16kB (UME) 51*32kB (UMEC) 35*64kB (UEC) 15*128kB (UEC) 7*256kB (UEC) 3*512kB (UMC) 4*1024kB (UMEC) 1*2048kB (E) 3*4096kB (UEC) 4*8192kB (MC) = 61080kB
[ 3229.558025] Normal: 497*4kB (UE) 190*8kB (UE) 177*16kB (UE) 195*32kB (UE) 72*64kB (UE) 52*128kB (UE) 31*256kB (UME) 6*512kB (UM) 4*1024kB (U) 0*2048kB 0*4096kB 0*8192kB = 38948kB
[ 3229.558080] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[ 3229.558086] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=64kB
[ 3229.558091] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[ 3229.558095] 1918 total pagecache pages
[ 3229.558099] 0 pages in swap cache
[ 3229.558102] Free swap  = 0kB
[ 3229.558105] Total swap = 0kB
[ 3229.558107] 4194304 pages RAM
[ 3229.558110] 0 pages HighMem/MovableOnly
[ 3229.558112] 127377 pages reserved
[ 3229.558115] 98304 pages cma reserved
[ 3229.558118] Tasks state (memory values in pages):
[ 3229.558121] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[ 3229.558219] [    333]     0   333    13867      258    81920        0          -250 systemd-journal
[ 3229.558231] [    370]     0   370     6135      881    53248        0         -1000 systemd-udevd
[ 3229.558245] [    615]   120   615     1623      192    40960        0             0 rpcbind
[ 3229.558254] [    626]   990   626     3568      192    53248        0          -900 systemd-oomd
[ 3229.558265] [    629]   992   629     4520      608    61440        0             0 systemd-resolve
[ 3229.558274] [    638]   997   638    21908      288    61440        0             0 systemd-timesyn
[ 3229.558284] [    667]   106   667     1681      128    40960        0             0 avahi-daemon
[ 3229.558294] [    670]   101   670     2255      512    40960        0          -900 dbus-daemon
[ 3229.558302] [    682]   988   682    90066      694   143360        0             0 gnome-remote-de
[ 3229.558312] [    688]     0   688    56825      224    57344        0             0 adbd
[ 3229.558322] [    698]   987   698    95610      769    94208        0             0 polkitd
[ 3229.558332] [    708]     0   708    78682      256    86016        0             0 power-profiles-
[ 3229.558341] [    724]     0   724     3696      416    53248        0             0 systemd-logind
[ 3229.558351] [    728]     0   728    78719      288    86016        0             0 accounts-daemon
[ 3229.558360] [    732]     0   732     2888       96    40960        0             0 cron
[ 3229.558369] [    737]     0   737    77918      288    81920        0             0 switcheroo-cont
[ 3229.558379] [    743]     0   743   116231      448   118784        0             0 udisksd
[ 3229.558389] [    759]   106   759     1633      163    40960        0             0 avahi-daemon
[ 3229.558399] [    764]     0   764    83959      796   135168        0             0 NetworkManager
[ 3229.558408] [    768]     0   768     3061      224    36864        0             0 realtek_bt.sh
[ 3229.558418] [    770]     0   770     3621      352    53248        0             0 wpa_supplicant
[ 3229.558427] [    835]     0   835    29334     2624   110592        0             0 unattended-upgr
[ 3229.558436] [    836]   102   836    55146      288    61440        0             0 rsyslogd
[ 3229.558445] [    841]     0   841    97679      958   110592        0             0 ModemManager
[ 3229.558454] [    843]   105   843     2694      169    45056        0             0 kerneloops
[ 3229.558463] [    859]   105   859     2694      201    45056        0             0 kerneloops
[ 3229.558473] [    868]     0   868    79012      320    90112        0             0 gdm3
[ 3229.558483] [    880]     0   880    60815      416    90112        0             0 gdm-session-wor
[ 3229.558492] [    894]   117   894     4457      896    65536        0           100 systemd
[ 3229.558502] [    896]   117   896     4415      424    53248        0           100 (sd-pam)
[ 3229.558511] [    962]   117   962    28238      736    81920        0           200 pipewire
[ 3229.558521] [    963]   117   963    24680      224    57344        0           200 pipewire
[ 3229.558530] [    964]   117   964   102000     1312   131072        0           200 wireplumber
[ 3229.558539] [    965]   117   965    27732      640    77824        0           200 pipewire-pulse
[ 3229.558548] [    966]   117   966     1827      256    36864        0           200 dbus-daemon
[ 3229.558558] [    984]   117   984    59463      192    77824        0             0 gdm-wayland-ses
[ 3229.558568] [    998]   117   998     1274      160    36864        0             0 dbus-run-sessio
[ 3229.558577] [    999]   114   999     5383       96    36864        0             0 rtkit-daemon
[ 3229.558586] [   1001]   117  1001     1941      320    36864        0             0 dbus-daemon
[ 3229.558595] [   1014]   117  1014   148603      704   163840        0             0 gnome-session-b
[ 3229.558606] [   1057]   117  1057   357500    10232   503808        0             0 gnome-shell
[ 3229.558619] [   1090]   117  1090    95292      192    90112        0             0 at-spi-bus-laun
[ 3229.558629] [   1096]   117  1096     1794      224    36864        0             0 dbus-daemon
[ 3229.558637] [   1098]   117  1098     9096     1242    90112        0             0 Xwayland
[ 3229.558647] [   1102]     0  1102      545      160    28672        0             0 rtk_hciattach
[ 3229.558657] [   1108]   117  1108    58501      288    69632        0             0 at-spi2-registr
[ 3229.558666] [   1109]   115  1109    80359     1314   102400        0             0 colord
[ 3229.558678] [   1138]     0  1138     2782      320    40960        0             0 bluetoothd
[ 3229.558687] [   1163]     0  1163    79264      416    90112        0             0 upowerd
[ 3229.558696] [   1179]   117  1179    78578      288    90112        0             0 xdg-permission-
[ 3229.558706] [   1203]   117  1203   174334     1282   200704        0             0 gjs
[ 3229.558715] [   1228]   117  1228   136115      416   131072        0             0 gsd-sharing
[ 3229.558723] [   1232]   117  1232   121295      960   155648        0             0 gsd-wacom
[ 3229.558796] [   1235]   117  1235   103036      830   143360        0             0 gsd-color
[ 3229.558809] [   1238]   117  1238   102659      797   139264        0             0 gsd-keyboard
[ 3229.558820] [   1244]   117  1244    81096      448   106496        0             0 gsd-print-notif
[ 3229.558831] [   1249]   117  1249   133309      256   114688        0             0 gsd-rfkill
[ 3229.558844] [   1251]   117  1251    97043      320    94208        0             0 gsd-smartcard
[ 3229.558857] [   1258]   117  1258   108047      416   126976        0             0 gsd-datetime
[ 3229.558867] [   1263]   117  1263   184843      957   196608        0             0 gsd-media-keys
[ 3229.558876] [   1270]   117  1270    77889      256    81920        0             0 gsd-screensaver
[ 3229.558885] [   1274]   117  1274    98674      320   110592        0             0 gsd-sound
[ 3229.558895] [   1286]   117  1286    96497      256    94208        0             0 gsd-a11y-settin
[ 3229.558904] [   1293]   117  1293   115263      256   110592        0             0 gsd-housekeepin
[ 3229.558912] [   1300]   117  1300   148888     1120   184320        0             0 gsd-power
[ 3229.558922] [   1350]   117  1350   104010      608   143360        0             0 gsd-printer
[ 3229.558931] [   1382]   117  1382   179269    15149   610304        0             0 mutter-x11-fram
[ 3229.558941] [   1394]   117  1394   176405     1211   200704        0             0 gjs
[ 3229.558951] [   1438]     0  1438     2683      160    36864        0             0 agetty
[ 3229.558961] [   1462]     0  1462    10221      564    81920        0             0 cupsd
[ 3229.558970] [   1464]   112  1464    90325     1082   151552        0             0 cups-browsed
[ 3229.558979] [   1478]     7  1478     3618      320    49152        0             0 dbus
[ 3229.558988] [   1504]     0  1504     2381      384    40960        0         -1000 sshd
[ 3229.558997] [   1512]  1000  1512     4461      896    61440        0           100 systemd
[ 3229.559006] [   1514]  1000  1514     4415      457    53248        0           100 (sd-pam)
[ 3229.559015] [   1526]  1000  1526    27534      640    73728        0           200 pipewire
[ 3229.559023] [   1527]  1000  1527    24680      288    61440        0           200 pipewire
[ 3229.559032] [   1530]  1000  1530   101617      981   118784        0           200 wireplumber
[ 3229.559042] [   1531]  1000  1531    27592      480    81920        0           200 pipewire-pulse
[ 3229.559051] [   1553]  1000  1553     1832      224    36864        0           200 dbus-daemon
[ 3229.559060] [   1689]     0  1689     3008      464    45056        0             0 sshd
[ 3229.559068] [   1731]  1000  1731     3041      435    45056        0             0 sshd
[ 3229.559077] [   1732]  1000  1732     4647      793    53248        0             0 zsh
[ 3229.559086] [   1998]     0  1998   119007     1584   204800        0             0 fwupd
[ 3229.559104] [   2190]  1000  2190  4067941  3923143 31764480        0             0 opencv_perf_img
[ 3229.559117] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-6.scope,task=opencv_perf_img,pid=2190,uid=1000
[ 3229.559213] Out of memory: Killed process 2190 (opencv_perf_img) total-vm:16271764kB, anon-rss:15692316kB, file-rss:256kB, shmem-rss:0kB, UID:1000 pgtables:31020kB oom_score_adj:0
[ 3233.796303] oom_reaper: reaped process 2190 (opencv_perf_img), now anon-rss:0kB, file-rss:256kB, shmem-rss:0kB

The issue is stable.

@asmorkalov
Copy link
Contributor

[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/24, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, false, (50, 100))
[ PERFSTAT ]    (samples=10   mean=9.30   median=9.29   min=9.25   stddev=0.04 (0.4%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/24 (152 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/25, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, false, (0, 50))
[ PERFSTAT ]    (samples=10   mean=10.69   median=10.60   min=10.49   stddev=0.24 (2.2%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/25 (162 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/26, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, false, (100, 120))
[ PERFSTAT ]    (samples=10   mean=8.64   median=8.66   min=8.40   stddev=0.10 (1.2%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/26 (141 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/27, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, true, (50, 100))
[ PERFSTAT ]    (samples=10   mean=9.02   median=8.99   min=8.85   stddev=0.11 (1.2%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/27 (145 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/28, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, true, (0, 50))
[ PERFSTAT ]    (samples=22   mean=10.71   median=10.65   min=10.44   stddev=0.32 (3.0%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/28 (293 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/29, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 3, true, (100, 120))
[ PERFSTAT ]    (samples=10   mean=8.53   median=8.51   min=8.37   stddev=0.13 (1.6%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/29 (140 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/30, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, false, (50, 100))
[ PERFSTAT ]    (samples=13   mean=10.70   median=10.68   min=10.63   stddev=0.08 (0.7%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/30 (196 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/31, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, false, (0, 50))
[ PERFSTAT ]    (samples=100   mean=10.39   median=10.23   min=10.04   stddev=0.38 (3.6%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/31 (1118 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/32, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, false, (100, 120))
[ PERFSTAT ]    (samples=13   mean=9.97   median=9.94   min=9.87   stddev=0.10 (1.0%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/32 (186 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/33, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, true, (50, 100))
[ PERFSTAT ]    (samples=10   mean=10.17   median=10.12   min=10.00   stddev=0.23 (2.2%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/33 (156 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/34, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, true, (0, 50))
[ PERFSTAT ]    (samples=100   mean=10.25   median=10.18   min=10.05   stddev=0.31 (3.0%))
[       OK ] Img_Aperture_L2_thresholds_canny.canny/34 (1105 ms)
[ RUN      ] Img_Aperture_L2_thresholds_canny.canny/35, where GetParam() = ("cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png", 5, true, (100, 120))
[1]    2190 killed     ./opencv_perf_imgproc --gtest_output=xml:../perf-canny-sobel/patched-3.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.