From e52693a2b69ab7e2cf38a7f0619cc3100e4f6796 Mon Sep 17 00:00:00 2001 From: ping-ee Date: Thu, 11 Dec 2025 18:20:16 +0800 Subject: [PATCH 1/2] [OpenCL] Protect with --- src/runtime/opencl/opencl_device_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/opencl/opencl_device_api.cc b/src/runtime/opencl/opencl_device_api.cc index 8b6fba24988e..c9eaf4adb07f 100644 --- a/src/runtime/opencl/opencl_device_api.cc +++ b/src/runtime/opencl/opencl_device_api.cc @@ -472,7 +472,7 @@ void OpenCLWorkspace::SetNativePtr(const tvm::runtime::Tensor& narr, void* host_ } void OpenCLWorkspace::SetPerfHint(Device dev, cl_uint perf_hint) { -#ifdef CL_CONTEXT_PERF_HINT_QCOM +#if defined(USER_OPENCL_EXTN_QCOM) && defined(CL_CONTEXT_PERF_HINT_QCOM) cl_device_id device_id = GetCLDeviceID(dev.device_id); auto platform = device_info[device_id].platform_id; OPENCL_CALL(clSetPerfHintQCOM(this->contexts[platform], perf_hint)); From 32f9e118fb6e3fa6fcbfa0e206d89c61cba06ec8 Mon Sep 17 00:00:00 2001 From: ping-ee <82318236+ping-ee@users.noreply.github.com> Date: Thu, 11 Dec 2025 18:44:42 +0800 Subject: [PATCH 2/2] Update src/runtime/opencl/opencl_device_api.cc Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/runtime/opencl/opencl_device_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/opencl/opencl_device_api.cc b/src/runtime/opencl/opencl_device_api.cc index c9eaf4adb07f..63e0890f70c2 100644 --- a/src/runtime/opencl/opencl_device_api.cc +++ b/src/runtime/opencl/opencl_device_api.cc @@ -472,7 +472,7 @@ void OpenCLWorkspace::SetNativePtr(const tvm::runtime::Tensor& narr, void* host_ } void OpenCLWorkspace::SetPerfHint(Device dev, cl_uint perf_hint) { -#if defined(USER_OPENCL_EXTN_QCOM) && defined(CL_CONTEXT_PERF_HINT_QCOM) +#if defined(USE_OPENCL_EXTN_QCOM) && defined(CL_CONTEXT_PERF_HINT_QCOM) cl_device_id device_id = GetCLDeviceID(dev.device_id); auto platform = device_info[device_id].platform_id; OPENCL_CALL(clSetPerfHintQCOM(this->contexts[platform], perf_hint));