[Libclc-dev] [PATCH] Add vload_half helpers for ptx

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Wed Oct 4 16:56:42 PDT 2017


On Wed, 2017-10-04 at 22:07 +0200, Jeroen Ketema via Libclc-dev wrote:
> Index: ptx/lib/SOURCES_3.9
> ===================================================================
> --- ptx/lib/SOURCES_3.9	(revision 314925)
> +++ ptx/lib/SOURCES_3.9	(working copy)
> @@ -1 +1,2 @@
> +shared/vload_half_helpers.ll
>  shared/vstore_half_helpers.ll
> Index: ptx/lib/SOURCES_4.0
> ===================================================================
> --- ptx/lib/SOURCES_4.0	(revision 314925)
> +++ ptx/lib/SOURCES_4.0	(working copy)
> @@ -1 +1,2 @@
> +shared/vload_half_helpers.ll
>  shared/vstore_half_helpers.ll
> Index: ptx/lib/SOURCES_5.0
> ===================================================================
> --- ptx/lib/SOURCES_5.0	(revision 314925)
> +++ ptx/lib/SOURCES_5.0	(working copy)
> @@ -1 +1,2 @@
> +shared/vload_half_helpers.ll
>  shared/vstore_half_helpers.ll
> Index: ptx/lib/shared/vload_half_helpers.ll
> ===================================================================
> --- ptx/lib/shared/vload_half_helpers.ll	(nonexistent)
> +++ ptx/lib/shared/vload_half_helpers.ll	(working copy)
> @@ -0,0 +1,23 @@
> +define float @__clc_vload_half_float_helper__private(half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
> +  %data = load half, half addrspace(0)* %ptr
> +  %res = fpext half %data to float
> +  ret float %res
> +}
> +
> +define float @__clc_vload_half_float_helper__global(half addrspace(1)* nocapture %ptr) nounwind alwaysinline {
> +  %data = load half, half addrspace(1)* %ptr
> +  %res = fpext half %data to float
> +  ret float %res
> +}
> +
> +define float @__clc_vload_half_float_helper__local(half addrspace(3)* nocapture %ptr) nounwind alwaysinline {
> +  %data = load half, half addrspace(3)* %ptr
> +  %res = fpext half %data to float
> +  ret float %res
> +}
> +
> +define float @__clc_vload_half_float_helper__constant(half addrspace(4)* nocapture %ptr) nounwind alwaysinline {
> +  %data = load half, half addrspace(4)* %ptr
> +  %res = fpext half %data to float
> +  ret float %res
> +}

removes the vload_half unresolved calls from nvptx libraries
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>

Jan

PS: the posted configure script patch is needed to actually build these
files

> 
> _______________________________________________
> 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/20171004/1e0f53ae/attachment.sig>


More information about the Libclc-dev mailing list