https://bugs.freedesktop.org/show_bug.cgi?id=82709
Priority: medium Bug ID: 82709 Assignee: dri-devel@lists.freedesktop.org Summary: OpenCL not working on radeon hainan Severity: normal Classification: Unclassified OS: All Reporter: pali.rohar@gmail.com Hardware: Other Status: NEW Version: git Component: Drivers/Gallium/radeonsi Product: Mesa
OpenCL not working on Radeon HD 8690M card which has Hainan chip.
example hello world application shows this error log:
Build Log: error: unknown target CPU 'hainan'
haagch on #dri-devel suggested me to: $ sudo sed -i "s/tahiti/hainan/" /usr/lib/libMesaOpenCL.so
and after this "fix" I got:
Build Log: fatal error: cannot open file '/usr/lib/clc/hainan-r600--.bc': No such file or directory
After that he suggested me to renaming tahiti-r600--.bc to hainan-r600--.bc which fixed that problem and OpenCL started working.
So problem is probably in clang and libclc -- that there is missing hainan name in cpu table.
https://bugs.freedesktop.org/show_bug.cgi?id=82709
--- Comment #1 from Tom Stellard tstellar@gmail.com --- Created attachment 104915 --> https://bugs.freedesktop.org/attachment.cgi?id=104915&action=edit Work around for missing Hainan in clang
Does it work with this Mesa patch?
https://bugs.freedesktop.org/show_bug.cgi?id=82709
--- Comment #2 from Ilia Mirkin imirkin@alum.mit.edu --- (In reply to comment #1)
Created attachment 104915 [details] [review] Work around for missing Hainan in clang
Does it work with this Mesa patch?
missing break...
https://bugs.freedesktop.org/show_bug.cgi?id=82709
Pali Rohár pali.rohar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pali.rohar@gmail.com
--- Comment #3 from Pali Rohár pali.rohar@gmail.com --- I added missing break after both gpu = lines, recompiled mesa with that patch and opencl examples started working without above sed and symlink hacks.
https://bugs.freedesktop.org/show_bug.cgi?id=82709
Tom Stellard tstellar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Tom Stellard tstellar@gmail.com --- Fixed in git commit 8109664dedee588dc98c9a7c25bd40c0eb56c35f
https://bugs.freedesktop.org/show_bug.cgi?id=82709
--- Comment #5 from Pali Rohár pali.rohar@gmail.com --- @Tom Stellard: Are you going to fix this problem in llvm/clang/libclc?
https://bugs.freedesktop.org/show_bug.cgi?id=82709
--- Comment #6 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #5)
@Tom Stellard: Are you going to fix this problem in llvm/clang/libclc?
IIRC, it's already working with newer versions of clang.
https://bugs.freedesktop.org/show_bug.cgi?id=82709
--- Comment #7 from Tom Stellard tstellar@gmail.com --- (In reply to comment #5)
@Tom Stellard: Are you going to fix this problem in llvm/clang/libclc?
Yes, it's fixed in llvm/clang 3.6 and I'll try to backport the patch for llvm/clang 3.5.1.
dri-devel@lists.freedesktop.org