From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 82717] New: OpenCL support for mandelbulber-opencl Date: Sun, 17 Aug 2014 00:56:08 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1004434515==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A56D6E26E for ; Sat, 16 Aug 2014 17:56:08 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1004434515== Content-Type: multipart/alternative; boundary="1408236968.756708F0.29074"; charset="us-ascii" --1408236968.756708F0.29074 Date: Sun, 17 Aug 2014 00:56:08 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D82717 Priority: medium Bug ID: 82717 Assignee: dri-devel@lists.freedesktop.org Summary: OpenCL support for mandelbulber-opencl Severity: normal Classification: Unclassified OS: All Reporter: haagch@frickel.club Hardware: Other Status: NEW Version: git Component: Drivers/Gallium/radeonsi Product: Mesa Website of the program here: https://sites.google.com/site/mandelbulber/ (W= atch out, it uses a weird install script) Start it, go to the OpenCL tab and try to enable OpenCL. A few things that probably need to be addressed. I applied some workarounds= to see them all and I don't even know if the OpenCL programs would work after removing all of that stuff. Problem 1: OpenCL Build log: ERROR: Program::build() (-43) That's because of the build paramater -cl-denorms-are-zero that is hardcode= d in the source code of mandelbulber. Workarodund 1: sed -i 's/-cl-denorms-are-zero / /g' src/cl_support.cpp Problem 2: OpenCL Build log: input.cl:34:1: error: OpenCL does not support the 'static' storage class specifier So that's not valid in OpenCL 1.1, but for the sake of getting it to "just compile" at least: Workaround 2: for i in /usr/share/mandelbulber/cl/*; do sed -i "s/static //g" $i; done Problem 3: OpenCL Build log: input.cl:323:10: error: cannot combine with previous 'type-name' declaration specifier input.cl:323:15: error: expected identifier or '(' input.cl:324:8: error: expected identifier or '(' input.cl:325:32: error: expected expression =EF=BF=BD (WTF is random binary data doing here?) That's a weird one that seems to come from whatever clang does. I think cla= ng thinks that "half" is already defined in the OpenCL kernels. Not sure if th= is is intended. Workaround 3: for i in /usr/share/mandelbulber/cl/*; do sed -i "s/half /halfFOO /g" $i; d= one for i in /usr/share/mandelbulber/cl/*; do sed -i "s/half)/halfFOO)/g" $i; d= one Problem 4: OpenCL Build log: =EF=BF=BD}=EF=BF=BD OpenCL program built done OpenCL kernel opened OpenCL workgroup size: 256 OpenCL Job size: 480256 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc I don't think the crash itself is the fault of mesa opencl, because the backtrace looks like this: #0 0x00007fd1154e2d67 in raise () from /usr/lib/libc.so.6 #1 0x00007fd1154e4118 in abort () from /usr/lib/libc.so.6 #2 0x00007fd115dd81f5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #3 0x00007fd115dd6076 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007fd115dd60c1 in std::terminate() () from /usr/lib/libstdc++.so.6 #5 0x00007fd115dd62d8 in __cxa_throw () from /usr/lib/libstdc++.so.6 #6 0x00007fd115dd6869 in operator new(unsigned long) () from /usr/lib/libstdc++.so.6 #7 0x00007fd115dd68c9 in operator new[](unsigned long) () from /usr/lib/libstdc++.so.6 #8 0x00000000004a3683 in CclSupport::InitFractal (this=3D0x207e200) at ../src/cl_support.cpp:451 #9 0x000000000042cffb in ChangedOpenClEnabled (widget=3D0x22bdd60, data=3D= 0x0) at ../src/callbacks.cpp:2896 #10 0x00007fd11673b3d8 in g_closure_invoke () from /usr/lib/libgobject-2.0.= so.0 #11 0x00007fd11674cd5d in ?? () from /usr/lib/libgobject-2.0.so.0 But why is there random binary data in the OpenCL build log? llvm-svn 215809 libclc-git 165.20140816 opencl-headers12 1:1.2.r26859 (not sure if relevant) mesa git from today radeon 7970M pitcairn --=20 You are receiving this mail because: You are the assignee for the bug. --1408236968.756708F0.29074 Date: Sun, 17 Aug 2014 00:56:08 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Priority medium
Bug ID 82717
Assignee dri-devel@lists.freedesktop.org
Summary OpenCL support for mandelbulber-opencl
Severity normal
Classification Unclassified
OS All
Reporter haagch@frickel.club
Hardware Other
Status NEW
Version git
Component Drivers/Gallium/radeonsi
Product Mesa

