Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
94f265db3e
!10 [MSLITE] add yaml file
From: @greatpanc 
Reviewed-by: @henryshi1, @nicholas_yhr 
Signed-off-by: @nicholas_yhr
2022-08-26 07:44:06 +00:00
greatpanc
aee6e9c017 add yaml file 2022-08-26 15:28:28 +08:00
openeuler-ci-bot
7347fa1bb5 !9 update patch, and fix some bug
From: @greatpanc
Reviewed-by: @ouwenchang
Signed-off-by: @ouwenchang
2021-11-24 07:55:09 +00:00
greatpanc
ca62b9358f remove patch 2021-11-24 15:42:39 +08:00
openeuler-ci-bot
0adcec0241 !8 [patch] Fix cl::enqueueMapSVM for cl::vector and cl::pointer #145
From: @greatpanc
Reviewed-by: @ouwenchang
Signed-off-by: @ouwenchang
2021-11-24 04:43:51 +00:00
greatpanc
5bab48ede4 patch 0003-Fix-cl-enqueueMapSVM-for-cl-vector-and-cl-pointer.patch 2021-11-24 12:05:54 +08:00
openeuler-ci-bot
66c51d44a0 !7 [patch] add missing const to context properties #127
From: @greatpanc
Reviewed-by: @ouwenchang
Signed-off-by: @ouwenchang
2021-11-23 08:27:09 +00:00
greatpanc
c4905a2ec9 add 0002-add-missing-const-to-context-properties.patch 2021-11-23 15:38:27 +08:00
openeuler-ci-bot
2f7d0d0c79 !6 [patch] Add_CL_DEVICE_BOARD_NAME_AMD
From: @greatpanc
Reviewed-by: 
Signed-off-by:
2021-11-23 03:45:12 +00:00
greatpanc
e6f1a015ca patch Add_CL_DEVICE_BOARD_NAME_AMD 2021-11-23 11:31:23 +08:00
7 changed files with 130 additions and 4 deletions

View File

@ -0,0 +1,26 @@
From faa9f15b88b99ec5284d2285f0a70715ecfe68d2 Mon Sep 17 00:00:00 2001
From: greatpanc <changpan_yin@163.com>
Date: Mon, 22 Nov 2021 21:52:59 +0800
Subject: [PATCH] Add_CL_DEVICE_BOARD_NAME_AMD
---
include/CL/cl2.hpp | 3 +++
1 file changed, 3 insertions(+)
diff --git OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
index ced4b03..6207f52 100644
--- OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
+++ OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
@@ -1498,6 +1498,9 @@ CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUT
#ifdef CL_DEVICE_LOCAL_MEM_BANKS_AMD
CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_LOCAL_MEM_BANKS_AMD, cl_uint)
#endif
+#ifdef CL_DEVICE_BOARD_NAME_AMD
+ CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_BOARD_NAME_AMD, string)
+#endif
#ifdef CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM
CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM, cl_ulong)
--
2.25.1

View File

