9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@iitbombay.org>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Drawterm GPU (was: Software philosophy)
Date: Sun, 22 Aug 2021 21:13:53 -0700	[thread overview]
Message-ID: <1007A30B-A109-41BA-BD4A-FF06AED8DFEC@iitbombay.org> (raw)
In-Reply-To: <CA+POUVh6cfFN08i6ReoCi7f1-6P9bw8-Jd4oYirdgYztzv4LVw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6071 bytes --]

Don't high end GPUs have thousands of "cores"? Even high end CPUs don't have more than a few dozen cores to 128 or so. While each kind's cores are very different, seems to me GPU/CPU paths have diverged for good. Or we need some massive shift in programming languages + compilers. I lack imagination how. Still, the thought of the CPUs gaining the complexity of the graphics engine scares me!

-- Bakul

> On Aug 22, 2021, at 12:09 PM, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
> 
> I'm pretty sure we're still re-inventing, though it's the CPU's turn to gain some of the complexity of the graphics engine.
> 
> Paul
> 
> On Sun, Aug 22, 2021, 12:05 PM Bakul Shah <bakul@iitbombay.org <mailto:bakul@iitbombay.org>> wrote:
> Thanks. Looks like Sutherland's "Wheel of Reincarnation <https://www2.cs.arizona.edu/~cscheid/reading/myer-sutherland-design-of-display-processors.pdf>" has not only stopped but exploded :-) Or stopped being applicable.
> 
> -- Bakul
> 
>> On Aug 22, 2021, at 9:23 AM, Paul Lalonde <paul.a.lalonde@gmail.com <mailto:paul.a.lalonde@gmail.com>> wrote:
>> 
>> It got complicated because there's no stable interface or ISA.  The hardware evolved from fixed-function to programmable in a commercial environment where the only meaningful measure was raw performance per dollar at many price points.  Every year the hardware spins and becomes more performant, usually faster than Moore's law.  With 3D APIs hiding the hardware details there is no pressure to make the hardware interface uniform, pretty, or neat.  And with the need for performance there are dozens of fixed function units that effectively need their own sub-drivers while coordinating at high performance with the other units. 
>> The system diagrams for GPUs look complex, but they are radical simplifications of what's really on the inside.
>> 
>> Intel really pioneered the open driver stacks, but performance generally wasn't there.  That might be changing now, but I don't know if their recently announced discrete product line will be driver-compatible.
>> 
>> Paul
>> 
>> 
>> On Sun, Aug 22, 2021 at 8:48 AM Bakul Shah <bakul@iitbombay.org <mailto:bakul@iitbombay.org>> wrote:
>> The FreeBSD amdgpu.ko is over 3Mbytes of compiled code. Not counting the "firmware" that gets loaded on the GPU board. drm/amd/amdgpu has 200K+ lines of source code. drm/amd over 2M lines of code. Intel's i915 seems to be about 1/10th the amd size. AIUI, this is linux GPU driver code, more or less unchanged (FreeBSD has shim code to use it). How did the interface to an SIMD processor get so complicated?
>> 
>>> On Aug 22, 2021, at 6:44 AM, Paul Lalonde <paul.a.lalonde@gmail.com <mailto:paul.a.lalonde@gmail.com>> wrote:
>>> 
>>> I'd love to see  GPU support for Plan9.  This discussion falls right into my professional capacity.  I'll say that people generally *grossly* underestimate the complexity of a modern GPU and of its supporting software stack.  The GPU driver is effectively a second operating system with shared memory and DMA interfaces to the host.  Even bringing up a modern GPU for just compute tasks is a very large endeavour.
>>> 
>>> That being said, if you want real hardware support, the best place to start is currently AMD's open-source stack.  Ignoring the Vulkan bit, understanding their platform abstraction layer (PAL) and shader ISA (https://developer.amd.com/wp-content/resources/Vega_Shader_ISA_28July2017.pdf <https://developer.amd.com/wp-content/resources/Vega_Shader_ISA_28July2017.pdf>) is the base.  The lower hardware levels are reasonably well-described in linux's libdrm and its AMD support in amdgpu.
>>> 
>>> Opinions on how to bring this to Plan9?  I don't really have any - it's a huge pile of work with minimal benefit.  If you're looking for lightweight graphics, WebGL is a doable path, and almost certainly the right way to experiment with Plan9-like interfaces to graphics hardware.
>>> 
>>> Paul
>>> 
>>> 
>>> 
>>> On Sun, Aug 22, 2021 at 5:30 AM sirjofri <sirjofri+ml-9fans@sirjofri.de <mailto:sirjofri%2Bml-9fans@sirjofri.de>> wrote:
>>> 
>>> 22.08.2021 14:10:20 Stuart Morrow <morrow.stuart@gmail.com <mailto:morrow.stuart@gmail.com>>:
>>> > Also:
>>> >> people have discussed that for years
>>> >
>>> > They have?  I mean I might have seen occasionally someone vaguely
>>> > going "some sort of GPU support would be cool to have".  That isn't
>>> > discussion.
>>> 
>>> I've even heard of someone actually making GPU stuff work on plan 9. I've 
>>> only heard from their partner, who made a cute glenda thing on a piece of 
>>> cloth. I chatted with her a little and told her she should encourage her 
>>> partner for some discussion about this in our channels. It looked like 
>>> it's some academic work, but I don't know any details about it.
>>> 
>>> Worst case, someone already has a proper and good GPU implementation for 
>>> Plan 9 and nobody knows about it.
>>> 
>>> sirjofri
>>> 
>>> Btw if the said person reads this: it would be nice to learn some 
>>> details.
>>> 
>>> ------------------------------------------
>>> 9fans: 9fans
>>> Permalink: https://9fans.topicbox.com/groups/9fans/Tad29bfc223dc4fbe-Md3d5cd693c12f948ad4720bc <https://9fans.topicbox.com/groups/9fans/Tad29bfc223dc4fbe-Md3d5cd693c12f948ad4720bc>
>>> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription <https://9fans.topicbox.com/groups/9fans/subscription>
>> 
>> 
>> 
>> -- Bakul
>> 
> 
> 9fans <https://9fans.topicbox.com/latest> / 9fans / see discussions <https://9fans.topicbox.com/groups/9fans> + participants <https://9fans.topicbox.com/groups/9fans/members> + delivery options <https://9fans.topicbox.com/groups/9fans/subscription>Permalink <https://9fans.topicbox.com/groups/9fans/Tad29bfc223dc4fbe-M6309d0d2644e0651e74b9901>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tad29bfc223dc4fbe-Me78513510ae4df2da186c73a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 9424 bytes --]

  reply	other threads:[~2021-08-23  4:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 12:10 Stuart Morrow
2021-08-22 12:29 ` sirjofri
2021-08-22 13:44   ` Paul Lalonde
2021-08-22 13:53     ` Eli Cohen
2021-09-01  0:29       ` kokamoto
2021-09-01  7:35         ` sirjofri
2021-09-02  5:01           ` kokamoto
2021-09-02  5:21             ` Eli Cohen
2021-09-03 23:06               ` kokamoto
2021-08-22 14:57     ` sirjofri
2021-08-22 16:45       ` ori
2021-08-22 15:47     ` Bakul Shah
2021-08-22 16:23       ` Paul Lalonde
2021-08-22 19:04         ` Bakul Shah
2021-08-22 19:09           ` Paul Lalonde
2021-08-23  4:13             ` Bakul Shah [this message]
2021-08-23  5:23               ` sirjofri
2021-08-22 16:41     ` ori
2021-08-22 17:29       ` sirjofri
2021-08-22 18:25         ` ori
2021-08-22 18:50           ` sirjofri
2021-09-24  1:50             ` Frank D. Engel, Jr.
2021-08-22 21:10           ` Philip Silva via 9fans
  -- strict thread matches above, loose matches on Subject: below --
2021-08-18 22:00 [9fans] Software philosophy Eli Cohen
2021-08-22  2:46 ` kokamoto
2021-08-22  3:16   ` Eli Cohen
2021-08-22  7:07     ` [9fans] Drawterm GPU (was: Software philosophy) sirjofri
2021-08-22 10:04       ` Frank D. Engel, Jr.
2021-08-22 11:49         ` sirjofri
2021-08-22 12:24           ` Chris McGee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1007A30B-A109-41BA-BD4A-FF06AED8DFEC@iitbombay.org \
    --to=bakul@iitbombay.org \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).