https://github.com/ssahasra created 
https://github.com/llvm/llvm-project/pull/135803

The documentation for the `convergent` attribute claims that OpenCL and CUDA 
require "all threads" in a group to call the same convergent operation. This is 
true only for OpenCL, and in general, the `convergent` attribute is used in 
LLVM IR on operations that have no such constraint.

>From 5024a4e5a9dc92744296cf59db7363602bca1807 Mon Sep 17 00:00:00 2001
From: Sameer Sahasrabuddhe <sameer.sahasrabud...@amd.com>
Date: Tue, 15 Apr 2025 21:43:35 +0530
Subject: [PATCH] [clang] convergent attribute does not require "all threads"

The documentation for the `convergent` attribute claims that OpenCL and CUDA
require "all threads" in a group to call the same convergent operation. This is
true only for OpenCL, and in general, the `convergent` attribute is used in LLVM
IR on operations that have no such constraint.
---
 clang/include/clang/Basic/AttrDocs.td | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/clang/include/clang/Basic/AttrDocs.td 
b/clang/include/clang/Basic/AttrDocs.td
index 97a5f24d35d7d..41e1918b4336f 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -1680,10 +1680,6 @@ translated into the LLVM ``convergent`` attribute, which 
indicates that the call
 instructions of a function with this attribute cannot be made control-dependent
 on any additional values.
 
-In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA,
-the call instructions of a function with this attribute must be executed by
-all work items or threads in a work group or sub group.
-
 This attribute is different from ``noduplicate`` because it allows duplicating
 function calls if it can be proved that the duplicated function calls are
 not made control-dependent on any additional values, e.g., unrolling a loop

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

Reply via email to