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
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
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
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
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
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
@@ -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:
@@ -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;
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://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
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
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
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
@@
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
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
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
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:
> 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
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
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} )
> > ```
> >
> >
> >
> >
@@ -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 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 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
@@ -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,
@@ -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
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
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
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
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 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
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
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
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
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+
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
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
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 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
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/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
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 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
@@ -5612,6 +5612,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
,
BundleList);
EmitBlock(Cont);
}
+ if (CI->getCalledFunction() && CI->getCalledFunction()->hasName() &&
+
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
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
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://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
50 matches
Mail list logo