fix compiler/options_build_optimizations (#2595)

We need to define -cl-std when compiling with option not in 1.0.
This commit is contained in:
Romaric Jodin
2025-12-16 18:23:37 +01:00
committed by GitHub
parent 119af24d54
commit 6b20272159

View File

@@ -14,6 +14,7 @@
// limitations under the License.
//
#include "testBase.h"
#include "harness/kernelHelpers.h"
#include "harness/os_helpers.h"
#include "harness/testHarness.h"
@@ -101,7 +102,10 @@ REGISTER_TEST(options_build_optimizations)
continue;
}
const char *option = optimization_option.first;
auto build_options = std::string("-cl-std=CL")
+ get_max_OpenCL_C_for_context(context).to_string() + " "
+ optimization_option.first;
const char *option = build_options.c_str();
clProgramWrapper program;
error = create_single_kernel_helper_create_program(
context, &program, 1, options_test_kernel, option);
@@ -431,7 +435,10 @@ REGISTER_TEST(options_uniform_work_group_size)
{
return TEST_SKIPPED_ITSELF;
}
const char *options = "-cl-uniform-work-group-size";
std::string build_options = "-cl-std=CL"
+ get_max_OpenCL_C_for_context(context).to_string()
+ " -cl-uniform-work-group-size";
const char *options = build_options.c_str();
clProgramWrapper program;
int error = create_single_kernel_helper_create_program(
context, &program, 1, options_test_kernel, options);