From d51623f2980140f194a17b7412082412dfeb70f9 Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Mon, 24 Jan 2022 18:39:55 -0500 Subject: [PATCH 1/2] Include cl_ext.h instead of deprecated cl_ext_intel.h Note that opencl.h already includes cl_ext.h This resolves warnings introduced with the OpenCL headers update. https://github.com/intel/fpga-runtime-for-opencl/pull/62 ../include/CL/cl_ext_intel.h:19:105: note: #pragma message: The Intel extensions have been moved into cl_ext.h. Please include cl_ext.h directly. #pragma message("The Intel extensions have been moved into cl_ext.h. Please include cl_ext.h directly.") Closes https://github.com/intel/fpga-runtime-for-opencl/issues/66 --- include/acl.h | 2 +- include/acl_svm.h | 1 - include/acl_usm.h | 2 -- src/acl_icd_dispatch.cpp | 1 - src/acl_kernel.cpp | 2 -- src/acl_usm.cpp | 1 - 6 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/acl.h b/include/acl.h index 615ac3e6..a351c938 100644 --- a/include/acl.h +++ b/include/acl.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include "acl_visibility.h" diff --git a/include/acl_svm.h b/include/acl_svm.h index 449d2826..985a97b5 100644 --- a/include/acl_svm.h +++ b/include/acl_svm.h @@ -4,7 +4,6 @@ #ifndef ACL_SVM_H #define ACL_SVM_H -#include #include #include "acl_types.h" diff --git a/include/acl_usm.h b/include/acl_usm.h index 0d364b9c..74aaf390 100644 --- a/include/acl_usm.h +++ b/include/acl_usm.h @@ -4,8 +4,6 @@ #ifndef ACL_USM_H #define ACL_USM_H -#include -#include #include #include "acl_types.h" diff --git a/src/acl_icd_dispatch.cpp b/src/acl_icd_dispatch.cpp index 75662b53..b1700bc2 100644 --- a/src/acl_icd_dispatch.cpp +++ b/src/acl_icd_dispatch.cpp @@ -5,7 +5,6 @@ #include // External library headers. -#include #include #include diff --git a/src/acl_kernel.cpp b/src/acl_kernel.cpp index 0ec9b16f..987b9fac 100644 --- a/src/acl_kernel.cpp +++ b/src/acl_kernel.cpp @@ -11,8 +11,6 @@ #include // External library headers. -#include -#include #include #include #include diff --git a/src/acl_usm.cpp b/src/acl_usm.cpp index 23b37d9d..3621b8fd 100644 --- a/src/acl_usm.cpp +++ b/src/acl_usm.cpp @@ -11,7 +11,6 @@ #include // External library headers. -#include #include // Internal headers. From 401fadd51d25cd5ea9957c43186fbade2711d474 Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Mon, 24 Jan 2022 18:47:25 -0500 Subject: [PATCH 2/2] Define OpenCL version for fake_bsp tests ../../include/CL/cl_version.h:22:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0) #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)") --- test/fake_bsp/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fake_bsp/CMakeLists.txt b/test/fake_bsp/CMakeLists.txt index fae0d711..8b86c5a9 100644 --- a/test/fake_bsp/CMakeLists.txt +++ b/test/fake_bsp/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(fakegoodbsp SHARED fakegoodbsp.cpp) target_include_directories(fakegoodbsp PRIVATE "${CMAKE_SOURCE_DIR}/src") target_link_libraries(fakegoodbsp PRIVATE acl_headers CppUTest test_acl_test_header) +target_compile_definitions(fakegoodbsp PRIVATE + CL_TARGET_OPENCL_VERSION=300 + ) if(WIN32) target_compile_definitions(fakegoodbsp PRIVATE AOCL_MMD_CALL=__declspec\(dllexport\)) endif() @@ -11,6 +14,9 @@ endif() add_library(missingfuncbsp SHARED missingfuncbsp.cpp) target_include_directories(missingfuncbsp PRIVATE "${CMAKE_SOURCE_DIR}/src") target_link_libraries(missingfuncbsp PRIVATE acl_headers CppUTest test_acl_test_header) +target_compile_definitions(missingfuncbsp PRIVATE + CL_TARGET_OPENCL_VERSION=300 + ) if(WIN32) target_compile_definitions(missingfuncbsp PRIVATE AOCL_MMD_CALL=__declspec\(dllexport\)) endif()