Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1236417
Summary: | Consider enabling the opencv gpu module | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Rich Mattes <richmattes> | ||||
Component: | opencv | Assignee: | Nicolas Chauvet (kwizart) <kwizart> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 23 | CC: | hhorak, jmlich, karlthered, kwizart, nomis80, sergio | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | opencv-2.4.11-5.fc22 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-07-30 01:10:37 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Rich Mattes
2015-06-28 20:02:40 UTC
We cannot enable cuda support within fedora as this is non-free item that been said, there is an option that will allow to enable cuda when the package is rebuilt. rpmbuild -bb opencv*.src.rpm --with cuda if it doesnt work for you and if you use the cuda packaged toolkit provided by nvidia, please send patch to fix that, but we cannot hold the bug here. An alternative would be to submit an opencv-cuda package in a 3rd party repository (with only the missing cuda enabled library). I'm not asking for cuda support to be enabled, I'm asking for the gpu module to be built. The gpu module can be built without cuda support. The result is a library where one function actually works (getCudaEnabledDeviceCount), and the rest of the functions throw exceptions when called. This is by design, since not all PCs have nvidia cards, and it allows the library users to detect at runtime whether the GPU features are supported and fall back to alternate code when they're not. Created attachment 1044123 [details]
Patch to enable gpu module
This patch contains the changes needed to enable the gpu module. It works without the nvidia cuda sdk installed
Hi I'm looking right now to opencv.spec [1] we don't need add -DBUILD_opencv_gpu=1 ? yeah o delete the line : -%{!?_with_cuda:-DBUILD_opencv_gpu=0} this compile without rpmfusion modules ? and licenses are acceptable for Fedora ? Thanks, [1] http://pkgs.fedoraproject.org/cgit/opencv.git/tree/opencv.spec The OpenCV GPU code itself looks to be licensed under the same terms as opencv. since it's not linking against cuda, there's no license issues. I have an example of the intended fallback mechanisms that will happen if we enable the gpu module. Test Program: #include <iostream> #include <opencv2/gpu/gpu.hpp> int main (int argc, char *argv[]) { int count = cv::gpu::getCudaEnabledDeviceCount(); std::cout << count << " Cuda Devices" << std::endl; try { cv::gpu::setDevice(0); } catch (std::exception& e) { std::cerr << "Caught Exception: " << e.what() << std::endl; } return 0; } Before attached patch is applied: $ g++ -o ocv_gpu `pkg-config --cflags --libs opencv` ocv_gpu.cc ocv_gpu.cc:2:31: fatal error: opencv2/gpu/gpu.hpp: No such file or directory After attached patch is applied: $ g++ -o ocv_gpu `pkg-config --cflags --libs opencv` ocv_gpu.cc $ ./ocv_gpu 0 Cuda Devices OpenCV Error: No GPU support (The library is compiled without CUDA support) in setDevice, file /home/rich/fedora/opencv/opencv-2.4.11/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp, line 84 Caught Exception: /home/rich/fedora/opencv/opencv-2.4.11/modules/dynamicuda/include/opencv2/dynamicuda/dynamicuda.hpp:84: error: (-216) The library is compiled without CUDA support in function setDevice OK , it seems to me reasonable. Any thing that block this update ? if not I will proceed soon , just waiting a little bit for an answer. Thanks, opencv-2.4.11-4.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/opencv-2.4.11-4.fc22 Package opencv-2.4.11-4.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing opencv-2.4.11-4.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-11339/opencv-2.4.11-4.fc22 then log in and leave karma (feedback). opencv-2.4.11-5.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/opencv-2.4.11-5.fc22 This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23 opencv-2.4.11-5.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. |