https://github.com/wenju-he approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/147490
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> > > Perhaps we need a stripped down OpenCL header, like
> > > `clc/opencl/opencl-base.h` which includes just the types and macro defs?
> >
> >
> > See #146840 for an example of this approach.
>
> thanks @frasercrmck I'll update OpenCL headers of this PR after #146840 is
> l
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/147244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/147244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> This isn't `NFC`, though?
Removed `NFC`. I was not seeing changes in OpenCL bitcode files.
https://github.com/llvm/llvm-project/pull/147244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/147244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/147244
None
>From c839f41508410f0fba1206d4b1cf34e52b92fa65 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 7 Jul 2025 09:07:45 +0200
Subject: [PATCH] [NFC][libclc] Fix typo in OpenCL header math/sincos.h
---
lib
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/146814
>From 6429b5538dcfcd9de262f6f0a49d8283db8f5db9 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 2 Jul 2025 17:11:56 -0700
Subject: [PATCH 1/2] [libclc] Add generic implementation of some atomic
functions in
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/146999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/146840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/146814
>From 6429b5538dcfcd9de262f6f0a49d8283db8f5db9 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 2 Jul 2025 17:11:56 -0700
Subject: [PATCH 1/2] [libclc] Add generic implementation of some atomic
functions in
wenju-he wrote:
> > Perhaps we need a stripped down OpenCL header, like
> > `clc/opencl/opencl-base.h` which includes just the types and macro defs?
>
> See #146840 for an example of this approach.
thanks @frasercrmck I'll update OpenCL headers of this PR after #146840 is
landed.
https://git
@@ -6,5 +6,12 @@
//
//===--===//
+#ifndef __CLC_OPENCL_OPENCL_INTEGER_ABS_H__
wenju-he wrote:
```suggestion
#ifndef __CLC_OPENCL_INTEGER_ABS_H__
```
one OPENCL should be sufficient, right?
https://github.com/wenju-he approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/146833
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -120,14 +120,15 @@ function(link_bc)
endif()
add_custom_command(
-OUTPUT ${ARG_TARGET}.bc
-COMMAND ${llvm-link_exe} ${link_flags} -o ${ARG_TARGET}.bc
${LINK_INPUT_ARG}
+OUTPUT ${LIBCLC_ARCH_OBJFILE_DIR}/${ARG_TARGET}.bc
+COMMAND ${llvm-link_exe} ${link_
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/146298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -93,16 +73,6 @@
__SPIRV_BUILTIN_ALIAS(__builtin_spirv_generic_cast_to_ptr_explicit)
__private const void *
__spirv_GenericCastToPtrExplicit_ToPrivate(__generic const void *,
int) __SPIRV_NOEXCEPT;
-extern __SPIRV_overloadable
-__SP
wenju-he wrote:
> I am seeing unresolved CLC functions in `nvptx--.bc` and `nvptx64--.bc`. I
> think it's because we're now building things like `get_num_groups` for
> `nvptx`/`nvptx64`, whereas previously they were not being built for those
> targets. We're also not building `__clc_get_num_gr
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/144333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/146495
None
>From a13dff8a3dbff76836ca31e71fe4265dc078a2be Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 1 Jul 2025 10:58:21 +0200
Subject: [PATCH] [libclc] Add missing clc_lgamma_r with generic address space
p
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/146495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/146485
In OpenCL Extended Instruction Set Specificatio, nancode can be signed integer
or vector of signed integers values.
This PR has no change to amdgcn--amdhsa.bc and nvptx64--nvidiacl.bc because the
newly added c
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/145678
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -115,16 +85,6 @@ __spirv_GenericCastToPtr_ToGlobal(__generic const void *p,
int) __SPIRV_NOEXCEPT {
return (__global const void *)p;
}
-static __SPIRV_overloadable __SPIRV_inline __global volatile void *
wenju-he wrote:
s
@@ -93,16 +73,6 @@
__SPIRV_BUILTIN_ALIAS(__builtin_spirv_generic_cast_to_ptr_explicit)
__private const void *
__spirv_GenericCastToPtrExplicit_ToPrivate(__generic const void *,
int) __SPIRV_NOEXCEPT;
-extern __SPIRV_overloadable
-__SP
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/146298
They are generally implemented with pointer comparison. Volatile is not needed
because memory pointed to by the pointer isn't accessed.
>From f77e5b48204609cb9b0c1c4dd6684de013be5008 Mon Sep 17 00:00:00 2001
F
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/146298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/146298
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,121 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/145678
With this PR, if we have customized implementation for scalar or vector length
= 2, we don't need to write new macros, e.g.
https://github.com/intel/llvm/blob/fb18321705f6/libclc/clc/include/clc/clcmacro.h#L15
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/145458
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,17 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/145458
>From 0cbf5c96077bce977168497670e3ffae9e70e5d5 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 24 Jun 2025 06:59:27 +0200
Subject: [PATCH 1/2] [NFC][libclc] Replace and delete
_CLC_DEFINE_UNARY/BINARY/TERNA
@@ -0,0 +1,17 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/145458
>From 0cbf5c96077bce977168497670e3ffae9e70e5d5 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 24 Jun 2025 06:59:27 +0200
Subject: [PATCH 1/3] [NFC][libclc] Replace and delete
_CLC_DEFINE_UNARY/BINARY/TERNA
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/145458
Also delete unused _CLC_DEFINE_BINARY_BUILTIN_WITH_SCALAR_SECOND_ARG,
_CLC_DEFINE_UNARY_BUILTIN_FP16 and _CLC_DEFINE_BINARY_BUILTIN_FP16.
llvm-diff shows no change to nvptx64--nvidiacl.bc and amdgcn--amdhsa.bc
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/144686
>From b5c9a4834accbac18664f1431acc5204c0527fa8 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 18 Jun 2025 14:21:09 +0200
Subject: [PATCH 1/7] [InstCombine] Don't folder select to or if value argument
is us
@@ -0,0 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --version 5
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=instcombine %s | FileCheck %s
+
+; Check that `select B, true, C` isn't optimized to `or B, C`,
+; because the inval
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/144686
>From b5c9a4834accbac18664f1431acc5204c0527fa8 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 18 Jun 2025 14:21:09 +0200
Subject: [PATCH 1/6] [InstCombine] Don't folder select to or if value argument
is us
wenju-he wrote:
> For the purposes of this PR, I think you should only change
> canCreateUndefOrPoison to return true and just eat the regressions.
done. Please let me know if we should add FIXME for the regression in
clang/test/CodeGenOpenCL/amdgcn-buffer-rsrc-type.cl and
llvm/test/Transfor
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/144686
>From b5c9a4834accbac18664f1431acc5204c0527fa8 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 18 Jun 2025 14:21:09 +0200
Subject: [PATCH 1/5] [InstCombine] Don't folder select to or if value argument
is us
wenju-he wrote:
> For the purposes of this PR, I think you should only change
> canCreateUndefOrPoison to return true and just eat the regressions. We can
> follow up with using isValidAddrSpaceCast() in a followup, because it will be
> less straightforward. I'm not willing to accept direct us
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/144686
>From b5c9a4834accbac18664f1431acc5204c0527fa8 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 18 Jun 2025 14:21:09 +0200
Subject: [PATCH 1/4] [InstCombine] Don't folder select to or if value argument
is us
wenju-he wrote:
> Is an issue here perhaps that downstream users may have implemented (e.g.)
> `get_global_offset` in their toolchains, but after this change they'll
> suddenly see a definition of this function that they're not expecting?
>
> I suppose they would have to implement CLC function
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/144333
Changes in this PR:
* Declare all workitem functions in clc and opencl folders.
* Call clc workitem function in corresponding OpenCL workitem function.
* Move ptx-nvidiacl workitem built-in implementations into
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/143331
NV supports opencl_3d_image_writes according
https://developer.nvidia.com/blog/nvidia-is-now-opencl-3-0-conformant/
This PR allows removing explicit enabling of image extensions via -cl-ext
command line option
wenju-he wrote:
thank you @nathanchance for the review.
https://github.com/llvm/llvm-project/pull/142509
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/142509
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/142922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/142922
llvm-diff shows no change to amdgcn--amdhsa.bc
>From 42c4efab1a163624d7a3b327742d7e38bb7197b3 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 5 Jun 2025 01:14:38 -0700
Subject: [PATCH] [NFC][libclc] Simplif
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/141721
llvm-diff shows no change to amdgcn--amdhsa.bc
>From 72d456f335d78b8ae7e1d25a0229e9f9f89a466b Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 27 May 2025 23:50:32 -0700
Subject: [PATCH] [libclc] Move prefet
wenju-he wrote:
> do we know why
> https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td#L5894-L5901
> doesn't declare _EQ version for cc1?
Git history shows the earliest commit
https://github.com/llvm/llvm-project/commit/f3e624ca73b007552554b31358f4abde9eb2d3b7
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/140870
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/140870
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/140870
>From f5e675f17ea737b0668e626f34d013153368425e Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 21 May 2025 02:08:34 -0700
Subject: [PATCH 1/3] [ClangTool] Use CC1Option flag resource-dir in
injectResourceDi
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/140870
>From f5e675f17ea737b0668e626f34d013153368425e Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 21 May 2025 02:08:34 -0700
Subject: [PATCH 1/2] [ClangTool] Use CC1Option flag resource-dir in
injectResourceDi
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/140870
This PR fixes ClangTool error in -cc1 mode:
error: unknown argument: '-resource-dir=
>From f5e675f17ea737b0668e626f34d013153368425e Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 21 May 2025 02:08:34 -0700
@@ -6,41 +6,14 @@
//
//===--===//
-#define _CLC_SHUFFLE2_DECL(TYPE, MASKTYPE, RETTYPE)
\
- _CLC_OVERLOAD _CLC_DECL RETTYPE shuffle2(TYPE x, TYPE y, MASKTYPE mask);
+#define __CLC_
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/140679
>From 5015512439f6ba846223b1d04e71d8cdae36d3fa Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 19 May 2025 22:14:55 -0700
Subject: [PATCH 1/2] [libclc] Re-use shuffle_decl.inc in OpenCL shuffle2
declaration
wenju-he wrote:
> Sorry, just merged #140557 so you'll have to fix the conflicts before merging.
done, thanks
https://github.com/llvm/llvm-project/pull/140679
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/140679
>From 5015512439f6ba846223b1d04e71d8cdae36d3fa Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 19 May 2025 22:14:55 -0700
Subject: [PATCH] [libclc] Re-use shuffle_decl.inc in OpenCL shuffle2
declaration
Al
wenju-he wrote:
> Sure, no problem. You can probably request [commit
> access](https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access)
> by now, though.
thanks @frasercrmck
I've requested at https://github.com/llvm/llvm-project/issues/140521, please
help to review, thank you.
ht
wenju-he wrote:
@frasercrmck please help to merge, thanks
https://github.com/llvm/llvm-project/pull/139871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> I'd also like to rename those macros at some point as I think they obfuscate
> the kind of vectorization (basically, scalarization) going on.
LGTM
thanks @frasercrmck for the review. Please help to merge, thanks.
https://github.com/llvm/llvm-project/pull/140008
_
wenju-he wrote:
@frasercrmck please help to review, thanks.
https://github.com/llvm/llvm-project/pull/140008
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/140008
The previous method splits vector data into two halves. shuffle_vector
concatenates the two results into a vector data of original size. This PR
eliminates the use of shuffle_vector.
>From c17e8d57045e32d4602
wenju-he wrote:
@frasercrmck please help to review, thanks.
https://github.com/llvm/llvm-project/pull/139871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/139871
This enables file_specific_compile_options to take precedence over
ARG_COMPILE_FLAGS. For example, if we add -fno-slp-vectorize to COMPILE_OPTIONS
of a file, the behavior changes as follows:
* Before this PR:
wenju-he wrote:
> We could probably come up with some kind of combined `gentype.inc` that does
> them both at once
good idea.
https://github.com/llvm/llvm-project/pull/137932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -9,15 +9,31 @@
#define __CLC_DST_ADDR_SPACE local
#define __CLC_SRC_ADDR_SPACE global
#define __CLC_BODY
-#include
+#include
+#undef __CLC_DST_ADDR_SPACE
wenju-he wrote:
done, thanks for the suggestion
https://github.com/llvm/llvm-project/pull/137932
__
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/137932
>From cafb374de8d77c82fa450b732a122663090f6e34 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 30 Apr 2025 00:44:50 -0700
Subject: [PATCH 1/3] [libclc] Add v3 variants of
async_work_group_copy/async_work_gr
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/130882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
close this PR. Original intention of disabling opt -O3 on downstream project
was changed.
https://github.com/llvm/llvm-project/pull/130882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
wenju-he wrote:
@frasercrmck please help to review, thanks
https://github.com/llvm/llvm-project/pull/137932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/137932
3-component vector type is supported for them per OpenCL spec.
>From cafb374de8d77c82fa450b732a122663090f6e34 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 30 Apr 2025 00:44:50 -0700
Subject: [PATCH] [lib
@@ -420,12 +420,37 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
-D${CLC_TARGET_DEFINE}
# All libclc builtin libraries see CLC headers
-I${CMAKE_CURRENT_SOURCE_DIR}/clc/include
+ # Error on undefined macros
+ -Werror=undef
)
if( NOT "${cpu}"
wenju-he wrote:
thanks @frasercrmck
https://github.com/llvm/llvm-project/pull/136871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -429,7 +411,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
-list( APPEND build_flags -cl-std=${opencl_lang_std} )
+# Build for OpenCL 3.0 an
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135733
>From 64d7bfdceb5a0a6fbf34bb15cd7d6cbeb9214881 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 14 Apr 2025 19:20:25 -0700
Subject: [PATCH 1/6] [libclc] Set OpenCL version to 3.0
This PR is cherry-pick of ht
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> > LGTM. That means we compile for the last OpenCL version, which is 3.0, and
> > enable all OpenCL extensions/features, right?
>
> Yes. Otherwise you have to still write the code to work with the lowest
> common denominator.
done in commit
https://github.com/llvm/llvm-proje
wenju-he wrote:
> An OpenCL 1.2 module could still call a builtin that makes internal use of
> CLC `ctz`, for example.
Yes, you're right.
https://github.com/llvm/llvm-project/pull/135733
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135733
>From 64d7bfdceb5a0a6fbf34bb15cd7d6cbeb9214881 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 14 Apr 2025 19:20:25 -0700
Subject: [PATCH 1/5] [libclc] Set OpenCL version to 3.0
This PR is cherry-pick of ht
wenju-he wrote:
> You could just have `cos_fp32.cl` and `cos_fp16.cl`, of course.
Yes. To enable overriding generic implementation of `cos.cl`, the names in
target folder could be `cos.cl` and `cos_fp16.cl`
> I would like to further investigate weak linkage as another means of
> overriding sp
@@ -387,21 +387,39 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
-if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 )
+# 1.2 is Clang's default OpenCL C language standard to compile for.
+set( opencl_lang_std
wenju-he wrote:
> I'd expect the libclc build (or any other runtime support library) to
> consistently use the same language version independent of the target. If the
> target doesn't support that version (which IIRC isn't actually a hard error
> anywhere) and fails to compile on some feature,
wenju-he wrote:
> Another question would be whether or not we should be advertising a 2.X or
> 3.X library if we don't have all the builtins? Is this a degradation? That
> might depend on downstream toolchains and if/how they react to versioning
> info in the LLVM IR.
We can incrementally add
wenju-he wrote:
> Yes I think on reflection it's probably okay to compile for the highest
> supported OpenCL C version.
Yeah I think libclc should compile for the version that target claims
supporting.
> I believe they're supersets of one another, so a 3.0 builtins library would
> still con
@@ -387,21 +387,39 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
-if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 )
+# 1.2 is Clang's default OpenCL C language standard to compile for.
+set( opencl_lang_std
@@ -387,21 +387,39 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
message( STATUS " device: ${d} ( ${${d}_aliases} )" )
-if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 )
+# 1.2 is Clang's default OpenCL C language standard to compile for.
+set( opencl_lang_std
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135733
>From 64d7bfdceb5a0a6fbf34bb15cd7d6cbeb9214881 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 14 Apr 2025 19:20:25 -0700
Subject: [PATCH 1/4] [libclc] Set OpenCL version to 3.0
This PR is cherry-pick of ht
wenju-he wrote:
> Targets may even want to compile libclc for multiple different versions? That
> might introduce extra complexity (we'd need "an extra loop", more compilation
> time, new naming/versioning schemes for the build artifacts).
An application may compile using different -cl-std ver
@@ -411,6 +411,16 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
+# OpenCL 3.0 extensions
+string(CONCAT CL_3_0_EXTENSIONS
+ "-cl-ext="
+
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135733
>From 64d7bfdceb5a0a6fbf34bb15cd7d6cbeb9214881 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 14 Apr 2025 19:20:25 -0700
Subject: [PATCH 1/2] [libclc] Set OpenCL version to 3.0
This PR is cherry-pick of ht
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/135309
>From 31423376e35f34ca032fe3d11998537912ba2c63 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 10 Apr 2025 20:10:41 -0700
Subject: [PATCH 1/2] [libclc] add ctz built-in implementation to clc and
generic
--
wenju-he wrote:
@frasercrmck please help to review? thanks.
https://github.com/llvm/llvm-project/pull/135710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 183 matches
Mail list logo