Re: [Development] Updating x86 SIMD support in Qt

2022-03-25 Thread Lorn Potter
On 19/1/2022 1:01 PM, Thiago Macieira wrote: For Qt 6.4, I'd like to propose we change the way we detect and enable SIMD support. TL;DR: [snip] On a side track. Not knowing too much regarding simd, what would be the best benchmarks to get a comparison of Qt WebAssembly simd support vs.

Re: [Development] Updating x86 SIMD support in Qt

2022-03-24 Thread Thiago Macieira
On Thursday, 24 March 2022 04:14:38 -03 Volker Hilsheimer wrote: > Interesting, I have no problems building Qt in VMs running on VirtualBox. I > build qtbase on several VMs every day, and just checked that Qt Multimedia > builds on https://app.vagrantup.com/generic/boxes/opensuse15 without >

Re: [Development] Updating x86 SIMD support in Qt

2022-03-24 Thread Volker Hilsheimer
> On 24 Mar 2022, at 02:59, Thiago Macieira wrote: > > On Wednesday, 23 March 2022 20:34:07 -03 Volker Hilsheimer wrote: >> I have a possibly wrong hunch that building Qt Multimedia fails because of >> this. This is in a Ubuntu 20.04 VM in the VMware Fusion 12 provider, and >> the hardware

Re: [Development] Updating x86 SIMD support in Qt

2022-03-23 Thread Thiago Macieira
On Wednesday, 23 March 2022 20:34:07 -03 Volker Hilsheimer wrote: > I have a possibly wrong hunch that building Qt Multimedia fails because of > this. This is in a Ubuntu 20.04 VM in the VMware Fusion 12 provider, and > the hardware version is maxed out (it wasn’t earlier, but didn’t help to > put

Re: [Development] Updating x86 SIMD support in Qt

2022-03-23 Thread Volker Hilsheimer
> On 24 Mar 2022, at 00:34, Volker Hilsheimer wrote: > >> On 24 Jan 2022, at 17:04, Thiago Macieira wrote: >> >> On Monday, 24 January 2022 05:30:46 PST Konrad Rosenbaum wrote: >>> I have absolutely no problem with stuff running faster and more >>> efficient on my two laptops (which are

Re: [Development] Updating x86 SIMD support in Qt

2022-03-23 Thread Volker Hilsheimer
> On 24 Jan 2022, at 17:04, Thiago Macieira wrote: > > On Monday, 24 January 2022 05:30:46 PST Konrad Rosenbaum wrote: >> I have absolutely no problem with stuff running faster and more >> efficient on my two laptops (which are significantly more modern), but I >> would have a major problem with

Re: [Development] Updating x86 SIMD support in Qt

2022-01-24 Thread Thiago Macieira
On Monday, 24 January 2022 05:30:46 PST Konrad Rosenbaum wrote: > I have absolutely no problem with stuff running faster and more > efficient on my two laptops (which are significantly more modern), but I > would have a major problem with it not running at all on my workstation > that I use for

Re: [Development] Updating x86 SIMD support in Qt

2022-01-24 Thread Rui Oliveira
Hey, Since Qt has its own Conan/Artifactory setup , maybe it would be viable to have some different SIMD setups available as options for the Qt package? This would require Conan as a dependency, of course. On most systems that

Re: [Development] Updating x86 SIMD support in Qt

2022-01-23 Thread Thiago Macieira
On Saturday, 22 January 2022 10:41:50 PST Lisandro Damián Nicanor Pérez Meyer wrote: > Keeping the distros able to use whatever baseline is indeed a first > good step, but I'm also thinking about proprietary apps that might be > using tQtC's build for their offerings. We used this very same

Re: [Development] Updating x86 SIMD support in Qt

2022-01-22 Thread Lisandro Damián Nicanor Pérez Meyer
Hi! On Wed, 19 Jan 2022 at 14:50, Allan Sandfeld Jensen wrote: [snip] > I have a ~10 year old Phenom II that I use as a media server, it also lacks > SSE4 (only having AMDs so-called SSE4a). With 3 cores and 4GB of memory it > runs a modern Qt5 based Linux desktop just fine, even if I don't

Re: [Development] Updating x86 SIMD support in Qt

2022-01-20 Thread Thiago Macieira
On Thursday, 20 January 2022 13:10:08 PST Lorn Potter wrote: > well, from https://emscripten.org/docs/porting/simd.html > "also turn on LLVM’s autovectorization passes, so no source > modifications are necessary to benefit from SIMD." > so emscripten's simd support is more than just sse2, sse3,

Re: [Development] Updating x86 SIMD support in Qt

2022-01-20 Thread Lorn Potter
On 21/1/2022 6:10 AM, Thiago Macieira wrote: On Thursday, 20 January 2022 11:22:19 PST Lorn Potter wrote: It's like Jean-Michael says, 32 bit, but it's complicated. Yeah, I can get that :) From what I've understood so far, WASM is not __x86_64__ but it might be __i386__. So far, that's

Re: [Development] Updating x86 SIMD support in Qt

2022-01-20 Thread Thiago Macieira
On Thursday, 20 January 2022 11:22:19 PST Lorn Potter wrote: > It's like Jean-Michael says, 32 bit, but it's complicated. Yeah, I can get that :) >From what I've understood so far, WASM is not __x86_64__ but it might be __i386__. So far, that's not a problem. I don't think we use any assembly

