[llvm-dev] Should we have a "GPU working group"?

Jason Eckhardt via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 11 12:15:40 PST 2021


Hi Min-Yih,

Regarding public works about global instruction scheduling-- the literature is vast, spanning decades. To avoid hijacking the thread, I'll mention just a few threads one can pull on-- works that are relatively well-known and range from minimally aggressive and simple to much more aggressive and complex: Berstein and Rodeh (PLDI '91), extended- and super-block scheduilng, hyperblock scheduling, wave front scheduling (JILP 2000), and others. See also gcc's fairly aggressive "selective scheduling" for actual source code. We are one of the very few production compilers on the planet without a global scheduler (at least not in tree). Moreover, because of the desire to be JIT friendly, there is a tension between scheduling complexity and compile time, so that one size does not fit all (or configurability/budgeting must be built in).

________________________________
From: Min-Yih Hsu <minyihh at uci.edu>
Sent: Thursday, November 11, 2021 12:58 PM
To: Jason Eckhardt <jeckhardt at nvidia.com>
Cc: Valentin Churavy <v.churavy at gmail.com>; Lei Zhang <antiagainst at google.com>; Lieberman, Ron <Ron.Lieberman at amd.com>; justin.lebar at gmail.com <justin.lebar at gmail.com>; Chesterfield, Jonathan <Jonathan.Chesterfield at amd.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>; tianshilei1992 at gmail.com <tianshilei1992 at gmail.com>; Rodgers, Gregory <Gregory.Rodgers at amd.com>; Huber, Joseph <huberjn at ornl.gov>; Narayanaswamy, Ravi <ravi.narayanaswamy at intel.com>
Subject: Re: [llvm-dev] Should we have a "GPU working group"?

External email: Use caution opening links or attachments



On Nov 11, 2021, at 10:22 AM, Jason Eckhardt via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:

+1 here as well, even if in lurk mode initially.

Some additional topics of interest:

  1.  Occupancy vs resource trade-offs (especially registers). Requires closer coordination of scheduling + register allocation, in addition to extensions in each.
  2.  Divergence analysis/uniformity analysis. Applications to sync insertion, scalar vs vector register allocation, instruction selection, etc.
  3.  Synchronization insertion. Some GPUs have instructions to hint where a good re-convergence point is.
  4.  Global instruction scheduling. Some GPU code is surprisingly branchy. Numerous out-of-tree/proprietary global schedulers have been written, we still don't have one upstream.

I’m interested on this. Can you list some (public available) works?


  1.  Increasing overall back-end speed for JIT compilation. GPU back-ends are often situated within graphics drivers where they dynamically compile shaders with absurdly stringent timing constraints. GlobalISel is a step in the right direction, but more needs doing (particularly for small shaders).

This brings benefits to a wider community so I’m definitely +1 on it.
Also, I believe there are some ongoing efforts on porting codegen pipeline to use the new PassManager. Which has the potential to speed up the compilation speed.

As an example, #1 is handled (if at all) specially by each target. With the proliferation of GPUs (Teams Red, Green, Blue, and others), it would be useful for "all boats to float higher" with generic code (with target-specific hooks/overrides) supported by the wider community as opposed to redundant re-invention of the wheel (or no wheel at all, as in #4). Then specific targets can expend effort adding value for their particular needs.

________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces at lists.llvm.org>> on behalf of Lei Zhang via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>>
Sent: Thursday, November 11, 2021 9:44 AM
To: Valentin Churavy <v.churavy at gmail.com<mailto:v.churavy at gmail.com>>
Cc: Lieberman, Ron <Ron.Lieberman at amd.com<mailto:Ron.Lieberman at amd.com>>; justin.lebar at gmail.com<mailto:justin.lebar at gmail.com> <justin.lebar at gmail.com<mailto:justin.lebar at gmail.com>>; Chesterfield, Jonathan <Jonathan.Chesterfield at amd.com<mailto:Jonathan.Chesterfield at amd.com>>; llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>>; tianshilei1992 at gmail.com<mailto:tianshilei1992 at gmail.com> <tianshilei1992 at gmail.com<mailto:tianshilei1992 at gmail.com>>; Rodgers, Gregory <Gregory.Rodgers at amd.com<mailto:Gregory.Rodgers at amd.com>>; Huber, Joseph <huberjn at ornl.gov<mailto:huberjn at ornl.gov>>; Narayanaswamy, Ravi <ravi.narayanaswamy at intel.com<mailto:ravi.narayanaswamy at intel.com>>
Subject: Re: [llvm-dev] Should we have a "GPU working group"?

External email: Use caution opening links or attachments

+1. There are certainly efforts that need broad collaboration among various interest parties; they would benefit from more interactive discussions to have everybody on the same page. What immediately jumps into my mind include how we can push to have unified/better SPIR-V support in LLVM proper / cross LLVM/MLIR, etc. It's a big one that I'd assume will take a long time to unfold and will have back and forth. Having a place to discuss will actually make sure we put efforts towards it (or at least have plans and revisit periodically). There are certainly many other topics to discuss too, as said by Johannes. I think this is a great idea.

Thanks,
Lei


On Wed, Nov 10, 2021 at 4:03 PM Valentin Churavy via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
I would certainly be interested in joining such an effort.

-V

On Wed, Nov 10, 2021 at 3:56 PM Johannes Doerfert via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hey,

We nowadays have various "working groups" that meet regularly to discuss
technical topics (incl. RISC-V, MLIR, OpenMP, Alias Analysis, ML, Flang,
...).
It's a reasonably nice way for people to connect and present ideas, get
feedback, etc. in an interactive environment.
While the OpenMP meeting has a strong emphasis on offloading, we do not
meet to discuss "generic GPU" topics as a community.

This email is to determine if people would be interested in meeting once
every N weeks (initially we could say 2) to coordinate efforts in this
space, e.g., development of GPU-specific optimizations, organization of
driver and backend code, dealing with issues like convergent functions, ...

I CC'ed a bunch of people that might want to join such a meeting but
certainly this is something everyone would be invited to and I hope
people forward this to parties that might not read llvm-dev.

Looking forward to hear what people think :)

~ Johannes




--
───────────────────
∽ Johannes (he/his)

_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=04%7C01%7Cjeckhardt%40nvidia.com%7C18a6be0e6bb4431055ef08d9a54537d0%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637722538989746360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=GcNsQOpX%2FaYz%2Fag36CdlkxX62o5ns1CgaXYiuQZ%2FUDs%3D&reserved=0>
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=04%7C01%7Cjeckhardt%40nvidia.com%7C18a6be0e6bb4431055ef08d9a54537d0%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637722538989746360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=GcNsQOpX%2FaYz%2Fag36CdlkxX62o5ns1CgaXYiuQZ%2FUDs%3D&reserved=0>
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=04%7C01%7Cjeckhardt%40nvidia.com%7C18a6be0e6bb4431055ef08d9a54537d0%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637722538989756360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=iYwlVs4AnTYeyz%2FGhOL34KbS59E9DLB6Ii%2B%2FiBT9Dqs%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211111/58f8596e/attachment.html>


More information about the llvm-dev mailing list