diff --git a/docs/features.txt b/docs/features.txt index 80cf38f9645..2470c4736ec 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -917,7 +917,7 @@ Rusticl extensions that are not part of any OpenCL version: cl_khr_device_uuid DONE (iris, llvmpipe, radeonsi) cl_khr_egl_event not started cl_khr_egl_image not started - cl_khr_expect_assume in progress + cl_khr_expect_assume in progress (hints are ignored) cl_khr_extended_async_copies not started cl_khr_extended_bit_ops in progress cl_khr_fp16 in progress (llvmpipe, radeonsi, Available with environment variable RUSTICL_FEATURES=fp16) diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp index 0daf06f1e7c..55287f22683 100644 --- a/src/compiler/clc/clc_helpers.cpp +++ b/src/compiler/clc/clc_helpers.cpp @@ -803,6 +803,8 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx, }; // llvm handles these extensions differently so we have to pass this flag instead to expose the clc functions + + clang_opts.push_back("-Dcl_khr_expect_assume=1"); if (args->features.integer_dot_product) { clang_opts.push_back("-Dcl_khr_integer_dot_product=1"); clang_opts.push_back("-D__opencl_c_integer_dot_product_input_4x8bit_packed=1"); diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs index e0350c13816..34e23a656da 100644 --- a/src/gallium/frontends/rusticl/core/device.rs +++ b/src/gallium/frontends/rusticl/core/device.rs @@ -541,6 +541,7 @@ impl Device { add_ext(1, 0, 0, "cl_khr_local_int32_base_atomics"); add_ext(1, 0, 0, "cl_khr_local_int32_extended_atomics"); + add_spirv("SPV_KHR_expect_assume"); add_spirv("SPV_KHR_float_controls"); add_spirv("SPV_KHR_integer_dot_product"); add_spirv("SPV_KHR_no_integer_wrap_decoration"); diff --git a/src/gallium/frontends/rusticl/core/platform.rs b/src/gallium/frontends/rusticl/core/platform.rs index 049cab2597b..7b2080ec40f 100644 --- a/src/gallium/frontends/rusticl/core/platform.rs +++ b/src/gallium/frontends/rusticl/core/platform.rs @@ -47,6 +47,7 @@ macro_rules! gen_cl_exts { gen_cl_exts!([ (1, 0, 0, "cl_khr_byte_addressable_store"), (1, 0, 0, "cl_khr_create_command_queue"), + (1, 0, 0, "cl_khr_expect_assume"), (1, 0, 0, "cl_khr_extended_versioning"), (1, 0, 0, "cl_khr_icd"), (1, 0, 0, "cl_khr_il_program"),