[Libclc-dev] [PATCH 1/2] Make image builtins r600/llvm-3.9 only
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Tue Oct 10 07:25:57 PDT 2017
On Mon, 2017-10-09 at 21:28 -0500, Aaron Watry via Libclc-dev wrote:
> On Sun, Oct 8, 2017 at 1:23 PM, Jan Vesely via Libclc-dev
> <libclc-dev at lists.llvm.org> wrote:
> > On Sun, 2017-10-01 at 14:15 -0400, Jan Vesely wrote:
> > > The implementation uses r600 specific intrinsics
> > > LLVM-4 generates calls to functions using _ro_t and _rw_t image types
> > > Portions of the code can be moved back as more targets/llvm versions add image support
> > >
> > > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > > ---
> > > AMDGPUOpenCLImageTypeLoweringPass relies on old style of kernel metadata
> > > passing, so I'm pretty sure this does not work in 3.9 either, but it at
> > > least does not generate external calls.
> > > I'd like to keep the code around as a reference when someone starts
> > > resurrecting image builtins.
> >
> > ping. this is just a code cleanup. No change in functionality.
>
> Looks ok to me. I agree it would be nice to resurrect image support
> in newer llvm, so lets keep this around for now.
thanks. Does it apply to 2/2 as well?
>
> If nothing else, it might give me some ideas on how to make an
> implicit global buffer available for the printf implementation.
I don't think images are a good model for that. It'd be nicer to use
standard implicit parameter passing on clover side and
__buitltin_implicitarg_ptr on libclc side, without any llvm changes.
(It'd be even nicer if NDRange arguments were converted first, so they
are all together in one place)
Jan
>
> --Aaron
>
> >
> > Jan
> >
> > >
> > > Jan
> > >
> > > amdgpu/lib/SOURCES | 14 --------------
> > > generic/lib/SOURCES | 1 -
> > > r600/lib/SOURCES_3.9 | 15 +++++++++++++++
> > > {amdgpu => r600}/lib/image/get_image_attributes_impl.ll | 0
> > > {amdgpu => r600}/lib/image/get_image_channel_data_type.cl | 0
> > > {amdgpu => r600}/lib/image/get_image_channel_order.cl | 0
> > > {amdgpu => r600}/lib/image/get_image_depth.cl | 0
> > > {generic => r600}/lib/image/get_image_dim.cl | 0
> > > {amdgpu => r600}/lib/image/get_image_height.cl | 0
> > > {amdgpu => r600}/lib/image/get_image_width.cl | 0
> > > {amdgpu => r600}/lib/image/read_image_impl.ll | 0
> > > {amdgpu => r600}/lib/image/read_imagef.cl | 0
> > > {amdgpu => r600}/lib/image/read_imagei.cl | 0
> > > {amdgpu => r600}/lib/image/read_imageui.cl | 0
> > > {amdgpu => r600}/lib/image/write_image_impl.ll | 0
> > > {amdgpu => r600}/lib/image/write_imagef.cl | 0
> > > {amdgpu => r600}/lib/image/write_imagei.cl | 0
> > > {amdgpu => r600}/lib/image/write_imageui.cl | 0
> > > 18 files changed, 15 insertions(+), 15 deletions(-)
> > > create mode 100644 r600/lib/SOURCES_3.9
> > > rename {amdgpu => r600}/lib/image/get_image_attributes_impl.ll (100%)
> > > rename {amdgpu => r600}/lib/image/get_image_channel_data_type.cl (100%)
> > > rename {amdgpu => r600}/lib/image/get_image_channel_order.cl (100%)
> > > rename {amdgpu => r600}/lib/image/get_image_depth.cl (100%)
> > > rename {generic => r600}/lib/image/get_image_dim.cl (100%)
> > > rename {amdgpu => r600}/lib/image/get_image_height.cl (100%)
> > > rename {amdgpu => r600}/lib/image/get_image_width.cl (100%)
> > > rename {amdgpu => r600}/lib/image/read_image_impl.ll (100%)
> > > rename {amdgpu => r600}/lib/image/read_imagef.cl (100%)
> > > rename {amdgpu => r600}/lib/image/read_imagei.cl (100%)
> > > rename {amdgpu => r600}/lib/image/read_imageui.cl (100%)
> > > rename {amdgpu => r600}/lib/image/write_image_impl.ll (100%)
> > > rename {amdgpu => r600}/lib/image/write_imagef.cl (100%)
> > > rename {amdgpu => r600}/lib/image/write_imagei.cl (100%)
> > > rename {amdgpu => r600}/lib/image/write_imageui.cl (100%)
> > >
> > > diff --git a/amdgpu/lib/SOURCES b/amdgpu/lib/SOURCES
> > > index 4414621..ce5fe66 100644
> > > --- a/amdgpu/lib/SOURCES
> > > +++ b/amdgpu/lib/SOURCES
> > > @@ -1,16 +1,2 @@
> > > math/nextafter.cl
> > > math/sqrt.cl
> > > -image/get_image_width.cl
> > > -image/get_image_height.cl
> > > -image/get_image_depth.cl
> > > -image/get_image_channel_data_type.cl
> > > -image/get_image_channel_order.cl
> > > -image/get_image_attributes_impl.ll
> > > -image/read_imagef.cl
> > > -image/read_imagei.cl
> > > -image/read_imageui.cl
> > > -image/read_image_impl.ll
> > > -image/write_imagef.cl
> > > -image/write_imagei.cl
> > > -image/write_imageui.cl
> > > -image/write_image_impl.ll
> > > diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
> > > index f919bc7..12f1271 100644
> > > --- a/generic/lib/SOURCES
> > > +++ b/generic/lib/SOURCES
> > > @@ -167,4 +167,3 @@ shared/vload.cl
> > > shared/vstore.cl
> > > workitem/get_global_id.cl
> > > workitem/get_global_size.cl
> > > -image/get_image_dim.cl
> > > diff --git a/r600/lib/SOURCES_3.9 b/r600/lib/SOURCES_3.9
> > > new file mode 100644
> > > index 0000000..a44a9ce
> > > --- /dev/null
> > > +++ b/r600/lib/SOURCES_3.9
> > > @@ -0,0 +1,15 @@
> > > +image/get_image_dim.cl
> > > +image/get_image_width.cl
> > > +image/get_image_height.cl
> > > +image/get_image_depth.cl
> > > +image/get_image_channel_data_type.cl
> > > +image/get_image_channel_order.cl
> > > +image/get_image_attributes_impl.ll
> > > +image/read_imagef.cl
> > > +image/read_imagei.cl
> > > +image/read_imageui.cl
> > > +image/read_image_impl.ll
> > > +image/write_imagef.cl
> > > +image/write_imagei.cl
> > > +image/write_imageui.cl
> > > +image/write_image_impl.ll
> > > diff --git a/amdgpu/lib/image/get_image_attributes_impl.ll b/r600/lib/image/get_image_attributes_impl.ll
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_attributes_impl.ll
> > > rename to r600/lib/image/get_image_attributes_impl.ll
> > > diff --git a/amdgpu/lib/image/get_image_channel_data_type.cl b/r600/lib/image/get_image_channel_data_type.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_channel_data_type.cl
> > > rename to r600/lib/image/get_image_channel_data_type.cl
> > > diff --git a/amdgpu/lib/image/get_image_channel_order.cl b/r600/lib/image/get_image_channel_order.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_channel_order.cl
> > > rename to r600/lib/image/get_image_channel_order.cl
> > > diff --git a/amdgpu/lib/image/get_image_depth.cl b/r600/lib/image/get_image_depth.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_depth.cl
> > > rename to r600/lib/image/get_image_depth.cl
> > > diff --git a/generic/lib/image/get_image_dim.cl b/r600/lib/image/get_image_dim.cl
> > > similarity index 100%
> > > rename from generic/lib/image/get_image_dim.cl
> > > rename to r600/lib/image/get_image_dim.cl
> > > diff --git a/amdgpu/lib/image/get_image_height.cl b/r600/lib/image/get_image_height.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_height.cl
> > > rename to r600/lib/image/get_image_height.cl
> > > diff --git a/amdgpu/lib/image/get_image_width.cl b/r600/lib/image/get_image_width.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/get_image_width.cl
> > > rename to r600/lib/image/get_image_width.cl
> > > diff --git a/amdgpu/lib/image/read_image_impl.ll b/r600/lib/image/read_image_impl.ll
> > > similarity index 100%
> > > rename from amdgpu/lib/image/read_image_impl.ll
> > > rename to r600/lib/image/read_image_impl.ll
> > > diff --git a/amdgpu/lib/image/read_imagef.cl b/r600/lib/image/read_imagef.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/read_imagef.cl
> > > rename to r600/lib/image/read_imagef.cl
> > > diff --git a/amdgpu/lib/image/read_imagei.cl b/r600/lib/image/read_imagei.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/read_imagei.cl
> > > rename to r600/lib/image/read_imagei.cl
> > > diff --git a/amdgpu/lib/image/read_imageui.cl b/r600/lib/image/read_imageui.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/read_imageui.cl
> > > rename to r600/lib/image/read_imageui.cl
> > > diff --git a/amdgpu/lib/image/write_image_impl.ll b/r600/lib/image/write_image_impl.ll
> > > similarity index 100%
> > > rename from amdgpu/lib/image/write_image_impl.ll
> > > rename to r600/lib/image/write_image_impl.ll
> > > diff --git a/amdgpu/lib/image/write_imagef.cl b/r600/lib/image/write_imagef.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/write_imagef.cl
> > > rename to r600/lib/image/write_imagef.cl
> > > diff --git a/amdgpu/lib/image/write_imagei.cl b/r600/lib/image/write_imagei.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/write_imagei.cl
> > > rename to r600/lib/image/write_imagei.cl
> > > diff --git a/amdgpu/lib/image/write_imageui.cl b/r600/lib/image/write_imageui.cl
> > > similarity index 100%
> > > rename from amdgpu/lib/image/write_imageui.cl
> > > rename to r600/lib/image/write_imageui.cl
> >
> > --
> > Jan Vesely <jan.vesely at rutgers.edu>
> > _______________________________________________
> > Libclc-dev mailing list
> > Libclc-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev
> >
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20171010/ba3ff6bf/attachment.sig>
More information about the Libclc-dev
mailing list