KhronosGroup / KhronosGroup/OpenCL-SDK

reducecpp sample not passing correct -cl-std version

Open Beginner friendly
#157 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
777
Forks
163
Avg merge
6d 17h
Merged PRs (30d)
2

Description

The "reducecpp" sample tries to build an OpenCL kernel that uses the work-group reduction functions, but does not pass a `-cl-std` version for this kernel. Since these functions require OpenCL C 2.0 or OpenCL C 3.1 or newer with the `__opencl_c_work_group_collective_functions` feature, some compilers will diagnose an error for this kernel.

This sample should pass a proper `-cl-std` build option for this kernel instead, similar to what is done for the non-C++ "reduce" sample.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reducecpp sample and compare how the non-C++ reduce sample passes its OpenCL build options. Identify where the kernel is built, add the appropriate -cl-std option there, and verify that the reducecpp sample builds successfully with compilers that require an explicit OpenCL C version.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.