Re: [Development] Updating x86 SIMD support in Qt

2022-01-20 Thread Lorn Potter
On 20/1/2022 1:29 AM, Thiago Macieira wrote: On Tuesday, 18 January 2022 20:56:10 PST Lorn Potter wrote: wasm is a special case, as we turn it off by default, regardless of detection. We cannot allow detection by default (specified by some configure argument which is currently -sse2) because

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Tuesday, 18 January 2022 19:01:06 PST Thiago Macieira wrote: > 4) up the defaults from where they are today > > Today, your default Qt build will always target the x86-64 baseline[*], > including for i386, despite as I said no CPU failing to meet the next level > for 9 years. I'd like to

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 08:48:37 PST Thiago Macieira wrote: > If Microsoft wants their OS to have better-performing content, they'll have > to come up with a solution. I do plan to reach out to them via the team > that works with them at Intel, but I don't expect to see any solution, at >

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Kevin Kofler via Development
Thiago Macieira wrote: > Whether Fedora decides to up the minimum requirement for a future edition > is something you'll be in a better position to answer than I am. So far, I and few others have successfully blocked attempts at upping the minimum requirement for Fedora. (The requirement for the

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 14:03:41 PST Kevin Kofler via Development wrote: > Thiago Macieira wrote: > > Clear Linux attempts to use a heuristic to guess which libraries it thinks > > are worth keeping the AVX2 version of. To see which ones it thought of > > qtbase, see

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 13:52:21 PST Kevin Kofler via Development wrote: > The notebook has 4 GiB RAM. (That was the maximum available. I picked it > because I wanted the notebook to last.) Fedora 35 with KDE Plasma runs fine > on it. Not fast, but usable. Whether Fedora decides to up the

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Kevin Kofler via Development
Thiago Macieira wrote: > Clear Linux attempts to use a heuristic to guess which libraries it thinks > are worth keeping the AVX2 version of. To see which ones it thought of > qtbase, see https://github.com/clearlinux-pkgs/qtbase/blob/ >

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Kevin Kofler via Development
Thiago Macieira wrote: > I understand. I have one of those in a cabinet, but it doesn't power on > (the PSU is bust). My notebook's power supply adapter went bust in 2019, but thankfully, the circuitry inside the notebook is fine, only the external adapter had broken down. So I replaced it with

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 08:55:46 PST Thiago Macieira wrote: > I'm not proposing we change Xcode project file generation. Only Qt's own > CMake-based build. I've just tried an x86_64h;arm64 universal build and it failed because of the ARM build. There's something wrong with my SDK or

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 09:51:38 PST Alexandru Croitor wrote: > > On 19. Jan 2022, at 18:34, Thiago Macieira > > wrote: > > > > Indeed. I'm hoping it's a matter of making qt_internal_add_module() > > creating two CMake targets instead of one, and modifying the C and C++ > > compiler flags

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 09:28:40 PST Edward Welbourne wrote: > Thiago Macieira (19 January 2022 17:48) replied: > > That's a misconception. AVX and especially AVX2 introduce a lot of > > codegen opportunities for the compilers, which they've been able to > > use for years. > > Is the

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Alexandru Croitor
> On 19. Jan 2022, at 18:34, Thiago Macieira wrote: > > Indeed. I'm hoping it's a matter of making qt_internal_add_module() creating > two CMake targets instead of one, and modifying the C and C++ compiler flags > as well as output dir for one of them. Which library names appear in the

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Allan Sandfeld Jensen
On Mittwoch, 19. Januar 2022 16:41:11 CET Thiago Macieira wrote: > On Tuesday, 18 January 2022 22:43:40 PST Kevin Kofler via Development wrote: > > Thiago Macieira wrote: > > > By default, I'd like us to produce x86-64 v2 code, which is SSE4. > > > > But v1 will still be available for

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 00:57:04 PST Alexandru Croitor wrote: > I believe this will pessimize optimisations for certain platforms as pointed > out in the linked change. > > Specifically QNX and iOS simulator builds. > >

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Edward Welbourne
On Wednesday, 19 January 2022 00:13:32 PST Lars Knoll wrote: >> AVX is only used by a couple of classes in Qt Core and the drawhelper >> in Qt Gui. Qt Gui already does runtime detection, so it would be only >> about adding that to the methods in Qt Core. Thiago Macieira (19 January 2022 17:48)

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 04:23:22 PST Allan Sandfeld Jensen wrote: > On Mittwoch, 19. Januar 2022 04:01:06 CET Thiago Macieira wrote: > > 5) for glibc-based Linux, add v3 sub-arch by default > > > > I'd like to raise the default on Linux from baseline to v2 *and* add a v3 > > sub- arch

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 05:04:07 PST Tor Arne Vestbø wrote: > Hey hey, > > On 19 Jan 2022, at 04:01, Thiago Macieira > mailto:thiago.macie...@intel.com>> wrote: > 3) add a way to have multi-arch glibc-based Linux builds > > If we go down this road I ask that we align both the porcelain

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Jean-Michaël Celerier
Re. wasm, as far as I know it's 32-bit (not x86 at all) but with a compatibility layer provided by emscripten which allows sse & avx intrinsincs to be translated to either equivalent vector instructions in the wasm bytecode, or shims which do it manually. Cheers, --

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Wednesday, 19 January 2022 00:13:32 PST Lars Knoll wrote: > The main thing I’m wondering about is how much performance we gain by from a > multi arch build Qt for different x86_64 architectures opposed to building > maybe for v2 and detecting/using AVX and AVX512 at runtime. I would assume >

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Tuesday, 18 January 2022 22:43:40 PST Kevin Kofler via Development wrote: > Thiago Macieira wrote: > > By default, I'd like us to produce x86-64 v2 code, which is SSE4. > > But v1 will still be available for distribution packaging? As long as that > is the case, I do not see a major issue, it

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Thiago Macieira
On Tuesday, 18 January 2022 20:56:10 PST Lorn Potter wrote: > wasm is a special case, as we turn it off by default, regardless of > detection. We cannot allow detection by default (specified by some > configure argument which is currently -sse2) because browsers do not > support it by default, and

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Tor Arne Vestbø
Hey hey, On 19 Jan 2022, at 04:01, Thiago Macieira mailto:thiago.macie...@intel.com>> wrote: 3) add a way to have multi-arch glibc-based Linux builds If we go down this road I ask that we align both the porcelain and plumbing (configure, build system, C++ APIs, etc) . We already have

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Allan Sandfeld Jensen
On Mittwoch, 19. Januar 2022 04:01:06 CET Thiago Macieira wrote: > 5) for glibc-based Linux, add v3 sub-arch by default > > I'd like to raise the default on Linux from baseline to v2 *and* add a v3 > sub- arch build, as described by point #3 above. > > Device-specific Qt builds (Yocto Project,

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Alexandru Croitor
> On 19. Jan 2022, at 04:01, Thiago Macieira wrote: > > 1) assume all compilers support what we need > > I propose we remove the tests for the intrinsics of each individual CPU > feature. Instead, let's just assume they all have everything up to 2016. > > The change

