• =?UTF-8?Q?From_short-cut_parallelism_to_true_parallelism_[=cf=80-WA?= =?UTF-8?Q?M_Musings]_=28Re:_pi-WAM_is_just_like_Laika3=2c_the_first_Dog_on_?= =?UTF-8?Q?Mars=29?=

    From Mild Shock@janburse@fastmail.fm to comp.lang.prolog,sci.physics,sci.logic on Thu Aug 27 17:58:53 2026
    From Newsgroup: sci.physics

    Hi,

    The word Musings has a totally new meaning:

    Torbj||rn Lager wrote:
    When

    call(Goal), Self ! Pid-Goal

    succeeds, that top-level goal has completed
    and the actor terminates successfully.

    Ok, I see. I thought it will be automatically
    redone, and thus rapid fire multiple solutions.
    So you have already hardwired a once/1 semantic
    into your spawn/3, in that the spawn/3 goal argument

    when executed, is onced, only looking at its EXIT
    and FAIL port, not calling once more its REDO port.
    This also means that both parallel/1 and
    first_solution/1 have a short-cut AND

    respective OR semantic:

    /* AND-parallelism with short-cut */
    parallel([G1,..,Gn]) <=> once(G1), .., once(G2)

    /* OR-parallelism with short-cut */
    first_solution([G1,..,Gn]) <=> once(G1); ..; once(G2)

    The short-cut is in that parallel/1 can stop
    at the first failure, and that first_solution/1
    can stop at the first success. I wonder whether
    Web Prolog Trinity offers true AND-parallelism or

    true OR-parallelism without a short-cut. Having
    such constructs could be interesting for problem
    solving and is often used parallel search. For
    example SICStus Prolog offers, or offered, true

    OR-parallelism in its Multi-sequential Prolog
    engines (Muse) extension, from the SICS experiments
    in the 1990s with the BNN Butterfly supercomputer
    from the 1980s:

    yes
    | ?- muse_flag(num_workers,_,5).
    | ?- run.
    724 solutions in 2.760 seconds.

    yes
    | ?- muse_flag(num_workers,_,1).
    | ?- run.
    724 solutions in 10.400 seconds.

    https://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_6.html

    The intervention for true OR-paralleism is usually
    at rule choice points. So when you have a set
    of rules, like for example in the case of
    the select/3 predicate:

    select([X|Xs], Xs, X).
    select([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).

    You execute it as:

    select(X, Y, Z) :-
    muse([select1(X,Y,Z), select2(X,Y,Z)]).

    select1([X|Xs], Xs, X).
    select2([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).

    Where the muse meta predicate has true OR parallelism:

    muse([G1,..,Gn]) <=> G1 | .. | Gn

    Bye

    See also:

    The muse approach to Or-parallel prolog https://link.springer.com/article/10.1007/BF01407834

    BBN Butterfly
    https://en.wikipedia.org/wiki/BBN_Butterfly

    P.S.: Maybe this explains my Freundlian slip when
    I expected your parallel/1 to be some OR-parallelism,
    while it is some AND-parallism. The true OR-parallelism

    can be mathematically formalized in logic via
    non-determinism and -C-calculus:

    -C-calculus
    https://ncatlab.org/nlab/show/pi-calculus

    You even donrCOt need actor mailboxes, only channel objects.

    Mild Shock schrieb:
    Hi,

    We recently implemented a parallel -C-WAM
    on a GPU backend and could demonstrate an
    estimated 11.4 Giga Lips. In this post we
    report a further experiment, this time
    presenting a parallel -C-WAM on a CPU backend,
    that can lift specialized Prolog, currently
    to 1.7 Giga Lips performance.

    Having an excess number of threads is a
    bad idea. What if we do context switching
    on our own? With this approach we could
    bring down the execution time of 128 Hack
    VMs by 33%. We estimate for the test which
    had 11.4 GLips on the GPU, that we reach
    1.7 GLips on the CPU.

    Bye

    See also:

    Parallel -C-WAM: 1.7 Giga Lips on a CPU
    https://medium.com/2989/8a984e75af44

    Mild Shock schrieb:
    Hi,

    TSMC's 2nm (N2) node and the 7 GHz target
    represent a monumental milestone in silicon
    manufacturing, shifting away from legacy
    FinFETs to advanced Gate-All-Around (GAA)
    nanosheet transistors.

    This evolution allows chip designersrCoparticularly
    in the PC and AI sectorsrCoto push processor
    clock speeds previously thought impossible
    on standard nodes

    AMD confirms Zen 6 rollout for its July 22 AI event
    https://videocardz.com/newz/amd-confirms-zen-6-launches-in-less-than-two-weeks-starting-with-epyc-venice


    Production of the 6th Gen EPYC family is
    already ramping up. AMD says Venice is its
    first high-performance computing product
    manufactured using TSMCrCOs 2nm process
    technology.

    Bye

    Mild Shock schrieb:
    Hi,

    For marketing purposes people
    typically look at the race towards
    2nm, and we find:

    A month ago, Apple lost its exclusivity
    on 3 nm smartphone processors with
    MediaTekrCOs Dimensity 9400 chip, integrated
    in the Vivo X200 Pro smartphone. Qualcomm
    is also in the race with its recently
    unveiled Snapdragon 8 Elite and set to
    power the Xiaomi 15 Pro in 2025. However,
    Apple should regain its position as innovation
    leader in 2026 with the release of the
    iPhone 18, which should feature the A20
    chip built on TSMCrCOs 2 nm process."

    But there is a vertical vias revolution
    going on as well, some SOCs typically
    being at 18 layers now:

    Zooming Into a CPU (It's Incredible)
    https://www.youtube.com/watch?v=Bez-2cvYja0

    imec has coined the term CMOS 2.0:

    LEUVEN (Belgium), MARCH 12th, 2026 rCo Imec,
    a world-leading research and innovation hub
    in advanced semiconductor technologies, has
    launched a first-of-its-kind consortium with
    26 European university groups that will jointly
    work on the technology roadmap beyond
    CMOS scaling (CMOS 2.0).
    https://www.imec-int.com/en/press/imec-launches-university-consortium-around-next-generation-chips


    So we might see more mobile grade GPUs.

    Bye



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.prolog,sci.physics,sci.logic on Sat Aug 29 03:05:02 2026
    From Newsgroup: sci.physics

    Hi,

    has alreay the meaning of Prolog REPL without
    any actors. Moslikely its a strange view of
    having a WASM somewhere? That does something
    for you? I am really clueless what rCLtoplevelrCY
    should mean.

    I think Erlang is completely dead. And I repeat it.
    What you need to do is go back to WAM. Also state
    charts are dead, WAM has switch instructions, it
    can perfectly do state charts. Scryer Prolog

    made some state chart tests:

    Backtracking DCG vs DFA vs Rational Tree Automaton https://github.com/mthom/scryer-prolog/discussions/3433https://github.com/mthom/scryer-prolog/discussions/3433#discussioncomment-18138834

    What you need to investigate how SWI Prolog
    can become again a WAM Prolog that can generate
    WAM code. And that actors can also exchange
    binary WAM code.

    And spawn/1 will have a parameter to create
    1000 actors or more instantly. And most of all
    donrCOt use the word rCLactorrCY anymore, use the
    word rCLagentrCY. Disclaimer: Of course

    WAM is not the only option here. But in as
    far, it seems am not the only one embracing GPU
    with my -C-WAM for Dogelog Player. Some big
    companies like Palantir use

    GPU for search .filter and aggregation
    .group_by / .agg. Would be nice if one could
    write Prolog, and ship it to a GPU ? What do
    you think, you are at the source of actor

    thinking, and that your brought state charts
    into play makes you destined to have a broad
    horizon that is needed to grok some things related
    to the AI Boom which have nothing to do with LLM:

    result = (
    lf.with_columns(
    (pl.col("a") * pl.col("b")).alias("product"),
    (pl.col("a").pow(2) + pl.col("b").pow(2)).sqrt().alias("norm"),
    )
    .group_by("category")
    .agg(
    pl.col("product").sum().alias("total_product"),
    pl.col("norm").mean().alias("mean_norm"),
    pl.len().alias("n"),
    )
    .sort("total_product", descending=True)
    ) https://www.palantir.com/docs/foundry/transforms-python/advanced-compute#gpu-accelerated-polars-with-cudf

    The speedup for a NIVIDIA B200 is amazing:

    https://docs.rapids.ai/api/cudf/stable/cudf_polars/

    Bye

    Mild Shock schrieb:
    Hi,

    The word Musings has a totally new meaning:

    Torbj||rn Lager wrote:
    When

    call(Goal), Self ! Pid-Goal

    succeeds, that top-level goal has completed
    and the actor terminates successfully.

    Ok, I see. I thought it will be automatically
    redone, and thus rapid fire multiple solutions.
    So you have already hardwired a once/1 semantic
    into your spawn/3, in that the spawn/3 goal argument

    when executed, is onced, only looking at its EXIT
    and FAIL port, not calling once more its REDO port.
    This also means that both parallel/1 and
    first_solution/1 have a short-cut AND

    respective OR semantic:

    /* AND-parallelism with short-cut */
    parallel([G1,..,Gn])-a-a <=>-a-a once(G1), .., once(G2)

    /* OR-parallelism with short-cut */
    first_solution([G1,..,Gn])-a-a <=>-a-a once(G1); ..; once(G2)

    The short-cut is in that parallel/1 can stop
    at the first failure, and that first_solution/1
    can stop at the first success. I wonder whether
    Web Prolog Trinity offers true AND-parallelism or

    true OR-parallelism without a short-cut. Having
    such constructs could be interesting for problem
    solving and is often used parallel search. For
    example SICStus Prolog offers, or offered, true

    OR-parallelism in its Multi-sequential Prolog
    engines (Muse) extension, from the SICS experiments
    in the 1990s with the BNN Butterfly supercomputer
    from the 1980s:

    yes
    | ?- muse_flag(num_workers,_,5).
    | ?- run.
    724 solutions in 2.760 seconds.

    yes
    | ?- muse_flag(num_workers,_,1).
    | ?- run.
    724 solutions in 10.400 seconds.

    https://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_6.html

    The intervention for true OR-paralleism is usually
    at rule choice points. So when you have a set
    of rules, like for example in the case of
    the select/3 predicate:

    select([X|Xs], Xs, X).
    select([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).

    You execute it as:

    select(X, Y, Z) :-
    -a-a-a muse([select1(X,Y,Z), select2(X,Y,Z)]).

    select1([X|Xs], Xs, X).
    select2([Y|Ys], [Y|Zs], X) :- select(Ys, Zs, X).

    Where the muse meta predicate has true OR parallelism:

    muse([G1,..,Gn])-a-a-a <=>-a-a-a G1 | .. | Gn

    Bye

    See also:

    The muse approach to Or-parallel prolog https://link.springer.com/article/10.1007/BF01407834

    BBN Butterfly
    https://en.wikipedia.org/wiki/BBN_Butterfly

    P.S.: Maybe this explains my Freundlian slip when
    I expected your parallel/1 to be some OR-parallelism,
    while it is some AND-parallism. The true OR-parallelism

    can be mathematically formalized in logic via
    non-determinism and -C-calculus:

    -C-calculus
    https://ncatlab.org/nlab/show/pi-calculus

    You even donrCOt need actor mailboxes, only channel objects.

    --- Synchronet 3.22a-Linux NewsLink 1.2