[libclc] libclc: generic: add half implementation for erf/erfc (PR #66901)

2024-01-09 Thread Kévin Petit via cfe-commits

https://github.com/kpet approved this pull request.

Looks infinitely better than the absence of FP16 implementation we currently 
have. I have not tried to think through rounding and other detailed 
considerations. The OpenCL CTS currently does not cover FP16 variants of these 
functions but I believe this is in the works. We can revisit the implementation 
if the conformance tests reveal issues.

https://github.com/llvm/llvm-project/pull/66901
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: generic: add half implementation for erf/erfc (PR #66901)

2024-01-09 Thread Kévin Petit via cfe-commits

https://github.com/kpet closed https://github.com/llvm/llvm-project/pull/66901
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits


@@ -251,13 +258,19 @@ def generate_default_conversion(src, dst, mode):
 print("#endif")
 
 
-for src in types:
-for dst in types:
-generate_default_conversion(src, dst, "")
+# Do not generate default conversion for clspv as they are handle natively
+if not clspv:
+for src in types:
+for dst in types:
+generate_default_conversion(src, dst, "")
 
 for src in int_types:
 for dst in int_types:
 for mode in rounding_modes:
+# Do not generate "_rte" conversion for clspv as they are handle

kpet wrote:

```suggestion
# Do not generate "_rte" conversion for clspv as they are handled
```

https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits


@@ -484,4 +536,8 @@ def generate_float_conversion(src, dst, size, mode, sat):
 for dst in float_types:
 for size in vector_sizes:
 for mode in rounding_modes:
+# Do not generate "_rte" conversion for clspv as they are
+# handle natively

kpet wrote:

```suggestion
# handled natively
```

https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits


@@ -251,13 +258,19 @@ def generate_default_conversion(src, dst, mode):
 print("#endif")
 
 
-for src in types:
-for dst in types:
-generate_default_conversion(src, dst, "")
+# Do not generate default conversion for clspv as they are handle natively

kpet wrote:

```suggestion
# Do not generate default conversion for clspv as they are handled natively
```

https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits


@@ -307,8 +320,8 @@ def generate_saturated_conversion(src, dst, size):
 # Conversion from float to int
 print(
 """  {DST}{N} y = convert_{DST}{N}(x);
-  y = select(y, ({DST}{N}){DST_MIN}, {BP}(x < ({SRC}{N}){DST_MIN}){BS});
-  y = select(y, ({DST}{N}){DST_MAX}, {BP}(x > ({SRC}{N}){DST_MAX}){BS});
+  y = select(y, ({DST}{N}){DST_MIN}, {BP}(x <= ({SRC}{N}){DST_MIN}){BS});
+  y = select(y, ({DST}{N}){DST_MAX}, {BP}(x >= ({SRC}{N}){DST_MAX}){BS});

kpet wrote:

Did you intend to change these lines? If yes and the change applies 
independently of the clspv mode, this looks like a standalone bugfix.

https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits


@@ -26,6 +27,12 @@
 #
 # convert_<_sat><_roundingMode>()
 
+import sys
+
+clspv = False
+if len(sys.argv) == 2 and sys.argv[1] == "--clspv":
+clspv = True
+

kpet wrote:

```suggestion
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--clspv', help="Generate the clspv variant of the code")
args = parser.parse_args()
clspv = args.clspv
```
It's not that much more code and will be easier to maintain, use, and extend. 

https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits

https://github.com/kpet approved this pull request.


https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)

2024-03-14 Thread Kévin Petit via cfe-commits

https://github.com/kpet closed https://github.com/llvm/llvm-project/pull/66902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] f11ab83 - libclc: remove sqrt/rsqrt from clspv SOURCES

2023-02-13 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2023-02-13T21:27:40Z
New Revision: f11ab8353f972647f276b07c24d1308859fbde0d

URL: 
https://github.com/llvm/llvm-project/commit/f11ab8353f972647f276b07c24d1308859fbde0d
DIFF: 
https://github.com/llvm/llvm-project/commit/f11ab8353f972647f276b07c24d1308859fbde0d.diff

LOG: libclc: remove sqrt/rsqrt from clspv SOURCES

https://reviews.llvm.org/D134040

Patch by: Aaron Greig 

Added: 


Modified: 
libclc/clspv/lib/SOURCES

Removed: 




diff  --git a/libclc/clspv/lib/SOURCES b/libclc/clspv/lib/SOURCES
index 0466345cee027..cae33c38472be 100644
--- a/libclc/clspv/lib/SOURCES
+++ b/libclc/clspv/lib/SOURCES
@@ -18,7 +18,6 @@ math/nextafter.cl
 ../../generic/lib/math/clc_remainder.cl
 ../../generic/lib/math/clc_remquo.cl
 ../../generic/lib/math/clc_rootn.cl
-../../generic/lib/math/clc_sqrt.cl
 ../../generic/lib/math/clc_tan.cl
 ../../generic/lib/math/erf.cl
 ../../generic/lib/math/erfc.cl
@@ -41,8 +40,6 @@ math/nextafter.cl
 ../../generic/lib/math/remainder.cl
 ../../generic/lib/math/remquo.cl
 ../../generic/lib/math/rootn.cl
-../../generic/lib/math/rsqrt.cl
-../../generic/lib/math/sqrt.cl
 ../../generic/lib/math/tables.cl
 ../../generic/lib/math/tanh.cl
 ../../generic/lib/math/tgamma.cl



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] f6cd46e - libclc: add more generic implementations to clspv SOURCES

2023-02-14 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2023-02-14T18:11:01Z
New Revision: f6cd46e07fcca123620afff96675171f8fe96124

URL: 
https://github.com/llvm/llvm-project/commit/f6cd46e07fcca123620afff96675171f8fe96124
DIFF: 
https://github.com/llvm/llvm-project/commit/f6cd46e07fcca123620afff96675171f8fe96124.diff

LOG: libclc: add more generic implementations to clspv SOURCES

https://reviews.llvm.org/D134887

Patch by: Aaron Greig 

Added: 


Modified: 
libclc/clspv/lib/SOURCES

Removed: 




diff  --git a/libclc/clspv/lib/SOURCES b/libclc/clspv/lib/SOURCES
index cae33c38472be..98bc71a869b2a 100644
--- a/libclc/clspv/lib/SOURCES
+++ b/libclc/clspv/lib/SOURCES
@@ -1,45 +1,82 @@
+math/fma.cl
+math/nextafter.cl
 subnormal_config.cl
 ../../generic/lib/geometric/distance.cl
 ../../generic/lib/geometric/length.cl
-math/fma.cl
-math/nextafter.cl
+../../generic/lib/math/acos.cl
 ../../generic/lib/math/acosh.cl
 ../../generic/lib/math/asinh.cl
+../../generic/lib/math/acospi.cl
+../../generic/lib/math/asin.cl
 ../../generic/lib/math/atan.cl
+../../generic/lib/math/asinh.cl
+../../generic/lib/math/asinpi.cl
 ../../generic/lib/math/atan2.cl
 ../../generic/lib/math/atan2pi.cl
 ../../generic/lib/math/atanh.cl
 ../../generic/lib/math/atanpi.cl
 ../../generic/lib/math/cbrt.cl
+../../generic/lib/math/clc_exp10.cl
 ../../generic/lib/math/clc_fmod.cl
 ../../generic/lib/math/clc_hypot.cl
 ../../generic/lib/math/clc_ldexp.cl
 ../../generic/lib/math/clc_nextafter.cl
+../../generic/lib/math/clc_pow.cl
+../../generic/lib/math/clc_pown.cl
+../../generic/lib/math/clc_powr.cl
 ../../generic/lib/math/clc_remainder.cl
 ../../generic/lib/math/clc_remquo.cl
 ../../generic/lib/math/clc_rootn.cl
 ../../generic/lib/math/clc_tan.cl
+../../generic/lib/math/clc_tanpi.cl
+../../generic/lib/math/cos.cl
+../../generic/lib/math/cosh.cl
+../../generic/lib/math/cospi.cl
 ../../generic/lib/math/erf.cl
 ../../generic/lib/math/erfc.cl
+../../generic/lib/math/exp.cl
+../../generic/lib/math/exp10.cl
+../../generic/lib/math/exp2.cl
+../../generic/lib/math/exp_helper.cl
+../../generic/lib/math/expm1.cl
+../../generic/lib/math/fdim.cl
 ../../generic/lib/math/fmod.cl
 ../../generic/lib/math/fract.cl
 ../../generic/lib/math/frexp.cl
+../../generic/lib/math/half_cos.cl
 ../../generic/lib/math/half_divide.cl
+../../generic/lib/math/half_powr.cl
 ../../generic/lib/math/half_recip.cl
+../../generic/lib/math/half_sin.cl
 ../../generic/lib/math/half_sqrt.cl
+../../generic/lib/math/half_tan.cl
 ../../generic/lib/math/hypot.cl
 ../../generic/lib/math/ilogb.cl
 ../../generic/lib/math/ldexp.cl
 ../../generic/lib/math/lgamma.cl
 ../../generic/lib/math/lgamma_r.cl
+../../generic/lib/math/log.cl
+../../generic/lib/math/log10.cl
+../../generic/lib/math/log1p.cl
+../../generic/lib/math/log2.cl
 ../../generic/lib/math/logb.cl
 ../../generic/lib/math/maxmag.cl
 ../../generic/lib/math/minmag.cl
 ../../generic/lib/math/modf.cl
 ../../generic/lib/math/nan.cl
+../../generic/lib/math/pow.cl
+../../generic/lib/math/pown.cl
+../../generic/lib/math/powr.cl
 ../../generic/lib/math/remainder.cl
 ../../generic/lib/math/remquo.cl
 ../../generic/lib/math/rootn.cl
+../../generic/lib/math/sin.cl
+../../generic/lib/math/sincos.cl
+../../generic/lib/math/sincos_helpers.cl
+../../generic/lib/math/sinh.cl
+../../generic/lib/math/sinpi.cl
 ../../generic/lib/math/tables.cl
+../../generic/lib/math/tan.cl
 ../../generic/lib/math/tanh.cl
+../../generic/lib/math/tanpi.cl
 ../../generic/lib/math/tgamma.cl



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] 290308a - libclc: add generated convert.cl to clspv/clspv64 targets

2023-02-14 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2023-02-14T18:23:35Z
New Revision: 290308a99e6b9e6f808a9824c8e5a58a65749585

URL: 
https://github.com/llvm/llvm-project/commit/290308a99e6b9e6f808a9824c8e5a58a65749585
DIFF: 
https://github.com/llvm/llvm-project/commit/290308a99e6b9e6f808a9824c8e5a58a65749585.diff

LOG: libclc: add generated convert.cl to clspv/clspv64 targets

https://reviews.llvm.org/D136772

Patch by: Aaron Greig 

Added: 


Modified: 
libclc/CMakeLists.txt

Removed: 




diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index f712100689b0..89f08b889ea1 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -218,11 +218,11 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
 
# Add the generated convert.cl here to prevent adding
# the one listed in SOURCES
-   if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND
-   NOT ${ARCH} STREQUAL "clspv" AND NOT ${ARCH} STREQUAL 
"clspv64" )
+   if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" )
set( rel_files convert.cl )
set( objects convert.cl )
-   if( NOT ENABLE_RUNTIME_SUBNORMAL )
+   if( NOT ENABLE_RUNTIME_SUBNORMAL AND NOT ${ARCH} STREQUAL 
"clspv" AND
+   NOT ${ARCH} STREQUAL "clspv64" )
list( APPEND rel_files 
generic/lib/subnormal_use_default.ll )
endif()
else()



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] 1da2085 - libclc: add clspv to targets exempt from alwaysinline

2023-02-14 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2023-02-14T18:26:42Z
New Revision: 1da2085a513341f0e8d7578415dcf77d614708e5

URL: 
https://github.com/llvm/llvm-project/commit/1da2085a513341f0e8d7578415dcf77d614708e5
DIFF: 
https://github.com/llvm/llvm-project/commit/1da2085a513341f0e8d7578415dcf77d614708e5.diff

LOG: libclc: add clspv to targets exempt from alwaysinline

https://reviews.llvm.org/D132362

Patch by: Aaron Greig 

Added: 


Modified: 
libclc/generic/include/clc/clcfunc.h

Removed: 




diff  --git a/libclc/generic/include/clc/clcfunc.h 
b/libclc/generic/include/clc/clcfunc.h
index 55b775ea3935b..abb5484d6248e 100644
--- a/libclc/generic/include/clc/clcfunc.h
+++ b/libclc/generic/include/clc/clcfunc.h
@@ -2,8 +2,10 @@
 #define _CLC_DECL
 #define _CLC_INLINE __attribute__((always_inline)) inline
 
-/* avoid inlines for SPIR-V since we'll optimise later in the chain */
-#if defined(CLC_SPIRV) || defined(CLC_SPIRV64)
+// avoid inlines for SPIR-V related targets since we'll optimise later in the
+// chain
+#if defined(CLC_SPIRV) || defined(CLC_SPIRV64) || defined(CLC_CLSPV) || \
+defined(CLC_CLSPV64)
 #define _CLC_DEF
 #else
 #define _CLC_DEF __attribute__((always_inline))



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libclc] 21508fa - libclc: clspv: fix fma, add vstore and fix inlining issues

2023-05-09 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2023-05-09T16:52:13+01:00
New Revision: 21508fa76914a5e4281dc5bc77cac7f2e8bc3aef

URL: 
https://github.com/llvm/llvm-project/commit/21508fa76914a5e4281dc5bc77cac7f2e8bc3aef
DIFF: 
https://github.com/llvm/llvm-project/commit/21508fa76914a5e4281dc5bc77cac7f2e8bc3aef.diff

LOG: libclc: clspv: fix fma, add vstore and fix inlining issues

https://reviews.llvm.org/D147773

Patch by Romaric Jodin 

Added: 
libclc/clspv/lib/shared/vstore_half.cl
libclc/clspv/lib/shared/vstore_half.inc

Modified: 
libclc/CMakeLists.txt
libclc/clspv/lib/SOURCES
libclc/clspv/lib/math/fma.cl
libclc/generic/include/clc/clcfunc.h

Removed: 




diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 89f08b889ea1e..0eda12670b710 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -271,11 +271,11 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( spvflags --spirv-max-version=1.1 )
elseif( ${ARCH} STREQUAL "clspv" )
set( t "spir--" )
-   set( build_flags )
+   set( build_flags "-Wno-unknown-assumption")
set( opt_flags -O3 )
elseif( ${ARCH} STREQUAL "clspv64" )
set( t "spir64--" )
-   set( build_flags )
+   set( build_flags "-Wno-unknown-assumption")
set( opt_flags -O3 )
else()
set( build_flags )

diff  --git a/libclc/clspv/lib/SOURCES b/libclc/clspv/lib/SOURCES
index 98bc71a869b2a..7c369aa379e98 100644
--- a/libclc/clspv/lib/SOURCES
+++ b/libclc/clspv/lib/SOURCES
@@ -1,5 +1,6 @@
 math/fma.cl
 math/nextafter.cl
+shared/vstore_half.cl
 subnormal_config.cl
 ../../generic/lib/geometric/distance.cl
 ../../generic/lib/geometric/length.cl
@@ -45,6 +46,12 @@ subnormal_config.cl
 ../../generic/lib/math/frexp.cl
 ../../generic/lib/math/half_cos.cl
 ../../generic/lib/math/half_divide.cl
+../../generic/lib/math/half_exp.cl
+../../generic/lib/math/half_exp10.cl
+../../generic/lib/math/half_exp2.cl
+../../generic/lib/math/half_log.cl
+../../generic/lib/math/half_log10.cl
+../../generic/lib/math/half_log2.cl
 ../../generic/lib/math/half_powr.cl
 ../../generic/lib/math/half_recip.cl
 ../../generic/lib/math/half_sin.cl

diff  --git a/libclc/clspv/lib/math/fma.cl b/libclc/clspv/lib/math/fma.cl
index fdc8b8b296876..4f2806933eda9 100644
--- a/libclc/clspv/lib/math/fma.cl
+++ b/libclc/clspv/lib/math/fma.cl
@@ -34,6 +34,92 @@ struct fp {
   uint sign;
 };
 
+static uint2 u2_set(uint hi, uint lo) {
+  uint2 res;
+  res.lo = lo;
+  res.hi = hi;
+  return res;
+}
+
+static uint2 u2_set_u(uint val) { return u2_set(0, val); }
+
+static uint2 u2_mul(uint a, uint b) {
+  uint2 res;
+  res.hi = mul_hi(a, b);
+  res.lo = a * b;
+  return res;
+}
+
+static uint2 u2_sll(uint2 val, uint shift) {
+  if (shift == 0)
+return val;
+  if (shift < 32) {
+val.hi <<= shift;
+val.hi |= val.lo >> (32 - shift);
+val.lo <<= shift;
+  } else {
+val.hi = val.lo << (shift - 32);
+val.lo = 0;
+  }
+  return val;
+}
+
+static uint2 u2_srl(uint2 val, uint shift) {
+  if (shift == 0)
+return val;
+  if (shift < 32) {
+val.lo >>= shift;
+val.lo |= val.hi << (32 - shift);
+val.hi >>= shift;
+  } else {
+val.lo = val.hi >> (shift - 32);
+val.hi = 0;
+  }
+  return val;
+}
+
+static uint2 u2_or(uint2 a, uint b) {
+  a.lo |= b;
+  return a;
+}
+
+static uint2 u2_and(uint2 a, uint2 b) {
+  a.lo &= b.lo;
+  a.hi &= b.hi;
+  return a;
+}
+
+static uint2 u2_add(uint2 a, uint2 b) {
+  uint carry = (hadd(a.lo, b.lo) >> 31) & 0x1;
+  a.lo += b.lo;
+  a.hi += b.hi + carry;
+  return a;
+}
+
+static uint2 u2_add_u(uint2 a, uint b) { return u2_add(a, u2_set_u(b)); }
+
+static uint2 u2_inv(uint2 a) {
+  a.lo = ~a.lo;
+  a.hi = ~a.hi;
+  return u2_add_u(a, 1);
+}
+
+static uint u2_clz(uint2 a) {
+  uint leading_zeroes = clz(a.hi);
+  if (leading_zeroes == 32) {
+leading_zeroes += clz(a.lo);
+  }
+  return leading_zeroes;
+}
+
+static bool u2_eq(uint2 a, uint2 b) { return a.lo == b.lo && a.hi == b.hi; }
+
+static bool u2_zero(uint2 a) { return u2_eq(a, u2_set_u(0)); }
+
+static bool u2_gt(uint2 a, uint2 b) {
+  return a.hi > b.hi || (a.hi == b.hi && a.lo > b.lo);
+}
+
 _CLC_DEF _CLC_OVERLOAD float fma(float a, float b, float c) {
   /* special cases */
   if (isnan(a) || isnan(b) || isnan(c) || isinf(a) || isinf(b)) {
@@ -63,12 +149,9 @@ _CLC_DEF _CLC_OVERLOAD float fma(float a, float b, float c) 
{
   st_b.exponent = b == .0f ? 0 : ((as_uint(b) & 0x7f80) >> 23) - 127;
   st_c.exponent = c == .0f ? 0 : ((as_uint(c) & 0x7f80) >> 23) - 127;
 
-  st_a.mantissa.lo = a == .0f ? 0 : (as_uint(a) & 0x7f) | 0x80;
-  st_b.mantissa.lo = b == .0f ? 0 : (as_uint(b) & 0x7f) | 0x80;
-  st_c.mantissa.lo = c == .0f ? 0 : (as_uint(c

[libclc] ec0a880 - libclc: Add clspv64 target

2022-01-13 Thread Kévin Petit via cfe-commits

Author: Kévin Petit
Date: 2022-01-13T09:28:19Z
New Revision: ec0a880d54632923b4d0742f38d565830fc0d0e0

URL: 
https://github.com/llvm/llvm-project/commit/ec0a880d54632923b4d0742f38d565830fc0d0e0
DIFF: 
https://github.com/llvm/llvm-project/commit/ec0a880d54632923b4d0742f38d565830fc0d0e0.diff

LOG: libclc: Add clspv64 target

Add a variant of the clspv target that is built using spir64.
This is a pre-requisite to supporting spir64 in clspv which is
required to take advantage of SPV_KHR_physical_storage_buffer which
in turn enables more OpenCL C programs to be compiled with clspv.

https://reviews.llvm.org/D116668

Added: 
libclc/clspv64

Modified: 
libclc/CMakeLists.txt

Removed: 




diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index e90e0fd852012..9773b2cc925ff 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -8,6 +8,7 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
   amdgcn-mesa3d/lib/SOURCES;
   amdgpu/lib/SOURCES;
   clspv/lib/SOURCES;
+  clspv64/lib/SOURCES;
   generic/lib/SOURCES;
   ptx/lib/SOURCES;
   ptx-nvidiacl/lib/SOURCES;
@@ -21,6 +22,7 @@ set( LIBCLC_TARGETS_ALL
   amdgcn--
   amdgcn--amdhsa
   clspv--
+  clspv64--
   r600--
   nvptx--
   nvptx64--
@@ -156,6 +158,7 @@ set( amdgcn--_devices tahiti )
 set( amdgcn-mesa-mesa3d_devices ${amdgcn--_devices} )
 set( amdgcn--amdhsa_devices none )
 set( clspv--_devices none )
+set( clspv64--_devices none )
 set( nvptx--_devices none )
 set( nvptx64--_devices none )
 set( nvptx--nvidiacl_devices none )
@@ -214,7 +217,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
 
set( dirs )
 
-   if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND 
NOT ${ARCH} STREQUAL clspv )
+   if ( NOT ${ARCH} STREQUAL spirv AND NOT ${ARCH} STREQUAL spirv64 AND
+NOT ${ARCH} STREQUAL clspv AND NOT ${ARCH} STREQUAL 
clspv64)
LIST( APPEND dirs generic )
endif()
 
@@ -245,7 +249,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
 
# Add the generated convert.cl here to prevent adding
# the one listed in SOURCES
-   if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND 
NOT ${ARCH} STREQUAL "clspv" )
+   if( NOT ${ARCH} STREQUAL "spirv" AND NOT ${ARCH} STREQUAL "spirv64" AND
+   NOT ${ARCH} STREQUAL "clspv" AND NOT ${ARCH} STREQUAL 
"clspv64" )
set( rel_files convert.cl )
set( objects convert.cl )
if( NOT ENABLE_RUNTIME_SUBNORMAL )
@@ -299,6 +304,10 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( t "spir--" )
set( build_flags )
set( opt_flags -O3 )
+   elseif( ${ARCH} STREQUAL "clspv64" )
+   set( t "spir64--" )
+   set( build_flags )
+   set( opt_flags -O3 )
else()
set( build_flags )
set( opt_flags -O3 )

diff  --git a/libclc/clspv64 b/libclc/clspv64
new file mode 12
index 0..ea01ba94bc636
--- /dev/null
+++ b/libclc/clspv64
@@ -0,0 +1 @@
+clspv
\ No newline at end of file



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (PR #113145)

2024-10-21 Thread Kévin Petit via cfe-commits

https://github.com/kpet closed https://github.com/llvm/llvm-project/pull/113145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (PR #113145)

2024-10-21 Thread Kévin Petit via cfe-commits

kpet wrote:

AFAICT, the new tests ran and the failed tests are completely unrelated to this 
change. Merging.

https://github.com/llvm/llvm-project/pull/113145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (PR #113145)

2024-10-21 Thread Kévin Petit via cfe-commits

https://github.com/kpet approved this pull request.

LGTM, thanks!

https://github.com/llvm/llvm-project/pull/113145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [OpenCL] Add cl_ext_image_unsigned_10x6_12x4_14x2 extension (PR #134216)

2025-04-03 Thread Kévin Petit via cfe-commits

https://github.com/kpet approved this pull request.

LGTM, thanks! (The definitions match the specification, tests ran, CI failures 
look unrelated.)

https://github.com/llvm/llvm-project/pull/134216
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits