From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 100067] [OpenCL] const int in argument list crashes build Date: Thu, 23 Mar 2017 18:10:17 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0464138305==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ECFF6EB03 for ; Thu, 23 Mar 2017 18:10:17 +0000 (UTC) In-Reply-To: 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 --===============0464138305== Content-Type: multipart/alternative; boundary="14902926171.cFAdf.3528"; charset="UTF-8" --14902926171.cFAdf.3528 Date: Thu, 23 Mar 2017 18:10:17 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D100067 --- Comment #6 from Vedran Mileti=C4=87 --- (In reply to Mig from comment #5) > minimal.cpp compiled with >=20 > gcc -c minimal.cpp -g -o minimal.o >=20 > [miguel@antergos-mig extra]$ gdb > GNU gdb (GDB) 7.12.1 > Copyright (C) 2017 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-pc-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > . > Find the GDB manual and other documentation resources online at: > . > For help, type "help". > Type "apropos word" to search for commands related to "word". > (gdb) file ./minimal > Reading symbols from ./minimal...done. > (gdb) b 20 > Breakpoint 1 at 0x400cee: file minimal.cpp, line 20. > (gdb) run > Starting program: > /home/miguel/Dokumente/OpenCLExamples/myGEMM-master/extra/minimal=20 > >>> Initializing OpenCL... > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/usr/lib/libthread_db.so.1". > [New Thread 0x7fffef7f8700 (LWP 3517)] > [New Thread 0x7fffeedf2700 (LWP 3518)] > [New Thread 0x7fffee5f1700 (LWP 3519)] > [New Thread 0x7fffeddf0700 (LWP 3520)] > [New Thread 0x7fffed5ef700 (LWP 3521)] > % Device: AMD TONGA (DRM 3.9.0 / 4.10.4-1-ARCH, LLVM 3.9.1), 2046.3 MiB > memory, max allocation 1432.4 MiB, driver 17.0.1 >=20 > Thread 1 "minimal" received signal SIGSEGV, Segmentation fault. > 0x00007ffff2b9eb18 in > llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) const () > from /usr/lib/libLLVM-3.9.so > (gdb) >=20 >=20 I need backtrace here (command bt). > Also when I compile minimal.cl with=20 > clang -x cl -target amdgcn-- -mcpu=3Dtonga > -Dcl_clang_storage_class_specifiers=3D1 -Xclang -mlink-bitcode-file -Xcla= ng > /usr/local/lib/clc/tonga-amdgcn--.bc -I/usr/local/include/clc -include > /usr/local/include/clc/clc.h minimal.cl > '+fp64-fp16-denormals' is not a recognized feature for this target (ignor= ing > feature) > '+fp64-fp16-denormals' is not a recognized feature for this target (ignor= ing > feature) Not really a problem, it's being ignored. > minimal.cl:2:15: error: unsupported call to function get_global_id.3 > __kernel void myGEMM1(const int M,=20 > ^ > minimal.cl:2:15: error: unsupported call to function get_global_id.3 Could it be the same thing as bug 99856? > clang-3.9: > /home/miguel/Downloads/llvm-3.9.1.src/lib/Target/AMDGPU/SIInstrInfo.cpp:2= 428: > void llvm::SIInstrInfo::legalizeOperands(llvm::MachineInstr&) const: > Assertion `MBB.getParent()->getSubtarget().getGeneration() < > SISubtarget::VOLCANIC_ISLANDS && "FIXME: Need to emit flat atomics here"' > failed. This should be fixed (worked around, to be precise) in LLVM 4.0. > #0 0x00007efe68ec1662 llvm::sys::PrintStackTrace(llvm::raw_ostream&) > /home/miguel/Downloads/llvm-3.9.1.src/lib/Support/Unix/Signals.inc:402:0 >=20 > ... >=20 > I get errors. --=20 You are receiving this mail because: You are the assignee for the bug.= --14902926171.cFAdf.3528 Date: Thu, 23 Mar 2017 18:10:17 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 6 on bug 10006= 7 from Vedran Mileti=C4=87
(In reply to Mig from =
comment #5)
> minimal.cpp compiled with
>=20
> gcc -c minimal.cpp -g   -o minimal.o
>=20
> [miguel@antergos-mig extra]$ gdb
> GNU gdb (GDB) 7.12.1
> Copyright (C) 2017 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show=
 copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-pc-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.o=
rg/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://=
www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "=
word".
> (gdb) file ./minimal
> Reading symbols from ./minimal...done.
> (gdb) b 20
> Breakpoint 1 at 0x400cee: file minimal.cpp, line 20.
> (gdb) run
> Starting program:
> /home/miguel/Dokumente/OpenCLExamples/myGEMM-master/extra/minimal=20
> >>> Initializing OpenCL...
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/usr/lib/libthread_db.so.1".
> [New Thread 0x7fffef7f8700 (LWP 3517)]
> [New Thread 0x7fffeedf2700 (LWP 3518)]
> [New Thread 0x7fffee5f1700 (LWP 3519)]
> [New Thread 0x7fffeddf0700 (LWP 3520)]
> [New Thread 0x7fffed5ef700 (LWP 3521)]
> % Device: AMD TONGA (DRM 3.9.0 / 4.10.4-1-ARCH, LLVM 3.9.1), 2046.3 MiB
> memory, max allocation 1432.4 MiB, driver  17.0.1
>=20
> Thread 1 "minimal" received signal SIGSEGV, Segmentation fau=
lt.
> 0x00007ffff2b9eb18 in
> llvm::SIInstrInfo::getInstSizeInBytes(llvm::MachineInstr const&) c=
onst ()
>    from /usr/lib/libLLVM-3.9.so
> (gdb)
>=20
> 

I need backtrace here (command bt).

> Also when I compile minimal.cl with=20
> clang -x cl -target amdgcn-- -mcpu=3Dtonga
> -Dcl_clang_storage_class_specifiers=3D1 -Xclang -mlink-bitcode-file -X=
clang
> /usr/local/lib/clc/tonga-amdgcn--.bc -I/usr/local/include/clc -include
> /usr/local/include/clc/clc.h minimal.cl
> '+fp64-fp16-denormals' is not a recognized feature for this target (ig=
noring
> feature)
> '+fp64-fp16-denormals' is not a recognized feature for this target (ig=
noring
> feature)

Not really a problem, it's being ignored.

> minimal.cl:2:15: error: unsupported call to func=
tion get_global_id.3
> __kernel void myGEMM1(const int M,=20
>               ^
> minimal.cl:2:15: error: unsupported call to function get_global_id.3

Could it be the same thing as bug 99856?

> clang-3.9:
> /home/miguel/Downloads/llvm-3.9.1.src/lib/Target/AMDGPU/SIInstrInfo.cp=
p:2428:
> void llvm::SIInstrInfo::legalizeOperands(llvm::MachineInstr&) cons=
t:
> Assertion `MBB.getParent()->getSubtarget<SISubtarget>().getGe=
neration() <
> SISubtarget::VOLCANIC_ISLANDS && "FIXME: Need to emit fla=
t atomics here"'
> failed.

This should be fixed (worked around, to be precise) in LLVM 4.0.

> #0 0x00007efe68ec1662 llvm::sys::PrintStackTrace=
(llvm::raw_ostream&)
> /home/miguel/Downloads/llvm-3.9.1.src/lib/Support/Unix/Signals.inc:402=
:0
>=20
> ...
>=20
> I get errors.


You are receiving this mail because:
  • You are the assignee for the bug.
= --14902926171.cFAdf.3528-- --===============0464138305== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0464138305==--