Re: [Development] Updating x86 SIMD support in Qt

2022-01-19 Thread Lars Knoll
Hi Thiago, I’m absolutely in favour of upping the SIMD support in Qt. Compilers support everything we need, and we should make better use of that. The main thing I’m wondering about is how much performance we gain by from a multi arch build Qt for different x86_64 architectures opposed to

Re: [Development] Updating x86 SIMD support in Qt

2022-01-18 Thread Kevin Kofler via Development
Thiago Macieira wrote: > By default, I'd like us to produce x86-64 v2 code, which is SSE4. But v1 will still be available for distribution packaging? As long as that is the case, I do not see a major issue, it will just be one more caveat for distribution packaging. (Distributions still

Re: [Development] Updating x86 SIMD support in Qt

2022-01-18 Thread Lorn Potter
On 19/1/2022 1:01 PM, Thiago Macieira wrote: I've also found that macOS universal builds, WASM, Android and maybe some more are improperly detecting support. Specifically for universal builds, what we detect depends on the order in which you specify the architectures. This is buggy at a

[Development] Updating x86 SIMD support in Qt

2022-01-18 Thread Thiago Macieira
For Qt 6.4, I'd like to propose we change the way we detect and enable SIMD support. TL;DR: * Assume all compilers support 5-year-old stuff * Up the minimum CPU for Linux, Window and macOS/x86 * Fix macOS Universal builds to use the minimum * Add an option to cmake to choose a minimum matching