[Rock-dev] Usage of SSE* CPU features ...

Stefan Haase stefan.haase at dfki.de
Thu Sep 8 12:26:39 CEST 2011


Hi!

"For now using SSE2 should be ok (will fail e.g. on gumstix however). "


Good point, these flags are unknown by the arm-architecture. On our gumstix
we use this (not pushed yet):

    cmake_package 'external/opencv' do |pkg|
        pkg.define("CMAKE_BUILD_TYPE","Release")
        if not RUBY_PLATFORM.downcase.include?("arm")
            pkg.define("ENABLE_SSE3","ON")
            pkg.define("ENABLE_SSE41","OFF")
            pkg.define("ENABLE_SSE42","OFF")
            pkg.define("ENABLE_SSSE3","OFF")
        end
        pkg.define("BUILD_EXAMPLES","OFF")
    end

Best regards,
Stefan

2011/9/5 Jakob Schwendner <jakob.schwendner at dfki.de>

> **
>
>
>
>
>  On September 5, 2011 at 5:24 PM Sylvain Joyeux <sylvain.joyeux at dfki.de>
> wrote:
>
> > Some packages start to -- sometimes sneakily -- introduce dependence on
> > CPU features such as SSE*. Such packages are OpenCV and libelas
> >
> > In libelas, this support is mandatory, so there's not much to do about
> it.
> >
> > In OpenCV, it is experimental. The person that added opencv 2.3 to rock
> > turned these features ON by default.
> >
> > My question:
> >    * is opencv using an autodetection feature ? I.e. does it turn them
> > off at runtime if the CPU does not support them, or will the user get a
> > "wrong instruction" error ?
> >    * in the latter case, what should be the default ? I would go for "do
> > not enable SSE >= 4 by default" and explain how to enable it to users on
> > the wiki. For OpenCV, it would be reenabled by adding the following code
> > snippet in autoproj/overrides.rb
> >
> >    setup_package("external/opencv") do |pkg|
> >      pkg.define("ENABLE_SSE41","ON")
> >      pkg.define("ENABLE_SSE42","ON")
> >      pkg.define("ENABLE_SSSE3","ON")
> >    end
> >
> > For the time being, I disabled SSE >= 4 in the rock package set (that
> > seems to be the safest until we resolve the question).
> >
>
> Hi,
>
>
>
> There is a macro for cmake, that gets the right optimization settings for
> your architecture:
>
>
> http://vir.homelinux.org/blog/archives/140-Automatic-Optimization-for-your-CPU-with-CMake.html
>
> direct linkt to script:
> http://gitorious.org/vc/vc/blobs/master/cmake/OptimizeForArchitecture.cmake
>
>
>
> We could embed this into the base/types package. It doesn't help however
> with opencv and libelas, I guess. In the long run, I would vote that
> autoproj itself can do the differentiation between different compiler
> option, much like it does for the operating systems now. For now using SSE2
> should be ok (will fail e.g. on gumstix however).
>
>
>
> cheers,
>
>
>
> Jakob
>
>
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
>
>


-- 
 Dipl.-Inf. Stefan Haase
 Space Robotics and Animation

Standort Bremen:
 DFKI GmbH
 Robotics Innovation Center
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Phone: +49 (0)421 178 45-4108
 Fax:   +49 (0)421 178 45-4150
 E-Mail: Stefan.Haase at dfki.de

 Weitere Informationen: http://www.dfki.de/robotik
 -----------------------------------------------------------------------
 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
 Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
 Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
 (Vorsitzender) Dr. Walter Olthoff
 Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
 Amtsgericht Kaiserslautern, HRB 2313
 Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
 USt-Id.Nr.:    DE 148646973
 Steuernummer:  19/673/0060/3
 -----------------------------------------------------------------------
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20110908/7ddcabe6/attachment.htm 


More information about the Rock-dev mailing list