* [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
@ 2014-08-17 11:03 bugzilla-daemon
2014-08-18 14:20 ` [Bug 82581] " bugzilla-daemon
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-08-17 11:03 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
Bug ID: 82581
Summary: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every
time runpm powers on 7970M pitcairn
Product: Drivers
Version: 2.5
Kernel Version: 3.16.1
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
Assignee: drivers_video-dri@kernel-bugs.osdl.org
Reporter: haagch.christoph@googlemail.com
Regression: No
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Wimbledon XT [Radeon HD 7970M] (rev ff)
linux 3.16.1
drmCommandWriteRead() in mesa receives the wrong value already so I put this
here.
As long as the gpu is not powered off in between runs the value stays the same.
When the gpu is powered off and on, the value will be increased by 100.
Test program output:
$ g++ numcomp.cpp -o numcomp -lOpenCL; ./numcomp; ./numcomp; sleep 10;
./numcomp; ./numcomp
OpenCL Number of compute units: 7500
OpenCL Number of compute units: 7500
OpenCL Number of compute units: 7600
OpenCL Number of compute units: 7600
Test program source:
#include <CL/cl.hpp>
#include <iostream>
int main() {
int err, numberOfComputeUnits = 0;
std::vector<cl::Platform> platformList;
cl::Platform::get(&platformList);
cl_context_properties cprops[3] = { CL_CONTEXT_PLATFORM,
(cl_context_properties) (platformList[0])(), 0 };
cl::Context *context = new cl::Context(CL_DEVICE_TYPE_GPU, cprops, NULL,
NULL, &err);
std::vector<cl::Device> devices = context->getInfo<CL_CONTEXT_DEVICES>();
devices[0].getInfo(CL_DEVICE_MAX_COMPUTE_UNITS, &numberOfComputeUnits);
std::cout << "OpenCL Number of compute units: " << numberOfComputeUnits <<
std::endl;;
return 0;
}
Also with other tools like http://graphics.stanford.edu/~yoel/notes/clInfo.c:
$ ./clInfo | grep MAX_COMPUTE_UNITS
device[0x1118288]: MAX_COMPUTE_UNITS: 10400
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 82581] CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
@ 2014-08-18 14:20 ` bugzilla-daemon
2014-08-18 19:02 ` bugzilla-daemon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-08-18 14:20 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
Alex Deucher <alexdeucher@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alexdeucher@gmail.com
--- Comment #1 from Alex Deucher <alexdeucher@gmail.com> ---
Created attachment 147041
--> https://bugzilla.kernel.org/attachment.cgi?id=147041&action=edit
possible fix
The attached patch should fix it.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 82581] CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
2014-08-18 14:20 ` [Bug 82581] " bugzilla-daemon
@ 2014-08-18 19:02 ` bugzilla-daemon
2014-08-18 21:11 ` bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-08-18 19:02 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
--- Comment #2 from Christoph Haag <haagch.christoph@googlemail.com> ---
It helps for the issue of increasing.
But now it always returns 100.
I don't think the HD 7970M has 100 compute units.
http://www.amd.com/de-de/products/graphics/notebook/7900m#2
says
"20 Compute Units (1280 Stream Processors)"
To see how it adds up to 100 I added some debug info like this:
printk("rdbg max_shader_engines: %d\n", rdev->config.si.max_shader_engines);
printk("rdbg max_sh_per_se: %d\n", rdev->config.si.max_sh_per_se);
printk("rdbg max_cu_per_sh: %d\n", rdev->config.si.max_cu_per_sh);
for (i = 0; i < rdev->config.si.max_shader_engines; i++) {
for (j = 0; j < rdev->config.si.max_sh_per_se; j++) {
for (k = 0; k < rdev->config.si.max_cu_per_sh; k++) {
rdev->config.si.active_cus +=
hweight32(si_get_cu_active_bitmap(rdev, i, j));
printk("rdbg inner: rdev->config.si.active_cus: %d,
hweight32(si_get_cu_active_bitmap(rdev, %d, %d)): %d\n",
rdev->config.si.active_cus, i, j, hweight32(si_get_cu_active_bitmap(rdev, i,
j)));
}
}
}
And then I got this output:
rdbg max_shader_engines: 2
rdbg max_sh_per_se: 2
rdbg max_cu_per_sh: 5
rdbg inner: rdev->config.si.active_cus: 5,
hweight32(si_get_cu_active_bitmap(rdev, 0, 0)): 5
rdbg inner: rdev->config.si.active_cus: 10,
hweight32(si_get_cu_active_bitmap(rdev, 0, 0)): 5
rdbg inner: rdev->config.si.active_cus: 15,
hweight32(si_get_cu_active_bitmap(rdev, 0, 0)): 5
rdbg inner: rdev->config.si.active_cus: 20,
hweight32(si_get_cu_active_bitmap(rdev, 0, 0)): 5
rdbg inner: rdev->config.si.active_cus: 25,
hweight32(si_get_cu_active_bitmap(rdev, 0, 0)): 5
rdbg inner: rdev->config.si.active_cus: 30,
hweight32(si_get_cu_active_bitmap(rdev, 0, 1)): 5
rdbg inner: rdev->config.si.active_cus: 35,
hweight32(si_get_cu_active_bitmap(rdev, 0, 1)): 5
rdbg inner: rdev->config.si.active_cus: 40,
hweight32(si_get_cu_active_bitmap(rdev, 0, 1)): 5
rdbg inner: rdev->config.si.active_cus: 45,
hweight32(si_get_cu_active_bitmap(rdev, 0, 1)): 5
rdbg inner: rdev->config.si.active_cus: 50,
hweight32(si_get_cu_active_bitmap(rdev, 0, 1)): 5
rdbg inner: rdev->config.si.active_cus: 55,
hweight32(si_get_cu_active_bitmap(rdev, 1, 0)): 5
rdbg inner: rdev->config.si.active_cus: 60,
hweight32(si_get_cu_active_bitmap(rdev, 1, 0)): 5
rdbg inner: rdev->config.si.active_cus: 65,
hweight32(si_get_cu_active_bitmap(rdev, 1, 0)): 5
rdbg inner: rdev->config.si.active_cus: 70,
hweight32(si_get_cu_active_bitmap(rdev, 1, 0)): 5
rdbg inner: rdev->config.si.active_cus: 75,
hweight32(si_get_cu_active_bitmap(rdev, 1, 0)): 5
rdbg inner: rdev->config.si.active_cus: 80,
hweight32(si_get_cu_active_bitmap(rdev, 1, 1)): 5
rdbg inner: rdev->config.si.active_cus: 85,
hweight32(si_get_cu_active_bitmap(rdev, 1, 1)): 5
rdbg inner: rdev->config.si.active_cus: 90,
hweight32(si_get_cu_active_bitmap(rdev, 1, 1)): 5
rdbg inner: rdev->config.si.active_cus: 95,
hweight32(si_get_cu_active_bitmap(rdev, 1, 1)): 5
rdbg inner: rdev->config.si.active_cus: 100,
hweight32(si_get_cu_active_bitmap(rdev, 1, 1)): 5
I think the k loop is already iterating over the compute units, but instead of
1 unit being added to the total, the result of si_get_cu_active_bitmap is
added, which also seems to add up the compute units.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 82581] CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
2014-08-18 14:20 ` [Bug 82581] " bugzilla-daemon
2014-08-18 19:02 ` bugzilla-daemon
@ 2014-08-18 21:11 ` bugzilla-daemon
2014-08-19 9:19 ` bugzilla-daemon
2014-09-02 13:28 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-08-18 21:11 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
Alex Deucher <alexdeucher@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #147041|0 |1
is obsolete| |
--- Comment #3 from Alex Deucher <alexdeucher@gmail.com> ---
Created attachment 147161
--> https://bugzilla.kernel.org/attachment.cgi?id=147161&action=edit
possible fix
This should do the trick.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 82581] CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
` (2 preceding siblings ...)
2014-08-18 21:11 ` bugzilla-daemon
@ 2014-08-19 9:19 ` bugzilla-daemon
2014-09-02 13:28 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-08-19 9:19 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
--- Comment #4 from Christoph Haag <haagch.christoph@googlemail.com> ---
OpenCL Number of compute units: 20
Works for me.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 82581] CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
` (3 preceding siblings ...)
2014-08-19 9:19 ` bugzilla-daemon
@ 2014-09-02 13:28 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2014-09-02 13:28 UTC (permalink / raw)
To: dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=82581
Christoph Haag <haagch.christoph@googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |CODE_FIX
--- Comment #5 from Christoph Haag <haagch.christoph@googlemail.com> ---
Since it's in the 3.17 rc I use, I'm closing this as fixed.
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-02 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-17 11:03 [Bug 82581] New: CL_DEVICE_MAX_COMPUTE_UNITS increases by 100 every time runpm powers on 7970M pitcairn bugzilla-daemon
2014-08-18 14:20 ` [Bug 82581] " bugzilla-daemon
2014-08-18 19:02 ` bugzilla-daemon
2014-08-18 21:11 ` bugzilla-daemon
2014-08-19 9:19 ` bugzilla-daemon
2014-09-02 13:28 ` bugzilla-daemon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.