Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

[FORTRAN] will persist for some time -- probably for at least the next decade. -- T. Cheatham


devel / comp.arch / Re: VVM question

SubjectAuthor
* VVM questionThomas Koenig
+* Re: VVM questionAnton Ertl
|+* Re: VVM questionThomas Koenig
||`* Re: VVM questionAnton Ertl
|| `- Re: VVM questionThomas Koenig
|`* Re: VVM questionThomas Koenig
| +* Re: VVM questionAnton Ertl
| |`* Re: VVM questionThomas Koenig
| | `- Re: VVM questionAnton Ertl
| `* Re: VVM questionQuadibloc
|  `- Re: VVM questionAnton Ertl
+* Re: VVM questionTerje Mathisen
|`- Re: VVM questionThomas Koenig
`* Re: VVM questionMitchAlsup
 `* Re: VVM questionThomas Koenig
  +* Re: VVM questionStephen Fuld
  |`* Re: VVM questionAnton Ertl
  | `* Re: VVM questionTerje Mathisen
  |  +- Re: VVM questionluke.l...@gmail.com
  |  `* Re: VVM questionluke.l...@gmail.com
  |   +* Re: VVM questionTerje Mathisen
  |   |`- Re: VVM questionluke.l...@gmail.com
  |   `* Re: VVM questionMitchAlsup
  |    `- Re: VVM questionluke.l...@gmail.com
  +* Re: VVM questionMitchAlsup
  |`* Re: VVM questionStephen Fuld
  | `* Re: VVM questionThomas Koenig
  |  `* Re: VVM questionStephen Fuld
  |   `* Re: VVM questionMitchAlsup
  |    `* Re: VVM questionThomas Koenig
  |     +* Re: VVM questionMitchAlsup
  |     |+* Re: VVM questionluke.l...@gmail.com
  |     ||`* Re: VVM questionMitchAlsup
  |     || +- Re: VVM questionluke.l...@gmail.com
  |     || +* Re: VVM questionEricP
  |     || |+- Re: VVM questionluke.l...@gmail.com
  |     || |`- Re: VVM questionMitchAlsup
  |     || `* Re: VVM questionTerje Mathisen
  |     ||  +* Re: VVM questionEricP
  |     ||  |`* Re: VVM questionMitchAlsup
  |     ||  | `* Re: VVM questionThomas Koenig
  |     ||  |  +* Re: VVM questionMitchAlsup
  |     ||  |  |`- Re: VVM questionThomas Koenig
  |     ||  |  `* Re: VVM questionAnton Ertl
  |     ||  |   `* Re: VVM questionIvan Godard
  |     ||  |    `- Re: VVM questionTerje Mathisen
  |     ||  +* Re: VVM questionluke.l...@gmail.com
  |     ||  |`- Re: VVM questionMitchAlsup
  |     ||  `* Re: VVM questionStephen Fuld
  |     ||   `* Re: VVM questionluke.l...@gmail.com
  |     ||    `* Re: VVM questionMitchAlsup
  |     ||     +* Re: VVM questionluke.l...@gmail.com
  |     ||     |+- Re: VVM questionMitchAlsup
  |     ||     |`* Re: VVM questionIvan Godard
  |     ||     | `* Re: VVM questionMitchAlsup
  |     ||     |  `* Re: VVM questionIvan Godard
  |     ||     |   `* Re: VVM questionMitchAlsup
  |     ||     |    `- Re: VVM questionIvan Godard
  |     ||     `* Re: VVM questionStephen Fuld
  |     ||      `- Re: VVM questionMitchAlsup
  |     |`- Re: VVM questionluke.l...@gmail.com
  |     `* Re: VVM questionStephen Fuld
  |      +* Re: VVM questionThomas Koenig
  |      |+* Re: VVM questionTerje Mathisen
  |      ||+* Re: VVM questionThomas Koenig
  |      |||`* Re: VVM questionMitchAlsup
  |      ||| +- Re: VVM questionThomas Koenig
  |      ||| `* Re: VVM questionThomas Koenig
  |      |||  `- Re: VVM questionMitchAlsup
  |      ||`- Re: VVM questionMitchAlsup
  |      |+- Re: VVM questionStephen Fuld
  |      |`- Re: VVM questionMitchAlsup
  |      `* Re: VVM questionMitchAlsup
  |       +* Re: VVM questionStephen Fuld
  |       |`* Re: VVM questionMitchAlsup
  |       | +- Re: VVM questionTerje Mathisen
  |       | `* Re: VVM questionStephen Fuld
  |       |  `- Re: VVM questionluke.l...@gmail.com
  |       `* Re: VVM questionThomas Koenig
  |        `- Re: VVM questionMitchAlsup
  `* Re: VVM questionluke.l...@gmail.com
   `- Re: VVM questionMitchAlsup

