<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [OpenCL] const int in argument list crashes build"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100067#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [OpenCL] const int in argument list crashes build"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100067">bug 100067</a>
from <span class="vcard"><a class="email" href="mailto:vedran@miletic.net" title="Vedran Miletić <vedran@miletic.net>"> <span class="fn">Vedran Miletić</span></a>
</span></b>
<pre>(In reply to Mig from <a href="show_bug.cgi?id=100067#c5">comment #5</a>)
<span class="quote">> minimal.cpp compiled with
>
> gcc -c minimal.cpp -g -o minimal.o
>
> [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 <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>
> 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:
> <<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.
> Find the GDB manual and other documentation resources online at:
> <<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.
> 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
> >>> 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
>
> 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)
>
> </span >
I need backtrace here (command bt).
<span class="quote">> Also when I compile minimal.cl with
> clang -x cl -target amdgcn-- -mcpu=tonga
> -Dcl_clang_storage_class_specifiers=1 -Xclang -mlink-bitcode-file -Xclang
> /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 (ignoring
> feature)
> '+fp64-fp16-denormals' is not a recognized feature for this target (ignoring
> feature)</span >
Not really a problem, it's being ignored.
<span class="quote">> minimal.cl:2:15: error: unsupported call to function get_global_id.3
> __kernel void myGEMM1(const int M,
> ^
> minimal.cl:2:15: error: unsupported call to function get_global_id.3</span >
Could it be the same thing as <a class="bz_bug_link
bz_status_NEW "
title="NEW - OpenCL Hello world returns "unsupported call to function get_local_size""
href="show_bug.cgi?id=99856">bug 99856</a>?
<span class="quote">> clang-3.9:
> /home/miguel/Downloads/llvm-3.9.1.src/lib/Target/AMDGPU/SIInstrInfo.cpp:2428:
> void llvm::SIInstrInfo::legalizeOperands(llvm::MachineInstr&) const:
> Assertion `MBB.getParent()->getSubtarget<SISubtarget>().getGeneration() <
> SISubtarget::VOLCANIC_ISLANDS && "FIXME: Need to emit flat atomics here"'
> failed.</span >
This should be fixed (worked around, to be precise) in LLVM 4.0.
<span class="quote">> #0 0x00007efe68ec1662 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
> /home/miguel/Downloads/llvm-3.9.1.src/lib/Support/Unix/Signals.inc:402:0
>
> ...
>
> I get errors.</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>