Bug 65822 - [radeonsi] OpenCL is broken
Summary: [radeonsi] OpenCL is broken
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 12:05 UTC by Hristo Venev
Modified: 2014-08-21 15:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Test results (2.45 KB, text/plain)
2013-06-16 12:05 UTC, Hristo Venev
Details
Test Code from initial post converted to piglit tests (761 bytes, application/x-bzip)
2013-06-17 22:34 UTC, Aaron Watry
Details
Shader dumps from a radeon 7850 for test cases in attachment 80967 (5.88 KB, application/octet-stream)
2013-06-17 23:04 UTC, Aaron Watry
Details
Updated piglit tests (3.47 KB, patch)
2013-06-18 17:33 UTC, Tom Stellard
Details | Splinter Review
code-in-else.ll (2.33 KB, text/plain)
2013-06-18 21:30 UTC, Aaron Watry
Details

Description Hristo Venev 2013-06-16 12:05:20 UTC
Created attachment 80907 [details]
Test results

I've attached test results.

a[i]=i+1
b[i]=2*a[i]
Test 1: add uints and divide by 3
Test 2: test 1 done 10 times in a for loop
Test 3: divide uints
Test 4: if statement dependent on load with an addition in the false branch.

Test 1 works, tests 2 and 3 halt and test 4 crashes.
Comment 1 Tom Stellard 2013-06-17 16:21:07 UTC
I will take a look at this when I get a chance.  In the mean time it would be great if you could convert these into piglit tests.  Here is a good example:
http://cgit.freedesktop.org/piglit/tree/tests/cl/program/execute/sha256-Ch.cl

Probably one file for each test would be good.
Comment 2 Aaron Watry 2013-06-17 22:34:07 UTC
Created attachment 80967 [details]
Test Code from initial post converted to piglit tests

I've taken a shot at converting the original tests to piglit tests.

I'll test a radeon 7850 in a bit, but I know that Cedar (radeon 5400, so evergreen) also fails each of these tests (and I got a GPU hang running the uint div test after 6-7 times).
Comment 3 Aaron Watry 2013-06-17 23:04:29 UTC
Created attachment 80969 [details]
Shader dumps from a radeon 7850 for test cases in attachment 80967 [details]
Comment 4 Tom Stellard 2013-06-18 17:33:27 UTC
Created attachment 81026 [details] [review]
Updated piglit tests

Thanks for writing the piglit tests, I noticed a few bugs in them though.  First, the output argument for all of the tests should be index 2 and not index 0 and second, in test #2 the buffer index should be multiplied by 8 instead of 10.  I've fixed the piglit tests in the attached patch and also replaced the '_' with '-' in the filename.  The updated tests pass on my Llano APU.
Comment 5 Aaron Watry 2013-06-18 21:29:20 UTC
Ack!  You're right.  I'm so used to the output being arg 0 from every other piglit test that I neglected to check these.

With that and the index multiplier changed, these tests also pass on Cedar.

All of the test cases currently pass on my pitcairn, except for the code-in-else test, which fails with:

cl-program-tester: /home/awatry/src/llvm/include/llvm/Target/TargetRegisterInfo.h:560: const llvm::TargetRegisterClass* llvm::TargetRegisterInfo::getRegClass(unsigned int) const: Assertion `i < getNumRegClasses() && "Register Class ID out of range"' failed.
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'radeon'.
1.	Running pass 'AMDGPU DAG->DAG Pattern Instruction Selection' on function '@test4'

I'll attach the assembly in a follow-up
Comment 6 Aaron Watry 2013-06-18 21:30:40 UTC
Created attachment 81042 [details]
code-in-else.ll
Comment 7 Tom Stellard 2014-08-21 15:59:52 UTC
This test case is working for me now.  Please re-open if you are still having problems.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.