Website of the program here: https://sites.google.com/site/mandelbulber/ (Wat=
ch
out, it uses a weird install script)

Start it, go to the OpenCL tab and try to enable OpenCL.

A few things that probably need to be addressed. I applied some workarounds=
 to
see them all and I don't even know if the OpenCL programs would work after
removing all of that stuff.


Problem 1:
OpenCL Build log:
ERROR: Program::build() (-43)

That's because of the build paramater -cl-denorms-are-zero that is hardcode=
d in
the source code of mandelbulber.

Workarodund 1:
sed -i 's/-cl-denorms-are-zero / /g' src/cl_support.cpp


Problem 2:
OpenCL Build log:       input.cl:34:1: error: OpenCL does not support the
'static' storage class specifier

So that's not valid in OpenCL 1.1, but for the sake of getting it to "=
just
compile" at least:

Workaround 2:
for i in /usr/share/mandelbulber/cl/*; do sed -i "s/static //g" $=
i; done


Problem 3:
OpenCL Build log:       input.cl:323:10: error: cannot combine with previous
'type-name' declaration specifier
input.cl:323:15: error: expected identifier or '('
input.cl:324:8: error: expected identifier or '('
input.cl:325:32: error: expected expression
=EF=BF=BD

(WTF is random binary data doing here?)

That's a weird one that seems to come from whatever clang does. I think cla=
ng
thinks that "half" is already defined in the OpenCL kernels. Not =
sure if this
is intended.

Workaround 3:
for i in /usr/share/mandelbulber/cl/*; do sed -i "s/half /halfFOO /g&q=
uot; $i; done
for i in /usr/share/mandelbulber/cl/*; do sed -i "s/half)/halfFOO)/g&q=
uot; $i; done


Problem 4:
OpenCL Build log:       =EF=BF=BD}=EF=BF=BD
OpenCL program built done
OpenCL kernel opened
OpenCL workgroup size: 256
OpenCL Job size: 480256
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

I don't think the crash itself is the fault of mesa opencl, because the
backtrace looks like this:

#0  0x00007fd1154e2d67 in raise () from /usr/lib/libc.so.6
#1  0x00007fd1154e4118 in abort () from /usr/lib/libc.so.6
#2  0x00007fd115dd81f5 in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib/libstdc++.so.6
#3  0x00007fd115dd6076 in ?? () from /usr/lib/libstdc++.so.6
#4  0x00007fd115dd60c1 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007fd115dd62d8 in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x00007fd115dd6869 in operator new(unsigned long) () from
/usr/lib/libstdc++.so.6
#7  0x00007fd115dd68c9 in operator new[](unsigned long) () from
/usr/lib/libstdc++.so.6
#8  0x00000000004a3683 in CclSupport::InitFractal (this=3D0x207e200) at
../src/cl_support.cpp:451
#9  0x000000000042cffb in ChangedOpenClEnabled (widget=3D0x22bdd60, data=3D=
0x0) at
../src/callbacks.cpp:2896
#10 0x00007fd11673b3d8 in g_closure_invoke () from /usr/lib/libgobject-2.0.=
so.0
#11 0x00007fd11674cd5d in ?? () from /usr/lib/libgobject-2.0.so.0

But why is there random binary data in the OpenCL build log?

llvm-svn 215809
libclc-git 165.20140816
opencl-headers12 1:1.2.r26859 (not sure if relevant)
mesa git from today

radeon 7970M pitcairn


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1408236968.756708F0.29074-- --===============1004434515== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1004434515==--