[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2016-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Jan Vesely  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #18 from Jan Vesely  ---
Fixed with latest llvm/libclc.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2016-01-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Jan Vesely  changed:

   What|Removed |Added

 CC||jan.ves...@rutgers.edu

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-12-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #14 from Vedran Miletić  ---
Ronie, was this fixed?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-12-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Vedran Miletić  changed:

   What|Removed |Added

 CC||riva...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-12-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #15 from Ronie Salgado  ---
>
> Ronie, was this fixed?
>
> I did not fix my patch. Sorry, but I do not have time to work on this.

Best regards,
Ronie

2015-12-14 12:06 GMT-03:00 :

> *Comment # 14  on
> bug 86326  from Vedran
> Miletić  *
>
> Ronie, was this fixed?
>
> --
> You are receiving this mail because:
>
>- You are on the CC list for the bug.
>
>

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-12-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #16 from Vedran Miletić  ---
(In reply to Ronie Salgado from comment #15)
> I did not fix my patch. Sorry, but I do not have time to work on this.

In case this turns out to be necessary to make GROMACS OpenCL work, do you mind
if I finish your patch and make it suitable for merging (with proper credit, of
course)?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-12-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #17 from Ronie Salgado  ---
>
> In case this turns out to be necessary to make GROMACS OpenCL work, do you 
> mind
> if I finish your patch and make it suitable for merging (with proper credit, 
> of
> course)?
>
> I don't mind. Just go ahead. You should only need to split the patch so
that it can be accepted by the different projects that it affects.

Best regards,
Ronie

2015-12-14 20:06 GMT-03:00 :

> *Comment # 16  on
> bug 86326  from Vedran
> Miletić  *
>
> (In reply to Ronie Salgado from comment #15 
> )> I did not fix my 
> patch. Sorry, but I do not have time to work on this.
>
> In case this turns out to be necessary to make GROMACS OpenCL work, do you 
> mind
> if I finish your patch and make it suitable for merging (with proper credit, 
> of
> course)?
>
> --
> You are receiving this mail because:
>
>- You are on the CC list for the bug.
>
>

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-04-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #13 from Ronie Salgado ronies...@gmail.com ---
Sorry, I have been busy lately. I will do it today.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-04-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #12 from Tom Stellard tstel...@gmail.com ---
(In reply to Tom Stellard from comment #11)
 Are these these same patches you sent to the mailing list?

Do you have any interest in fixing up these patches?  If not, I may give it a
try.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #11 from Tom Stellard tstel...@gmail.com ---
Are these these same patches you sent to the mailing list?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #5 from Tom Stellard tstel...@gmail.com ---
Comment on attachment 114337
  -- https://bugs.freedesktop.org/attachment.cgi?id=114337
libclc get_global_offset() and get_global_id() patch

Review of attachment 114337:
-

Hi,

Thanks for the patch.  Would you be able to send your updated version to:
libclc-...@pcc.me.uk

::: ptx-nvidiacl/lib/workitem/get_global_offset.cl
@@ +6,5 @@
 +  case 1:  return __builtin_ptx_read_global_offset_y();
 +  case 2:  return __builtin_ptx_read_global_offset_z();*/
 +  default: return 0;
 +  }
 +}

Why is this commented out?  Also the function name is wrong:
get_local_offset().

::: r600/lib/workitem/get_global_offset.ll
@@ +14,5 @@
 +  %z = call i32 @llvm.AMDGPU.read.global.offset.z() nounwind readnone
 +  ret i32 %z
 +default:
 +  ret i32 0
 +}

This should be implemented in OpenCL C rather than LLVM IR.  Now that
DataLayouts are mandatory, it makes implementing common code in LLVM IR much
more difficult.

You can use the builtins defined in your previous patch for this:

__builtin_amdgpu_read_global_offset_x ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #4 from Tom Stellard tstel...@gmail.com ---
Comment on attachment 114336
  -- https://bugs.freedesktop.org/attachment.cgi?id=114336
LLVM AMDGPU get_global_offset() patch

Review of attachment 114336:
-

Hi, Thanks for the patch.  After making the changes below, could you send the
new patch to llvm-comm...@cs.uiuc.edu?

::: lib/Target/R600/SIInstrInfo.h
@@ -371,4 +371,4 @@
 GLOBAL_SIZE_Z = 20,
 LOCAL_SIZE_X = 24,
 LOCAL_SIZE_Y = 28,
  -  LOCAL_SIZE_Z = 32
  +  LOCAL_SIZE_Z = 32,

  +  LOCAL_SIZE_Z = 32,

