#1 2021-09-16 09:53:31

Greg0r
Member
Registered: 2019-01-28
Posts: 49

IsValidUtf8Avx2() and D11

I've heard that D11 could support AVX2 finally. Don't have installed
anyone checked?
Would be good to support if possible not only for FPC..

Offline

#2 2021-09-16 11:37:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

I don't have D11 sadly.

So anyone with a license is welcome to try and propose a pull request on github.

You may try to define ASMX64AVX line 512 in mormot.defines.inc and see if it compiles for mORMot 2 on Delphi 11.

Offline

#3 2021-09-17 22:06:17

Greg0r
Member
Registered: 2019-01-28
Posts: 49

Re: IsValidUtf8Avx2() and D11

Offline

#4 2021-09-18 13:01:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

Does it compile with ymmword instead of oword ?

Please try with the latest commits.

Offline

#5 2021-09-19 11:49:38

Greg0r
Member
Registered: 2019-01-28
Posts: 49

Re: IsValidUtf8Avx2() and D11

ab wrote:

Does it compile with ymmword instead of oword ?

Please try with the latest commits.

pulled today, [dcc64 Error] mormot.core.base.asmx64.inc(142): E2003 Undeclared identifier: 'ymmword'

Offline

#6 2021-09-20 07:18:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

I have no clue what their Delphi 11 syntax is.
Could you try with the latest commit? I tried to use "yword ptr" for AVX/AVX2.... This is my last hope.

I am afraid it is only partial support, and I didn't find any documentation.
https://quality.embarcadero.com/browse/RSP-16836 is pretty short on information.

https://docwiki.embarcadero.com/RADStud … at%27s_New states that AVX2 should also be supported.
Fine.
But they also state that the CPU should support it. It is not totally true, because the CPU and the OS should both support it. Testing CPUID is not enough. wink
So I am a bit afraid it may be half backed. At least undocumented.

Offline

#7 2021-09-20 15:33:52

Greg0r
Member
Registered: 2019-01-28
Posts: 49

Re: IsValidUtf8Avx2() and D11

Probably as you have said, it's paper support only..

If you want try the last time or not anyway I'm pasting with the latest commit:  https://i.imgur.com/Dl6tUbm.png

Offline

#8 2021-09-20 16:17:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

ah...
We went one step further: "yword ptr" seems to have been accepted!

Please try my latest commit about the "align 16" syntax...

Offline

#9 2021-09-20 16:43:26

Greg0r
Member
Registered: 2019-01-28
Posts: 49

Re: IsValidUtf8Avx2() and D11

smile this time I increased size of output Messages window for wider picture:
https://i.imgur.com/djjKPQ7.png

Offline

#10 2021-09-20 19:30:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

If the Delphi asm is not able to support .align 32 I don't see how 256-bit AVX registers are usable...
sad

I have fixed other issues, but this one if more difficult: it would trigger GPF at runtime, on some compilations... but perhaps not other compilations...

Offline

#11 2021-09-20 20:23:53

Greg0r
Member
Registered: 2019-01-28
Posts: 49

Re: IsValidUtf8Avx2() and D11

sad have you got technical possibility to report issue to EMB?
So (maybe) there is a chance to make real full support in 11.1...

Last edited by Greg0r (2021-09-20 20:44:21)

Offline

#12 2021-09-21 07:10:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IsValidUtf8Avx2() and D11

I asked to be part of the Delphi 11 beta (as I was with 10.4) but they didn't accept me.
In my current work, I don't use Delphi but only FPC + Lazarus, so I don't have any valid Delphi 11 license.

Offline

Board footer

Powered by FluxBB