rjodinchr wrote:
@AnastasiaStulova Could you please take a look? thanks
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
What is the next step to get this PR merged?
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From 5614f89c90cf865c88fbcf95d707e34dfeb18a19 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: update gen_convert.cl for clspv
Add a clspv swi
https://github.com/rjodinchr edited
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
https://github.com/rjodinchr edited
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
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From a6146bbc90d198d62d516bf09a41034f36f7866c Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: update gen_convert.cl for clspv
Add a clspv swi
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From 8d2b49e198feb8ec3d836b871178b14c161c4d5d Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: update gen_convert.cl for clspv
Add a clspv swi
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From 79427445538b3abeda08224e48484ddac1342243 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: update gen_convert.cl for clspv
Add a clspv swi
@@ -26,6 +27,12 @@
#
# convert_<_sat><_roundingMode>()
+import sys
+
+clspv = False
+if len(sys.argv) == 2 and sys.argv[1] == "--clspv":
+clspv = True
+
rjodinchr wrote:
I wanted to avoid the dependency on argparse to be added. But Python version
not hav
@@ -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}){
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From c5f3c0a72bf5b52f7f92df3bcc00a7c5b9001a5c Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: update gen_convert.cl for clspv
Add a clspv swi
https://github.com/rjodinchr edited
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
rjodinchr wrote:
@arsenm?
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr edited
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66651
>From b6df142239256e979a70896f324f9ed3547c640c Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Mon, 18 Sep 2023 09:34:56 +0200
Subject: [PATCH 1/2] Revert "clang/OpenCL: Add inline implementations of sqrt
i
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+ CI->getCalledFunction()->getName().contain
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66651
>From b6df142239256e979a70896f324f9ed3547c640c Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Mon, 18 Sep 2023 09:34:56 +0200
Subject: [PATCH 1/2] Revert "clang/OpenCL: Add inline implementations of sqrt
i
https://github.com/rjodinchr resolved
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/66901
libclc does not have a half implementation for erf/erfc
Add one based on the float implementation by extending the input and truncating
the output.
>From 64826c23cfaef764c9a60600a2c0e96244c95cf6 Mon Sep 17 00:
rjodinchr wrote:
@kpet @alan-baker could you review this PR please?
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
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/66902
Create clspv own convert.cl
This is needed as Vulkan SPIR-V does not respect the assumptions needed to have
the generic convert.cl compliant on many platforms.
It is needed because of the conversion of TYPE_MA
rjodinchr wrote:
@kpet @alan-baker could you review this PR please?
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
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/66902
>From 67e347f9987b48652daaaceb4a51041f7b9a1430 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 18 Jul 2023 09:30:09 +0200
Subject: [PATCH] libclc: clspv: create gen_convert.cl for clspv
Create clspv ow
rjodinchr wrote:
@arsenm Could you review this PR again please?
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+ CI->getCalledFunction()->getName().startsw
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+ CI->getCalledFunction()->getName().startsw
rjodinchr wrote:
@arsenm could you have another look at this PR?
Thank you
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/66651
This is reverting the previous implementation to avoid adding inline function
in opencl headers.
This was breaking clspv flow google/clspv#1231, while
https://reviews.llvm.org/D156743 mentioned that just decor
rjodinchr wrote:
@alan-baker @arsenm @AnastasiaStulova
Could you review this PR please?
Thank you
https://github.com/llvm/llvm-project/pull/66651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
@@ -358,3 +399,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
endif()
endforeach( d )
endforeach( t )
+
+if( NOT LIBCLC_STANDALONE_BUILD )
+ add_subdirectory( test )
rjodinchr wrote:
There is no `CMakeLists.txt` in `/llvm/libclc/test`.
https://github.com
rjodinchr wrote:
> > ```
> > set( spv_suffix ${arch_suffix}.spv )
> > add_custom_command( OUTPUT "${spv_suffix}"
> > COMMAND ${LLVM_SPIRV} ${spvflags} -o "${spv_suffix}"
> > ${builtins_opt_lib_tgt}
> > DEPENDS ${builtins_link_lib_tgt} )
> > ```
> >
> >
> >
> >
https://github.com/rjodinchr approved this pull request.
https://github.com/llvm/llvm-project/pull/87622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -181,3 +181,15 @@ _CLC_OVERLOAD _CLC_DEF double atan(double x)
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, atan, double);
#endif // cl_khr_fp64
+
+#ifdef cl_khr_fp16
rjodinchr wrote:
I agree, but I had some weird compilation errors. Does it work o
@@ -181,3 +181,15 @@ _CLC_OVERLOAD _CLC_DEF double atan(double x)
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, atan, double);
#endif // cl_khr_fp64
+
+#ifdef cl_khr_fp16
rjodinchr wrote:
Alright, just found that it is due to includes order in `atan.cl
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/98149
>From 449321d1d22c39201e132cbd8b5846cbe12dbe39 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 9 Jul 2024 14:22:26 +0200
Subject: [PATCH] libclc: increase fp16 support
Increase fp16 support to allow cl
rjodinchr wrote:
Also, just leave that thought here: A next step might be to use `native`
functions instead (when available). They should provide enough precision for
half, but be more performance. Also as the accuracy is undefined for those
functions, maybe it should be an opt-in option in th
rjodinchr wrote:
> @rjodinchr I was about to merge and noticed your email is hidden. I just
> wanted to check with you whether you want to make it public, as per the
> discussion
> https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it/74223/67.
> AFAICT there's
rjodinchr wrote:
I am able to reproduce it, working on it right now
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/99481
Fix following update of libclc introducing more fp16 support:
https://github.com/llvm/llvm-project/commit/7e6a73959ae97b1f9476a90290a492ba90cb950d
>From 63f5f5a57c55dce7c2cdcbddff8f80817104f48e Mon Sep 17 00:0
rjodinchr wrote:
@frasercrmck could you please review? thanks
https://github.com/llvm/llvm-project/pull/99481
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
This PR should fix the build issue:
https://github.com/llvm/llvm-project/pull/99481
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/99841
None
>From 009987936213d404a7dd28b5f1551ce85e6c8560 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Mon, 22 Jul 2024 09:44:01 +0200
Subject: [PATCH] libclc: add half version of 'sign'
---
libclc/generic/l
rjodinchr wrote:
@mgorny thank you for the report. It should be fixed with:
https://github.com/llvm/llvm-project/pull/99841
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
rjodinchr wrote:
@frasercrmck could you review please?
https://github.com/llvm/llvm-project/pull/99841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/98149
Increase fp16 support to allow clspv to continue to be OpenCL compliant
following the update of the OpenCL-CTS adding more testing on math functions
and conversions with half.
Math functions are implemented b
rjodinchr wrote:
Those implementations have been tested using 1 Intel and 1 AMD devices (with
clvk/clspv)
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
rjodinchr wrote:
@alan-baker @kpet , could you please review?
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/98149
>From c03c6e3a746fe6bfaf164151278db3cd32111f19 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 9 Jul 2024 14:22:26 +0200
Subject: [PATCH] libclc: increase fp16 support
Increase fp16 support to allow cl
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/98149
>From a387a97cc6ed89c65a9a80bc030e705ec864bf36 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 9 Jul 2024 14:22:26 +0200
Subject: [PATCH] libclc: increase fp16 support
Increase fp16 support to allow cl
rjodinchr wrote:
@frasercrmck Could you review it please?
https://github.com/llvm/llvm-project/pull/98149
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
> The libclc usage seems to have been added by @rjodinchr in
> https://reviews.llvm.org/D147773 (and approved by @alan-baker). Perhaps they
> have an opinion?
https://github.com/google/clspv uses the assume attribute. The goal is to be
able to put a mark on libclc functions t
rjodinchr wrote:
It has nothing to do with OpenMP.
The goal was just to get something in the llvm IR that we could check for. The
`assume` attribute allows us to pass a string that we can then check in a llvm
pass.
https://github.com/llvm/llvm-project/pull/84934
__
rjodinchr wrote:
> > It has nothing to do with OpenMP. The goal was just to get something in the
> > llvm IR that we could check for. The `assume` attribute allows us to pass a
> > string that we can then check in a llvm pass.
>
> Could you investigate whether 'annotate' would do what you want
rjodinchr wrote:
It is only to tag functions. I guess the name would be `clspv_libclc_builtin`
(https://github.com/llvm/llvm-project/blob/main/libclc/generic/include/clc/clcfunc.h#L11).
I've started to test with such a solution to make sure everything works on
clspv side, but I need more time.
rjodinchr wrote:
This is the first time I'm trying to add an attribute, and I think I am missing
something.
I am adding this part in `Attr.td`:
```
def ClspvLibclcBuiltin: DeclOrStmtAttr {
let Spellings = [Clang<"clspv_libclc_builtin">];
let Documentation = [Undocumented];
let SimpleHandle
rjodinchr wrote:
Alright with those changes, everything should be fine for `clspv`:
```
diff --git a/clang/include/clang/Basic/Attr.td
b/clang/include/clang/Basic/Attr.td
index dc87a8c6f022..056f22b56001 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -4
rjodinchr wrote:
I'll make a PR for clspv then
https://github.com/llvm/llvm-project/pull/84934
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/92126
Instead add a proper attribute in clang, and add convert it to function
metadata to keep the information in the IR. The goal is to remove the
dependency on __attribute__((assume)) that should have not be there
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/92126
>From 41e2a5c3fd693fad20e2f76d1a39a1ac9468a33b Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 14 May 2024 16:08:26 +0200
Subject: [PATCH] libclc: remove __attribute__((assume)) for clspv targets
Inste
rjodinchr wrote:
Here is the PR ready for review: https://github.com/llvm/llvm-project/pull/92126
https://github.com/llvm/llvm-project/pull/84934
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -4561,3 +4561,9 @@ def CodeAlign: StmtAttr {
static constexpr int MaximumAlignment = 4096;
}];
}
+
+def ClspvLibclcBuiltin: DeclOrStmtAttr {
+ let Spellings = [Clang<"clspv_libclc_builtin">];
+ let Documentation = [Undocumented];
+ let SimpleHandler = 1;
---
@@ -4561,3 +4561,9 @@ def CodeAlign: StmtAttr {
static constexpr int MaximumAlignment = 4096;
}];
}
+
+def ClspvLibclcBuiltin: DeclOrStmtAttr {
+ let Spellings = [Clang<"clspv_libclc_builtin">];
+ let Documentation = [Undocumented];
rjodinchr wrote:
Wh
rjodinchr wrote:
@erichkeane, I don't know what you expect for the release note, where should I
write something?
https://github.com/llvm/llvm-project/pull/92126
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/92126
>From 05fd8c24146a5237c7c4cc425beb205524429ba7 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 14 May 2024 16:08:26 +0200
Subject: [PATCH] libclc: remove __attribute__((assume)) for clspv targets
Inste
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/92126
>From df793384bdb689b3b74ca83102a539a1db623e9f Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 14 May 2024 16:08:26 +0200
Subject: [PATCH] libclc: remove __attribute__((assume)) for clspv targets
Inste
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/92126
>From 4ce295d3dbd7a5b723cdf410d2023eb59120d27a Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 14 May 2024 16:08:26 +0200
Subject: [PATCH] libclc: remove __attribute__((assume)) for clspv targets
Inste
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/92126
>From c8798839ee93caa9e5a3db6d770801a4c22010c8 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Tue, 14 May 2024 16:08:26 +0200
Subject: [PATCH] libclc: remove __attribute__((assume)) for clspv targets
Inste
rjodinchr wrote:
Is there something else needed on my side to get that PR merged?
https://github.com/llvm/llvm-project/pull/92126
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
> CC @rjodinchr. I realise now that this idea may prove problematic for
> `clspv`/`clspv64` targets. If this idea were to taken further, things like
> OpenCL `minmag` would call `__clc_minmag` which would call `__clc_fabs`
> (e.g.), but I notice `fabs` is not implemented in `c
@@ -0,0 +1,21 @@
+#ifndef __CLC_INTEGER_CLC_CLZ_H__
+#define __CLC_INTEGER_CLC_CLZ_H__
+
+#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
+// clspv and spir-v targets provide their own OpenCL-compatible clz
+#define __clc_clz clz
rjodinchr wrote:
On the `clspv` side
@@ -0,0 +1,21 @@
+#ifndef __CLC_INTEGER_CLC_CLZ_H__
+#define __CLC_INTEGER_CLC_CLZ_H__
+
+#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
+// clspv and spir-v targets provide their own OpenCL-compatible clz
+#define __clc_clz clz
rjodinchr wrote:
I don't think the s
rjodinchr wrote:
@frasercrmck, could you review please?
https://github.com/llvm/llvm-project/pull/124614
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/124614
clc_isnan.cl is needed since https://github.com/llvm/llvm-project/pull/124097
>From 1c11070d2f2997b76412e7be07fa05501147c5ff Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Mon, 27 Jan 2025 20:21:31 +0100
rjodinchr wrote:
I think for `clspv`, we would need to invert the condition to skip user-facing
functions. By that I mean that `clspv` will need all the `convert_*` functions,
and not the `__clc_convert_*_rte`. Then we will need to update `clspv` to
support natively the function with the `__cl
rjodinchr wrote:
@frasercrmck , I cannot merge it myself, could you do it please?
> Should spirv/SOURCES and spirv64/SOURCES receive the same thing?
I'm not sure, I would guess yes, but without testing it, it's hard to be 100%
sure.
https://github.com/llvm/llvm-project/pull/124614
___
rjodinchr wrote:
Thank you
https://github.com/llvm/llvm-project/pull/124614
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
In fact my setup was busted. In the end it seems to work without change.
https://github.com/llvm/llvm-project/pull/124727
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
rjodinchr wrote:
This is not correct for `clspv`. It breaks everything and it feels like it
needs quite some work to fix. FYI, I'll be OOO from Feb 3 to Feb 21. Can it
wait that long? I'm not sure I'll have enough time to figure it out before the
end of the week.
https://github.com/llvm/llvm-
rjodinchr wrote:
clspv's `check-spirv` is what you want to test yes. But I was running within
Google infra to try directly using the OpenCL-CTS.
https://github.com/llvm/llvm-project/pull/124727
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH] libclc: erfc: fix fp32 implementation
On some implementation,
rjodinchr wrote:
@frasercrmck could you review please?
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
> Though this does seem to be an improvement so it might be worth merging
> anyway. As you say, it fixes things for you and for mesa. Are you both
> testing on FTZ implementations, by any chance?
Yes, default run of the CTS using clvk ends up running with FTZ.
https://github.
rjodinchr wrote:
> It might be worth re-titling the PR to mention FTZ mode?
Sure, I'm not sure what you have in mind, but feel free to do it when
submitting it upstream (I cannot do it myself)
https://github.com/llvm/llvm-project/pull/132390
___
cfe-
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH 1/2] libclc: erfc: fix fp32 implementation
On some implementat
rjodinchr wrote:
This is failing with `fp32`. The failing value is very close to zero (it's a
denormal), I think something is going wrong with `x == __CLC_FP_LIT(0.0)` when
computing `is_inf_nan_or_zero`.
Maybe a bug inside Swiftshader with denormal comparison to zero?
https://github.com/llvm/
rjodinchr wrote:
But maybe it is just masking a swiftshader bug?
https://github.com/llvm/llvm-project/pull/129871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
The following patch is fixing the issue on my side:
```
- __CLC_INTN is_inf_nan_or_zero =
- x == __CLC_FP_LIT(0.0) || __clc_isinf(x) || __clc_isnan(x);
+ __CLC_INTN is_inf_nan_or_zero =
+ ai == (__CLC_INTN)0 || e == (__CLC_INTN)129 || __clc_isinf(x) ||
__clc_isnan(
rjodinchr wrote:
This commit breaks running with clvk & Swiftshader. Not a big deal on my side.
Just wanted to let you know.
https://github.com/llvm/llvm-project/pull/129871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/132390
On some implementation, the current implementation lead to slight accuracy
issues.
While the maths behing this implementation is correct, it does not take into
account the accumulation of errors coming from o
https://github.com/rjodinchr edited
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
@karolherbst could you try this patch to see if it fixes rusticl as well?
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/rjodinchr edited
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH 1/3] libclc: erfc: fix fp32 implementation
On some implementat
rjodinchr wrote:
I'm clearly seeing those devices returning true when comparing subnormals to
zero. So either they all have a bug, or the SPIR-V code produced by `clspv` is
buggy.
If it ends up being a bug from the device, we might want to have something more
architecture friendly, or at least
@@ -26,7 +26,7 @@ __clc_frexp(__CLC_GENTYPE x, __CLC_ADDRESS_SPACE __CLC_INTN
*ep) {
(ai & (__CLC_INTN)MANTBITS_SP32);
__CLC_INTN is_inf_nan_or_zero =
- x == __CLC_FP_LIT(0.0) || __clc_isinf(x) || __clc_isnan(x);
+ ai == (__CLC_INTN)0 || __clc_isinf(x) || __
@@ -26,7 +26,7 @@ __clc_frexp(__CLC_GENTYPE x, __CLC_ADDRESS_SPACE __CLC_INTN
*ep) {
(ai & (__CLC_INTN)MANTBITS_SP32);
__CLC_INTN is_inf_nan_or_zero =
- x == __CLC_FP_LIT(0.0) || __clc_isinf(x) || __clc_isnan(x);
+ ai == (__CLC_INTN)0 || __clc_isinf(x) || __
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/135002
clspv is already handling generation of fp16. This implementation is preventing
clspv from making the best choice to use an emulation on top of fp32-fma, or
the native fp16-fma, depending on the command-line
rjodinchr wrote:
@frasercrmck , could you please review, and merge when approved? Thank you 🙏
https://github.com/llvm/llvm-project/pull/135002
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
rjodinchr wrote:
yes wrong results:
```
ERROR: frexp: {-8404992.00, 139} ulp error at 0x1.008p-140: *{0x1.008p-1,
-139} vs. {0x1.008p-140, 0}
```
https://github.com/llvm/llvm-project/pull/129871
___
cfe-commits mailing list
cfe-commits@lists.llvm.
rjodinchr wrote:
I've deployed that patch into ChromeOS, and now Intel, Qualcomm and Imagination
are also failing. I need to have a closer look to see if anything can be
changed in `clspv` to fix it, but I might end-up needing the fix mentioned a
few weeks ago.
https://github.com/llvm/llvm-pr
1 - 100 of 112 matches
Mail list logo