This additional comma is unnecessary.

We should add another enum here for KernelABIInputOffsets and then add entries
for WORK_DIM and GLOBAL_OFFSET_{X,Y,Z}, and use these instead of constants in
SIISelLowering.cp

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Ronie Salgado ronies...@gmail.com changed:

   What|Removed |Added

 Attachment #114337|0   |1
is obsolete||

--- Comment #7 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114364
  -- https://bugs.freedesktop.org/attachment.cgi?id=114364action=edit
Updated libclc patch

Updated libclc patch. I am also taking the opportunity to use C builtin
functions for the r600/lib/workitem/*.ll implementation.

Removed the comment from the ptx version of get_global_offset(). The comment
was there because I had not implemented those builtin intrinsics. Now I am just
leaving some potential stub in LLVM for its implementation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #8 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114365
  -- https://bugs.freedesktop.org/attachment.cgi?id=114365action=edit
Clang patch

Clang patch to be able to use the new/old builtin functions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Ronie Salgado ronies...@gmail.com changed:

   What|Removed |Added

 Attachment #114336|0   |1
is obsolete||

--- Comment #6 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114363
  -- https://bugs.freedesktop.org/attachment.cgi?id=114363action=edit
LLVM intrinsics patch

I tried to use the builtin function, but it did not work. Clang uses the triple
target prefix when trying to map GGC builtins into LLVM intrinsics.

In the case of the R600, the triple target prefix is amdgpu, but
IntrinsicsR600.td declares some intrinsics in the separate r600 and AMDGPU
namespaces.

So I decided to put all of them in the amdgpu namespace. Then table gen
complained that they have to start amdgpu. So I made the subsequent changes
until I made it work, and the tests in opencl-example are all passing in
capeverde.

I'am leaving those updated patches here for reviewing and documentation before
sending them to the respective mailing lists.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Ronie Salgado ronies...@gmail.com changed:

   What|Removed |Added

 Attachment #114363|0   |1
is obsolete||

--- Comment #9 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114366
  -- https://bugs.freedesktop.org/attachment.cgi?id=114366action=edit
LLVM intrinsics patch (v2)

Added a missing file, whith an enum for the kernel abi offsets.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #10 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114367
  -- https://bugs.freedesktop.org/attachment.cgi?id=114367action=edit
Radeon patch for the other patches

It seems that the radeon driver depends in some of the llvm intrinsics.
Perphaps some refactoring is required. This patch makes glxgears working again.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #1 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114336
  -- https://bugs.freedesktop.org/attachment.cgi?id=114336action=edit
LLVM AMDGPU get_global_offset() patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Ronie Salgado ronies...@gmail.com changed:

   What|Removed |Added

 CC||ronies...@gmail.com

--- Comment #2 from Ronie Salgado ronies...@gmail.com ---
Created attachment 114337
  -- https://bugs.freedesktop.org/attachment.cgi?id=114337action=edit
libclc get_global_offset() and get_global_id() patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2015-03-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

--- Comment #3 from Ronie Salgado ronies...@gmail.com ---
I checked the latest version of the clover codebase and it pushes the global
offsets into the end of the input buffer.

I made it work with AMD capeverde(HD7770) by adding the intrinsics needed to
implement OpenCL 1.1 get_global_offset(). Then I implemented
get_global_offset() in libclc and I modified get_global_id() to use the offset.

I also stubbed get_global_offset() in the ptx version.

Those changes are in the attached patches.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 86326] clEnqueueNDRangeKernel global_work_offset ignored

2014-11-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86326

Bug ID: 86326
   Summary: clEnqueueNDRangeKernel global_work_offset ignored
   Product: Mesa
   Version: 10.3
  Hardware: x86 (IA32)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Other
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: luke-jr+freedesktopb...@utopios.org

global_work_offset can be used to specify an array of work_dim unsigned values
that describe the offset used to calculate the global ID of a work-item. If
global_work_offset is NULL, the global IDs start at offset (0, 0, ... 0).
From:
https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html

However, Mesa passes this into clover/core/kernel.cpp kernel::launch, which
then simply ignores it entirely.

Note that OpenCL 1.0 required global_work_offset to be NULL, but Mesa claims
OpenCL 1.1, and if it was only OpenCL 1.0 it would still need to fail if
global_work_offset was non-NULL.

As a result of this bug, software tries to use global_work_offset and ends up
with kernels executing with the wrong values for get_global_id(0)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev