Bug#843425: Fwd: Bug#843425: blender doesn't optimize for amd64 defaults

Sergey Sharybin sergey at blender.org
Mon Nov 7 09:52:11 UTC 2016


Ah, it's Pemtium 4 where SSE2 first arrived, for a moment thought it's
Pentium Pro. My bad..

So for both i386 and i686 SSE2 requirement is not valid.

Currently in Blender upstream we detect SSE/SSE2 flags based on
current CPU. Meaning, if you're builing on i686 CPU Blender should
already have global SSE2 optimization disabled. If CPU on the builder
machine supports SSE2 we can still force SSE/SSE2 optimization to be
off by passing `-DSUPPORT_SSE_BUILD=OFF -DSUPPORT_SSE2_BUILD=OFF` to
CMake.

On Mon, Nov 7, 2016 at 10:40 AM, Matthias Klose <doko at debian.org> wrote:
> On 07.11.2016 10:32, Sergey Sharybin wrote:
>> Hi,
>>
>> Afraid the reply to #843425 was only delivered to the BTS and not easily
>> visible to you guys.
>>
>> Here's the full reply, same as [1]. Just so you know :)
>>
>> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843425#10
>>
>>
>> ---------- Forwarded message ----------
>> From: Sergey Sharybin <sergey at blender.org>
>> Date: Mon, Nov 7, 2016 at 9:50 AM
>> Subject: Bug#843425: blender doesn't optimize for amd64 defaults
>> To: 843425 at bugs.debian.org
>>
>>
>> Hi,
>>
>> From the report it's not fully clear what parts Blender those CFLAGS
>> are referencing to, but because it's all within a context of #843379 i
>> would guess we are talking about Cycles kernel here (Cycles is the
>> render engine we use in Blender).
>>
>> In this case you're partially correct: we are mainly ignoring default
>> CFLAGS but we compile 6 different CPU kernels, optimized for various
>> microarchitectures ("native" - no SSE2 on i686 / SSE2 on amd64, forced
>> SSE2, SSE3, SSE4.1, AVX and AVX2). Then during runtime we detect
>> current CPU microarchitecture and invoke kernel with highest
>> capabilities allowed on the current processor.
>>
>> This is the only way we can guarantee optimal render times on amd64.
>> Keep in mind, AVX2 can render similar scene like 2x faster than simple
>> SSE2. This is something we can not ignore for our users.
>
> well, the GCC issue was opened with a RC severity, so I assumed that everything
> was built using these flags. The assumption of amd64 having SSE2 enabled by
> defaults is valid.
>
>> That being said, if you have some tricky setup where we do not detect
>> capabilities correctly and Cycles tries to use unsupported kernel and
>> runs into ILLEGAL INSTRUCTION i'll be happy to look into and solve
>> that from our end.
>>
>> Now, about forcing microarchitecture in rest of Blender. We do require
>> SSE2 on amd64 and i686, but that should be all fine as far as i know
>> (amd64 always have SSE2, 32bit builds will disable SSE2 automatically
>> if current CPU does not support it).
>
> For Debian it is not ok to assume SSE2 on the i386 architecture.
>
> Matthias
>

-- 
With best regards, Sergey Sharybin



More information about the pkg-multimedia-maintainers mailing list