@ -0,0 +1,43 @@
From ef63c6265000ab89d5657e1d2e020e7c7de33d7e Mon Sep 17 00:00:00 2001
From: greatpanc <changpan_yin@163.com>
Date: Tue, 23 Nov 2021 15:34:59 +0800
Subject: [PATCH] add missing const to context properties
---
include/CL/cl2.hpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
index ced4b03..24da723 100644
--- OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
+++ OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
@@ -2806,7 +2806,7 @@ public:
*/
Context(
const vector<Device>& devices,
- cl_context_properties* properties = NULL,
+ const cl_context_properties* properties = NULL,
void (CL_CALLBACK * notifyFptr)(
const char *,
const void *,
@@ -2837,7 +2837,7 @@ public:
Context(
const Device& device,
- cl_context_properties* properties = NULL,
+ const cl_context_properties* properties = NULL,
void (CL_CALLBACK * notifyFptr)(
const char *,
const void *,
@@ -2867,7 +2867,7 @@ public:
*/
Context(
cl_device_type type,
- cl_context_properties* properties = NULL,
+ const cl_context_properties* properties = NULL,
void (CL_CALLBACK * notifyFptr)(
const char *,
const void *,
--
2.25.1

View File

@ -0,0 +1,34 @@
From 5b388814ca0f51ccc78c3aef41f824e139f06df4 Mon Sep 17 00:00:00 2001
From: greatpanc <changpan_yin@163.com>
Date: Tue, 23 Nov 2021 16:01:57 +0800
Subject: [PATCH] Fix cl::enqueueMapSVM for cl::vector and cl::pointer
---
include/CL/cl2.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
index ced4b03..d4bb695 100644
--- OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
+++ OpenCL-CLHPP-2.0.12/include/CL/cl2.hpp
@@ -9220,7 +9220,7 @@ inline cl_int enqueueMapSVM(
*/
template<typename T, class D>
inline cl_int enqueueMapSVM(
- cl::pointer<T, D> ptr,
+ cl::pointer<T, D> &ptr,
cl_bool blocking,
cl_map_flags flags,
size_type size,
@@ -9244,7 +9244,7 @@ inline cl_int enqueueMapSVM(
*/
template<typename T, class Alloc>
inline cl_int enqueueMapSVM(
- cl::vector<T, Alloc> container,
+ cl::vector<T, Alloc> &container,
cl_bool blocking,
cl_map_flags flags,
const vector<Event>* events = NULL,
--
2.25.1

View File

@ -1,9 +1,9 @@
%global date 2020.12.18
Name: opencl-clhpp
Version: 2.0.12
Release: 5
Release: 9
Summary: OpenCL (Open Computing Language) bind cpp header files.
License: Apache-2.0
License: Apache-2.0 and MIT
URL: https://github.com/KhronosGroup/OpenCL-CLHPP
Source0: https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v%{version}.tar.gz
Source1: https://github.com/KhronosGroup/OpenCL-Headers/archive/v%{date}.tar.gz
@ -11,9 +11,13 @@ Source2: https://github.com/ThrowTheSwitch/CMock/archive/refs/tags/v
Source3: https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.5.2.tar.gz
Source4: https://github.com/ThrowTheSwitch/CException/archive/refs/tags/v1.3.3.tar.gz
Patch1: 0001-Add_CL_DEVICE_BOARD_NAME_AMD.patch
Patch2: 0002-add-missing-const-to-context-properties.patch
Patch3: 0003-Fix-cl-enqueueMapSVM-for-cl-vector-and-cl-pointer.patch
BuildArch: noarch
BuildRequires: gcc-c++ cmake >= 3.14.0 ocl-icd rubygems ruby python
BuildRequires: gcc-c++ cmake >= 3.14.0 ocl-icd rubygems ruby python git
Provides: bundled(grpc)
@ -21,7 +25,7 @@ Provides: bundled(grpc)
%{summary}.
%prep
%autosetup -n OpenCL-CLHPP-%{version}
tar -zxf %SOURCE0 -C %{_builddir}/
tar -zxf %SOURCE1 -C %{_builddir}/OpenCL-CLHPP-%{version}
tar -zxf %SOURCE2 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/
tar -zxf %SOURCE3 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/
@ -31,6 +35,7 @@ tar -zxf %SOURCE4 -C %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/
mv %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/Unity/* %{_builddir}/OpenCL-CLHPP-%{version}/external/CMock/vendor/unity/
%build
cd %{_builddir}/OpenCL-CLHPP-%{version}
ln -s /usr/lib64/libOpenCL.so.1 %{_builddir}/OpenCL-CLHPP-%{version}/libOpenCL.so
rm -rf build
@ -43,10 +48,12 @@ cmake .. -DOPENCL_INCLUDE_DIR=%{_builddir}/OpenCL-CLHPP-%{version}/OpenCL-Header
-DBUILD_EXAMPLES=ON
%install
cd %{_builddir}/OpenCL-CLHPP-%{version}
cd build
make install DESTDIR=%{buildroot}
%check
cd %{_builddir}/OpenCL-CLHPP-%{version}
cd build
make test
@ -55,6 +62,18 @@ make test
/usr/local/include/CL/cl2.hpp
%changelog
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-9
- remove patch
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-8
- patch 0003-Fix-cl-enqueueMapSVM-for-cl-vector-and-cl-pointer.patch
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-7
- patch 0002-add-missing-const-to-context-properties
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-6
- patch 0001-Add_CL_DEVICE_BOARD_NAME_AMD
* Tue Nov 12 2021 yinchangpan <yinchangpan2@huawei.com> - v2.12.0-5
- Add Make Test Check

4
opencl-clhpp.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: KhronosGroup/OpenCL-CLHPP
tag_prefix: "^v"
separator: "."

Binary file not shown.

Binary file not shown.