* [Bug 95438] Elemental demo compute shader takes ages to compile
@ 2016-05-17 2:01 bugzilla-daemon
2016-05-17 2:30 ` bugzilla-daemon
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2016-05-17 2:01 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2419 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
Bug ID: 95438
Summary: Elemental demo compute shader takes ages to compile
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: dri-devel@lists.freedesktop.org
Reporter: airlied@freedesktop.org
QA Contact: dri-devel@lists.freedesktop.org
Created attachment 123804
--> https://bugs.freedesktop.org/attachment.cgi?id=123804&action=edit
compute shader and GLSL/TGSI/llvm IR.
After fixing the two GLSL bugs, I hit a case where one of the compute shaders
in
ElementalDemo takes a long long time to compile and consumes a lot of memory
doing so.
#0 llvm::SUnit::addPred (this=this@entry=0x7fa8da02fae0, D=...,
Required=Required@entry=true)
at /home/airlied/devel/llvm/lib/CodeGen/ScheduleDAG.cpp:67
#1 0x00007fa92c946d2d in llvm::ScheduleDAGInstrs::addPhysRegDataDeps
(this=this@entry=0x7fa9248d3840, SU=SU@entry=0x7fa8d9833c40,
OperIdx=OperIdx@entry=8) at
/home/airlied/devel/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:318
#2 0x00007fa92c947198 in llvm::ScheduleDAGInstrs::addPhysRegDeps
(this=this@entry=0x7fa9248d3840, SU=SU@entry=0x7fa8d9833c40,
OperIdx=OperIdx@entry=8) at
/home/airlied/devel/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:370
#3 0x00007fa92c94fd1e in llvm::ScheduleDAGInstrs::buildSchedGraph
(this=this@entry=0x7fa9248d3840, AA=0x7fa8e2e55b10,
RPTracker=RPTracker@entry=0x0, PDiffs=PDiffs@entry=0x0, LIS=LIS@entry=0x0,
TrackLaneMasks=TrackLaneMasks@entry=false)
at /home/airlied/devel/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp:959
#4 0x00007fa92c8ff02b in (anonymous namespace)::SchedulePostRATDList::schedule
(this=this@entry=0x7fa9248d3840)
at /home/airlied/devel/llvm/lib/CodeGen/PostRASchedulerList.cpp:391
#5 0x00007fa92c8ffbbe in (anonymous
namespace)::PostRAScheduler::runOnMachineFunction (this=0x7fa8e284a500, Fn=...)
at /home/airlied/devel/llvm/lib/CodeGen/PostRASchedulerList.cpp:360
#6 0x00007fa92c880721 in llvm::MachineFunctionPass::runOnFunction
(this=0x7fa8e284a500, F=...)
at /home/airlied/devel/llvm/lib/CodeGen/MachineFunctionPass.cpp:60
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 4017 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 95438] Elemental demo compute shader takes ages to compile
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
@ 2016-05-17 2:30 ` bugzilla-daemon
2016-05-17 6:13 ` bugzilla-daemon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2016-05-17 2:30 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
--- Comment #1 from Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> ---
Last I looked at the elemental demo, we have multiple issues:
- The shared array (1024 elements) get wrongly promoted to a private array.
There is a fix for that at
https://lists.freedesktop.org/archives/mesa-dev/2016-April/113832.html
- in radeonsi we compile arrays to vectors with insert/extract element. This
pretty much results in the array being SSA version, which results in a very
large program.
- a 1024 element vector does not fit in 256 VGPR's so LLVM tries to load and
spill around every operation and therefore every versioned array element takes
scratch space.
- As a result I needed 7 MiB of scratch space per wave, or 6,7 GiB in total.
This overflows the 32-bit buffer size and we only allocate a smaller buffer.
- This resulted in hangs (or maybe long long shader execution times, not
really sure...).
So not sure how long a long long time is, last I tried (which admittedly is
some weeks ago) I certainly could get past the compilation stage. If you did
get past that and did not get hangs, I'm not sure why.
Fixing the first problem also circumvents problems 2 & 3, although it would be
nice to get those fixed as well.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2258 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 95438] Elemental demo compute shader takes ages to compile
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
2016-05-17 2:30 ` bugzilla-daemon
@ 2016-05-17 6:13 ` bugzilla-daemon
2016-05-17 6:14 ` bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2016-05-17 6:13 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 317 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
--- Comment #2 from Dave Airlie <airlied@freedesktop.org> ---
https://patchwork.freedesktop.org/patch/82260/
Looks like Bas's patch herre actually fixes this. sorry for the noise.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1166 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 95438] Elemental demo compute shader takes ages to compile
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
2016-05-17 2:30 ` bugzilla-daemon
2016-05-17 6:13 ` bugzilla-daemon
@ 2016-05-17 6:14 ` bugzilla-daemon
2016-05-24 22:28 ` bugzilla-daemon
2017-01-05 17:52 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2016-05-17 6:14 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 298 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
--- Comment #3 from Dave Airlie <airlied@freedesktop.org> ---
with your patch any my two on llvm master and mesa master I'm running
elementaldemo in 4.3 mode now.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1086 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 95438] Elemental demo compute shader takes ages to compile
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
` (2 preceding siblings ...)
2016-05-17 6:14 ` bugzilla-daemon
@ 2016-05-24 22:28 ` bugzilla-daemon
2017-01-05 17:52 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2016-05-24 22:28 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
--- Comment #4 from Marek Olšák <maraeo@gmail.com> ---
(In reply to Dave Airlie from comment #3)
> with your patch any my two on llvm master and mesa master I'm running
> elementaldemo in 4.3 mode now.
So can we close the bug?
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1224 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 95438] Elemental demo compute shader takes ages to compile
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
` (3 preceding siblings ...)
2016-05-24 22:28 ` bugzilla-daemon
@ 2017-01-05 17:52 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-01-05 17:52 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 534 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=95438
Marek Olšák <maraeo@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Marek Olšák <maraeo@gmail.com> ---
Closing as the scratch buffer issue was fixed.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2032 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-05 17:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17 2:01 [Bug 95438] Elemental demo compute shader takes ages to compile bugzilla-daemon
2016-05-17 2:30 ` bugzilla-daemon
2016-05-17 6:13 ` bugzilla-daemon
2016-05-17 6:14 ` bugzilla-daemon
2016-05-24 22:28 ` bugzilla-daemon
2017-01-05 17:52 ` bugzilla-daemon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.