公司动态

CANN/asc-devkit SIMT协作组size函数

📅 2026/7/17 18:44:04
CANN/asc-devkit SIMT协作组size函数
size【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit产品支持情况Ascend 950PR/Ascend 950DT支持Atlas A3 训练系列产品/Atlas A3 推理系列产品不支持Atlas A2 训练系列产品/Atlas A2 推理系列产品不支持Atlas 200I/500 A2 推理产品不支持Atlas 推理系列产品AI Core不支持Atlas 推理系列产品Vector Core不支持Atlas 训练系列产品不支持功能说明获取coalesced_group组内线程总数与接口num_threads功能相同。函数原型unsigned long long size() const参数说明无返回值说明coalesced_group组内线程总数。约束说明无调用示例SIMT编程场景using namespace cooperative_groups; __global__ void simt_kernel(...) { ... if (threadIdx.x % 2 0) { coalesced_group active coalesced_threads(); unsigned long long thread_num active.size(); // 返回16 } ... }SIMD与SIMT混合编程场景using namespace cooperative_groups; __simt_vf__ inline void simt_kernel(...) { ... if (threadIdx.x % 2 0) { coalesced_group active coalesced_threads(); unsigned long long thread_num active.size(); // 返回16 } ... }【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考