Pages:1234
Re: VVM question

<3e96e0a5-5f5a-464f-ac72-d08fcc6a7270n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27943&group=comp.arch#27943

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:1255:b0:6ce:59a0:f2ee with SMTP id a21-20020a05620a125500b006ce59a0f2eemr8585806qkl.111.1664604729699;
Fri, 30 Sep 2022 23:12:09 -0700 (PDT)
X-Received: by 2002:a05:6870:785:b0:131:e39c:9140 with SMTP id
en5-20020a056870078500b00131e39c9140mr755587oab.261.1664604729488; Fri, 30
Sep 2022 23:12:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 30 Sep 2022 23:12:09 -0700 (PDT)
In-Reply-To: <sfvd7h$btt$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:fb70:6300:1d79:39e7:a03:ed42;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:fb70:6300:1d79:39e7:a03:ed42
References: <sftuaa$but$1@newsreader4.netcologne.de> <2021Aug22.193605@mips.complang.tuwien.ac.at>
<sfvd7h$btt$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e96e0a5-5f5a-464f-ac72-d08fcc6a7270n@googlegroups.com>
Subject: Re: VVM question
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 01 Oct 2022 06:12:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1622
 by: Quadibloc - Sat, 1 Oct 2022 06:12 UTC

On Sunday, August 22, 2021 at 11:54:59 PM UTC-6, Thomas Koenig wrote:
> It worked well on Zen 1 despite that
> architecture only "faking" AVX2 with 128-bit registers.

You can fake AVX-256 with a 128-bit ALU, but I don't see
how you can fake it if your *registers* are too short.

Assuming this is a typo, this is the same sort of thing
they're doing in the current generation with AVX-512.

John Savard

Re: VVM question

<2022Oct1.095302@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27945&group=comp.arch#27945

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: VVM question
Date: Sat, 01 Oct 2022 07:53:02 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 20
Message-ID: <2022Oct1.095302@mips.complang.tuwien.ac.at>
References: <sftuaa$but$1@newsreader4.netcologne.de> <2021Aug22.193605@mips.complang.tuwien.ac.at> <sfvd7h$btt$1@newsreader4.netcologne.de> <3e96e0a5-5f5a-464f-ac72-d08fcc6a7270n@googlegroups.com>
Injection-Info: reader01.eternal-september.org; posting-host="c242334a7819faa17692a4744eeb1c65";
logging-data="1364137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Kxil3B67ZIegm8RmSNj6q"
Cancel-Lock: sha1:jSOCFfkdeL2MUOHlZoDsRzfYAx8=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 1 Oct 2022 07:53 UTC

Quadibloc <jsavard@ecn.ab.ca> writes:
>You can fake AVX-256 with a 128-bit ALU, but I don't see
>how you can fake it if your *registers* are too short.

Use two 128-bit registers to implement a YMM register. You can see it
nicely if you measure the number of physical registers:

ROB XMM YMM
size GPRs regs regs year microarchitecture
128 92 128 64 2015 Carrizo (Excavator)
192 145 144 66 2017 Zen
224 141 147 143 2019 Zen2

Note that the number of YMM registers is half (or less) that of XMM
registers on Carrizo and Zen.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: VVM question

<1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31879&group=comp.arch#31879

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:926:b0:5e6:4193:996f with SMTP id dk6-20020a056214092600b005e64193996fmr3684059qvb.9.1682524287166;
Wed, 26 Apr 2023 08:51:27 -0700 (PDT)
X-Received: by 2002:a05:6871:279f:b0:187:8a98:1082 with SMTP id
zd31-20020a056871279f00b001878a981082mr5223077oab.11.1682524286822; Wed, 26
Apr 2023 08:51:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Apr 2023 08:51:26 -0700 (PDT)
In-Reply-To: <sg27qb$2lv$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=92.19.80.230; posting-account=soFpvwoAAADIBXOYOBcm_mixNPAaxW9p
NNTP-Posting-Host: 92.19.80.230
References: <sftuaa$but$1@newsreader4.netcologne.de> <5fd4c976-d72c-46f3-9fb4-584e72b628a2n@googlegroups.com>
<sfvckb$bok$2@newsreader4.netcologne.de> <sg0ctf$qoj$1@dont-email.me>
<2021Aug23.172406@mips.complang.tuwien.ac.at> <sg27qb$2lv$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>
Subject: Re: VVM question
From: luke.lei...@gmail.com (luke.l...@gmail.com)
Injection-Date: Wed, 26 Apr 2023 15:51:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2506
 by: luke.l...@gmail.com - Wed, 26 Apr 2023 15:51 UTC

On Tuesday, August 24, 2021 at 8:41:02 AM UTC+1, Terje Mathisen wrote:

> Modifying it to while (i+1<n && a[i] <= m) would work I think, but it is
> easier to check the index below:
> while (i<n) {
> while (i<n && a[i]<=m)
> i++;
> if (i < n) {
> m = a[i];
> nm = i;
> }
> i++;

while (i<n) {
// skip up to first max
while (i<n && a[i]<=m) i++;
// continue as long as picking new m
while (i<n && a[i]>m) {
m = a[i];
nm = i;
i++;
}
}

sorry, reviving this one as i am looking to implement it in SVP64 assembler, does the above look reasonable as a way to parallelise this?

phase 1: while (i<n && a[i]<=m) i++;

a batch can be loaded, each one tested against m, and the vector length truncated at the first fail (a[i] > m)

phase 2: while (i<n && a[i]>m) { m = a[i]; nm = i; i++; }

*another* batch loaded, tested against m, and this time the new m is always updated, looping ends when m is no longer to be updated.

of course if alternating greater less greater less appears in the data this is a sequential algorithm!

l.

Re: VVM question

<u2bm8q$1fftj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31880&group=comp.arch#31880

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: VVM question
Date: Wed, 26 Apr 2023 19:16:10 +0200
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <u2bm8q$1fftj$1@dont-email.me>
References: <sftuaa$but$1@newsreader4.netcologne.de>
<5fd4c976-d72c-46f3-9fb4-584e72b628a2n@googlegroups.com>
<sfvckb$bok$2@newsreader4.netcologne.de> <sg0ctf$qoj$1@dont-email.me>
<2021Aug23.172406@mips.complang.tuwien.ac.at> <sg27qb$2lv$1@gioia.aioe.org>
<1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Apr 2023 17:16:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0bf90d5e88adf5325818b1d44f77324e";
logging-data="1556403"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MW+jj3vLZxh9a3XxGK4RVHyaNgkhTxa63Fvl7czAAGA=="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:7PoGIjOva+oRS75iQhFLxnNCrY4=
In-Reply-To: <1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>
 by: Terje Mathisen - Wed, 26 Apr 2023 17:16 UTC

luke.l...@gmail.com wrote:
> On Tuesday, August 24, 2021 at 8:41:02 AM UTC+1, Terje Mathisen wrote:
>
> while (i<n) {
> // skip up to first max
> while (i<n && a[i]<=m) i++;
> // continue as long as picking new m
> while (i<n && a[i]>m) {
> m = a[i];
> nm = i;
> i++;
> }
> }
>
> sorry, reviving this one as i am looking to implement it in SVP64
> assembler, does the above look reasonable as a way to parallelise this?
>
> phase 1: while (i<n && a[i]<=m) i++;
> a batch can be loaded, each one tested against m, and the
> vector length truncated at the first fail (a[i] > m)
>
> phase 2: while (i<n && a[i]>m) { m = a[i]; nm = i; i++; }
>
> *another* batch loaded, tested against m, and this time the new m is always updated, looping ends when m is no longer to be updated.
>
> of course if alternating greater less greater less appears in the data this is a sequential algorithm!

I think your code looks good.

If we want to min-max optimize for minimum time on maximally bad input,
then another algorithm is probably needed.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: VVM question

<850418d8-13de-4410-b60f-070d00cf495cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31883&group=comp.arch#31883

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1a83:b0:3ef:6e60:333b with SMTP id s3-20020a05622a1a8300b003ef6e60333bmr5800176qtc.3.1682530427308;
Wed, 26 Apr 2023 10:33:47 -0700 (PDT)
X-Received: by 2002:aca:a996:0:b0:38c:66d3:67b0 with SMTP id
s144-20020acaa996000000b0038c66d367b0mr6038297oie.8.1682530427024; Wed, 26
Apr 2023 10:33:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Apr 2023 10:33:46 -0700 (PDT)
In-Reply-To: <u2bm8q$1fftj$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=92.19.80.230; posting-account=soFpvwoAAADIBXOYOBcm_mixNPAaxW9p
NNTP-Posting-Host: 92.19.80.230
References: <sftuaa$but$1@newsreader4.netcologne.de> <5fd4c976-d72c-46f3-9fb4-584e72b628a2n@googlegroups.com>
<sfvckb$bok$2@newsreader4.netcologne.de> <sg0ctf$qoj$1@dont-email.me>
<2021Aug23.172406@mips.complang.tuwien.ac.at> <sg27qb$2lv$1@gioia.aioe.org>
<1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com> <u2bm8q$1fftj$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <850418d8-13de-4410-b60f-070d00cf495cn@googlegroups.com>
Subject: Re: VVM question
From: luke.lei...@gmail.com (luke.l...@gmail.com)
Injection-Date: Wed, 26 Apr 2023 17:33:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3009
 by: luke.l...@gmail.com - Wed, 26 Apr 2023 17:33 UTC

On Wednesday, April 26, 2023 at 6:16:14 PM UTC+1, Terje Mathisen wrote:
> luke.l...@gmail.com wrote:
> > while (i<n) {
> > // skip up to first max
> > while (i<n && a[i]<=m) i++;
> > // continue as long as picking new m
> > while (i<n && a[i]>m) {
> > m = a[i];
> > nm = i;
> > i++;
> I think your code looks good.

thanks for checking, Terje.

i was able to use a cheat of SVP64 which uses
a scalar as an "accumulator":

sv.max. *1, *1, *0

which loop-unrolls as:

for i in range(VL):
GPR(1+i) = MAX(GPR(1+i), GPR(0+i)
CR[1+i].GT = 1 if MAX was true else 0

which, with a little thought, you should spot that that
cascades through to the last element as the biggest
number.

so not only do you get the last entry in the Vector set to
the maximum, you also get an "Audit Trail" in the
Vector of Condition Register Fields of when a max
was detected.

and *that* you can then use to grab the index of the
last-successful MAX-was-actually-greater.

> If we want to min-max optimize for minimum time on maximally bad input,
> then another algorithm is probably needed.

yyeah i added a Parallel Reduction Schedule into Simple-V,
which performs a... damn there's a word for it - "work-priority"?
more efficient rather than the low-latency one which does
duplicate work in some cases.

anyway, if you *only* wanted the mix/max of a vector, then
a Parallel Reduction would be the obvious choice.

but finding the index? that's tricky. i'm still thinking about it.

l.

Re: VVM question

<50ca4301-949b-4c03-972f-7e710c86bd15n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31885&group=comp.arch#31885

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1194:b0:3e9:9419:b153 with SMTP id m20-20020a05622a119400b003e99419b153mr8334798qtk.0.1682531841095;
Wed, 26 Apr 2023 10:57:21 -0700 (PDT)
X-Received: by 2002:a05:6870:6588:b0:187:7f29:c1 with SMTP id
fp8-20020a056870658800b001877f2900c1mr1312345oab.0.1682531840849; Wed, 26 Apr
2023 10:57:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Apr 2023 10:57:20 -0700 (PDT)
In-Reply-To: <1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:b85b:1a81:8e02:b63a;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:b85b:1a81:8e02:b63a
References: <sftuaa$but$1@newsreader4.netcologne.de> <5fd4c976-d72c-46f3-9fb4-584e72b628a2n@googlegroups.com>
<sfvckb$bok$2@newsreader4.netcologne.de> <sg0ctf$qoj$1@dont-email.me>
<2021Aug23.172406@mips.complang.tuwien.ac.at> <sg27qb$2lv$1@gioia.aioe.org> <1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <50ca4301-949b-4c03-972f-7e710c86bd15n@googlegroups.com>
Subject: Re: VVM question
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Wed, 26 Apr 2023 17:57:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2940
 by: MitchAlsup - Wed, 26 Apr 2023 17:57 UTC

On Wednesday, April 26, 2023 at 10:51:28 AM UTC-5, luke.l...@gmail.com wrote:
> On Tuesday, August 24, 2021 at 8:41:02 AM UTC+1, Terje Mathisen wrote:

> while (i<n) {
> // skip up to first max
> while (i<n && a[i]<=m) i++;
> // continue as long as picking new m
> while (i<n && a[i]>m) {
> m = a[i];
> nm = i;
> i++;
> }
> }
<
The best VVM code would be:
for( i = 1, m = a[0], nm = 0; i < max; i++ )
if( a[i] >= m )
m = a[i], nm = i;
<
Compiling into:
<
MOV Ri,#1
LDD Rm,[Ra]
MOV Rnm,#0
VEC Rt,{}
LDD Rai,[Ra,Ri<<3]
FCMP Rs,Rai,Rm
PGE Rs,TT
MOV Rm,Rai
MOV Rnm,Ri
LOOP LE,Ri,#1,Rmax
<
Since this is a thread on VVM...............
<
The loop can run as wide as the cache port, starting K new LDDs
every cycle. {where K is 2 or 4 or 8 depending on the width of the
cache port(s)}
<
When a new maximum is found, there may be a 1-to-(K-1)-cycle
hiccup in the loop timing (depending on available resources and
strings of new maxima.) {So, if you run into one new maximum
there is a 1-cycle hiccup, but if you run into 7 successive new
maxima there is a 7-cycle hiccup.}
<
So, while your code looks like it will do what you want; the target
ISA is what is driving you to excess expression complexity.

Re: VVM question

<e1a9173f-c2c7-4ee6-a454-f605ccca14e7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31887&group=comp.arch#31887

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ae9:e70f:0:b0:74e:2894:7eb2 with SMTP id m15-20020ae9e70f000000b0074e28947eb2mr3350318qka.12.1682533713784;
Wed, 26 Apr 2023 11:28:33 -0700 (PDT)
X-Received: by 2002:a9d:4c84:0:b0:6a5:ea63:b9f3 with SMTP id
m4-20020a9d4c84000000b006a5ea63b9f3mr7017255otf.4.1682533713541; Wed, 26 Apr
2023 11:28:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Wed, 26 Apr 2023 11:28:33 -0700 (PDT)
In-Reply-To: <50ca4301-949b-4c03-972f-7e710c86bd15n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=92.19.80.230; posting-account=soFpvwoAAADIBXOYOBcm_mixNPAaxW9p
NNTP-Posting-Host: 92.19.80.230
References: <sftuaa$but$1@newsreader4.netcologne.de> <5fd4c976-d72c-46f3-9fb4-584e72b628a2n@googlegroups.com>
<sfvckb$bok$2@newsreader4.netcologne.de> <sg0ctf$qoj$1@dont-email.me>
<2021Aug23.172406@mips.complang.tuwien.ac.at> <sg27qb$2lv$1@gioia.aioe.org>
<1eca6f08-29fe-4513-b940-0c7226689533n@googlegroups.com> <50ca4301-949b-4c03-972f-7e710c86bd15n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e1a9173f-c2c7-4ee6-a454-f605ccca14e7n@googlegroups.com>
Subject: Re: VVM question
From: luke.lei...@gmail.com (luke.l...@gmail.com)
Injection-Date: Wed, 26 Apr 2023 18:28:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2801
 by: luke.l...@gmail.com - Wed, 26 Apr 2023 18:28 UTC

On Wednesday, April 26, 2023 at 6:57:22 PM UTC+1, MitchAlsup wrote:

> The best VVM code would be:
> for( i = 1, m = a[0], nm = 0; i < max; i++ )
> if( a[i] >= m )
> m = a[i], nm = i;

relying on the scalar-autovectorisation from hazard identification, yes.

> Since this is a thread on VVM...............

yippeee :)

> <
> The loop can run as wide as the cache port, starting K new LDDs
> every cycle. {where K is 2 or 4 or 8 depending on the width of the
> cache port(s)}

multi-issue (OoO) speculative LDs, yes.

> <
> When a new maximum is found, there may be a 1-to-(K-1)-cycle
> hiccup in the loop timing (depending on available resources and
> strings of new maxima.) {So, if you run into one new maximum
> there is a 1-cycle hiccup, but if you run into 7 successive new
> maxima there is a 7-cycle hiccup.}

yes, this was the issue i ran smack into with an early version
of an algorithm, the amount of parallelism is data-dependent.

> So, while your code looks like it will do what you want; the target
> ISA is what is driving you to excess expression complexity.

SVP64 Vertical-First could achieve the same simplicity, i wanted
to see if there was a parallel-processing way, exploiting the
Horizontal-First mode.

l.

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor