mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 13:27:29 -04:00
Merge branch 'master' of https://github.gatech.edu/casl/Vortex
This commit is contained in:
commit
852d844618
50 changed files with 31709 additions and 1686362 deletions
1804
benchmarks/opencl/include/CL/cl.h
Normal file
1804
benchmarks/opencl/include/CL/cl.h
Normal file
File diff suppressed because it is too large
Load diff
12459
benchmarks/opencl/include/CL/cl.hpp
Normal file
12459
benchmarks/opencl/include/CL/cl.hpp
Normal file
File diff suppressed because it is too large
Load diff
10119
benchmarks/opencl/include/CL/cl2.hpp
Normal file
10119
benchmarks/opencl/include/CL/cl2.hpp
Normal file
File diff suppressed because it is too large
Load diff
131
benchmarks/opencl/include/CL/cl_d3d10.h
Normal file
131
benchmarks/opencl/include/CL/cl_d3d10.h
Normal file
|
@ -0,0 +1,131 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D10_H
|
||||
#define __OPENCL_CL_D3D10_H
|
||||
|
||||
#include <d3d10.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d10_sharing */
|
||||
#define cl_khr_d3d10_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d10_device_source_khr;
|
||||
typedef cl_uint cl_d3d10_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||
|
||||
/* cl_d3d10_device_source_nv */
|
||||
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||
|
||||
/* cl_d3d10_device_set_nv */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D10_H */
|
||||
|
131
benchmarks/opencl/include/CL/cl_d3d11.h
Normal file
131
benchmarks/opencl/include/CL/cl_d3d11.h
Normal file
|
@ -0,0 +1,131 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D11_H
|
||||
#define __OPENCL_CL_D3D11_H
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d11_sharing */
|
||||
#define cl_khr_d3d11_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d11_device_source_khr;
|
||||
typedef cl_uint cl_d3d11_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||
|
||||
/* cl_d3d11_device_source */
|
||||
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||
|
||||
/* cl_d3d11_device_set */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D11_H */
|
||||
|
132
benchmarks/opencl/include/CL/cl_dx9_media_sharing.h
Normal file
132
benchmarks/opencl/include/CL/cl_dx9_media_sharing.h
Normal file
|
@ -0,0 +1,132 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/* cl_khr_dx9_media_sharing */
|
||||
#define cl_khr_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_media_adapter_type_khr;
|
||||
typedef cl_uint cl_dx9_media_adapter_set_khr;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <d3d9.h>
|
||||
typedef struct _cl_dx9_surface_info_khr
|
||||
{
|
||||
IDirect3DSurface9 *resource;
|
||||
HANDLE shared_handle;
|
||||
} cl_dx9_surface_info_khr;
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||
|
||||
/* cl_media_adapter_type_khr */
|
||||
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||
|
||||
/* cl_media_adapter_set_khr */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr * media_adapter_type,
|
||||
void * media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void * surface_info,
|
||||
cl_uint plane,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||
|
182
benchmarks/opencl/include/CL/cl_dx9_media_sharing_intel.h
Normal file
182
benchmarks/opencl/include/CL/cl_dx9_media_sharing_intel.h
Normal file
|
@ -0,0 +1,182 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_dx9_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <d3d9.h>
|
||||
#include <dxvahd.h>
|
||||
#include <wtypes.h>
|
||||
#include <d3d9types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_dx9_media_sharing extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_device_source_intel;
|
||||
typedef cl_uint cl_dx9_device_set_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_DX9_DEVICE_INTEL -1010
|
||||
#define CL_INVALID_DX9_RESOURCE_INTEL -1011
|
||||
#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
|
||||
#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
|
||||
|
||||
/* cl_dx9_device_source_intel */
|
||||
#define CL_D3D9_DEVICE_INTEL 0x4022
|
||||
#define CL_D3D9EX_DEVICE_INTEL 0x4070
|
||||
#define CL_DXVA_DEVICE_INTEL 0x4071
|
||||
|
||||
/* cl_dx9_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
|
||||
#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
|
||||
#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
|
||||
#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
|
||||
#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
|
||||
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
|
||||
/******************************************************************************/
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromDX9INTEL(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */
|
||||
|
132
benchmarks/opencl/include/CL/cl_egl.h
Normal file
132
benchmarks/opencl/include/CL/cl_egl.h
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_EGL_H
|
||||
#define __OPENCL_CL_EGL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
|
||||
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
|
||||
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
|
||||
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
|
||||
|
||||
/* Error type for clCreateFromEGLImageKHR */
|
||||
#define CL_INVALID_EGL_OBJECT_KHR -1093
|
||||
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||
|
||||
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* CLeglImageKHR;
|
||||
|
||||
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||
typedef void* CLeglDisplayKHR;
|
||||
|
||||
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||
typedef void* CLeglSyncKHR;
|
||||
|
||||
/* properties passed to clCreateFromEGLImageKHR */
|
||||
typedef intptr_t cl_egl_image_properties_khr;
|
||||
|
||||
|
||||
#define cl_khr_egl_image 1
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromEGLImageKHR(cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
#define cl_khr_egl_event 1
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromEGLSyncKHR(cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_EGL_H */
|
762
benchmarks/opencl/include/CL/cl_ext.h
Normal file
762
benchmarks/opencl/include/CL/cl_ext.h
Normal file
|
@ -0,0 +1,762 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||
/* (OpenGL, D3D) dependencies. */
|
||||
|
||||
#ifndef __CL_EXT_H
|
||||
#define __CL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
|
||||
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||
|
||||
/* Memory object destruction
|
||||
*
|
||||
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||
*
|
||||
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||
* the storage bits for the memory object, can be reused or freed.
|
||||
*
|
||||
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||
*
|
||||
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*/
|
||||
#define cl_APPLE_SetMemObjectDestructor 1
|
||||
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
|
||||
void (* pfn_notify)(cl_mem memobj, void * user_data),
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Context Logging Functions
|
||||
*
|
||||
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*
|
||||
* clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
|
||||
*/
|
||||
#define cl_APPLE_ContextLoggingFunctions 1
|
||||
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
|
||||
/*******************************
|
||||
* cl_khr_il_program extension *
|
||||
*******************************/
|
||||
#define cl_khr_il_program 1
|
||||
|
||||
/* New property to clGetDeviceInfo for retrieving supported intermediate
|
||||
* languages
|
||||
*/
|
||||
#define CL_DEVICE_IL_VERSION_KHR 0x105B
|
||||
|
||||
/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
|
||||
* program
|
||||
*/
|
||||
#define CL_PROGRAM_IL_KHR 0x1169
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithILKHR(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
typedef CL_API_ENTRY cl_program
|
||||
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Extension: cl_khr_image2d_from_buffer
|
||||
*
|
||||
* This extension allows a 2D image to be created from a cl_mem buffer without
|
||||
* a copy. The type associated with a 2D image created from a buffer in an
|
||||
* OpenCL program is image2d_t. Both the sampler and sampler-less read_image
|
||||
* built-in functions are supported for 2D images and 2D images created from
|
||||
* a buffer. Similarly, the write_image built-ins are also supported for 2D
|
||||
* images created from a buffer.
|
||||
*
|
||||
* When the 2D image from buffer is created, the client must specify the
|
||||
* width, height, image format (i.e. channel order and channel data type)
|
||||
* and optionally the row pitch.
|
||||
*
|
||||
* The pitch specified must be a multiple of
|
||||
* CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR pixels.
|
||||
* The base address of the buffer must be aligned to
|
||||
* CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_initialize_memory extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_terminate_context extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
|
||||
#define CL_CONTEXT_TERMINATE_KHR 0x2032
|
||||
|
||||
#define cl_khr_terminate_context 1
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*
|
||||
* Extension: cl_khr_spir
|
||||
*
|
||||
* This extension adds support to create an OpenCL program object from a
|
||||
* Standard Portable Intermediate Representation (SPIR) instance
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||
|
||||
|
||||
/*****************************************
|
||||
* cl_khr_create_command_queue extension *
|
||||
*****************************************/
|
||||
#define cl_khr_create_command_queue 1
|
||||
|
||||
typedef cl_bitfield cl_queue_properties_khr;
|
||||
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueueWithPropertiesKHR(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_command_queue
|
||||
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_nv_device_attribute_query extension *
|
||||
******************************************/
|
||||
|
||||
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_amd_device_attribute_query *
|
||||
*********************************/
|
||||
|
||||
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_arm_printf extension
|
||||
*********************************/
|
||||
|
||||
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef cl_ulong cl_device_partition_property_ext;
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateSubDevicesEXT(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* cl_device_partition_property_ext */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||
|
||||
/* clDeviceGetInfo selectors */
|
||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||
|
||||
/* error codes */
|
||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||
|
||||
/* CL_AFFINITY_DOMAINs */
|
||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||
|
||||
/* cl_device_partition_property_ext list terminators */
|
||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_migrate_memobject extension definitions
|
||||
***********************************/
|
||||
#define cl_ext_migrate_memobject 1
|
||||
|
||||
typedef cl_bitfield cl_mem_migration_flags_ext;
|
||||
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
|
||||
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ext_host_ptr extension
|
||||
*********************************/
|
||||
#define cl_qcom_ext_host_ptr 1
|
||||
|
||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||
|
||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||
|
||||
typedef cl_uint cl_image_pitch_info_qcom;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
const cl_image_format *image_format,
|
||||
cl_image_pitch_info_qcom param_name,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef struct _cl_mem_ext_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Legal values will be defined in layered extensions. */
|
||||
cl_uint allocation_type;
|
||||
|
||||
/* Host cache policy for this external memory allocation. */
|
||||
cl_uint host_cache_policy;
|
||||
|
||||
} cl_mem_ext_host_ptr;
|
||||
|
||||
|
||||
/*******************************************
|
||||
* cl_qcom_ext_host_ptr_iocoherent extension
|
||||
********************************************/
|
||||
|
||||
/* Cache policy specifying io-coherence */
|
||||
#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ion_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||
|
||||
typedef struct _cl_mem_ion_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* ION file descriptor */
|
||||
int ion_filedesc;
|
||||
|
||||
/* Host pointer to the ION allocated memory */
|
||||
void* ion_hostptr;
|
||||
|
||||
} cl_mem_ion_host_ptr;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_android_native_buffer_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
|
||||
|
||||
typedef struct _cl_mem_android_native_buffer_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* Virtual pointer to the android native buffer */
|
||||
void* anb_ptr;
|
||||
|
||||
} cl_mem_android_native_buffer_host_ptr;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_yuv_image extension *
|
||||
******************************************/
|
||||
|
||||
/* Image formats used in clCreateImage */
|
||||
#define CL_NV21_IMG 0x40D0
|
||||
#define CL_YV12_IMG 0x40D1
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_cached_allocations extension *
|
||||
******************************************/
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_use_gralloc_ptr extension *
|
||||
******************************************/
|
||||
#define cl_img_use_gralloc_ptr 1
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||
|
||||
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroups extension
|
||||
*********************************/
|
||||
#define cl_khr_subgroups 1
|
||||
|
||||
#if !defined(CL_VERSION_2_1)
|
||||
/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
|
||||
In hindsight, there should have been a khr suffix on this type for
|
||||
the extension, but keeping it un-suffixed to maintain backwards
|
||||
compatibility. */
|
||||
typedef cl_uint cl_kernel_sub_group_info;
|
||||
#endif
|
||||
|
||||
/* cl_kernel_sub_group_info */
|
||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelSubGroupInfoKHR(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_mipmap_image extension
|
||||
*********************************/
|
||||
|
||||
/* cl_sampler_properties */
|
||||
#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
|
||||
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
|
||||
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_priority_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_priority_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_priority_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||
|
||||
/* cl_queue_priority_khr */
|
||||
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_throttle_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_throttle_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_throttle_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||
|
||||
/* cl_queue_throttle_khr */
|
||||
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroup_named_barrier
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_subgroup_named_barrier 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
|
||||
|
||||
|
||||
/**********************************
|
||||
* cl_arm_import_memory extension *
|
||||
**********************************/
|
||||
#define cl_arm_import_memory 1
|
||||
|
||||
typedef intptr_t cl_import_properties_arm;
|
||||
|
||||
/* Default and valid proporties name for cl_arm_import_memory */
|
||||
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||
|
||||
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||
|
||||
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||
|
||||
/* Protected DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
|
||||
|
||||
/* This extension adds a new function that allows for direct memory import into
|
||||
* OpenCL via the clImportMemoryARM function.
|
||||
*
|
||||
* Memory imported through this interface will be mapped into the device's page
|
||||
* tables directly, providing zero copy access. It will never fall back to copy
|
||||
* operations and aliased buffers.
|
||||
*
|
||||
* Types of memory supported for import are specified as additional extension
|
||||
* strings.
|
||||
*
|
||||
* This extension produces cl_mem allocations which are compatible with all other
|
||||
* users of cl_mem in the standard API.
|
||||
*
|
||||
* This extension maps pages with the same properties as the normal buffer creation
|
||||
* function clCreateBuffer.
|
||||
*/
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clImportMemoryARM( cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_import_properties_arm *properties,
|
||||
void *memory,
|
||||
size_t size,
|
||||
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_arm_shared_virtual_memory extension *
|
||||
******************************************/
|
||||
#define cl_arm_shared_virtual_memory 1
|
||||
|
||||
/* Used by clGetDeviceInfo */
|
||||
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||
|
||||
/* Used by clGetMemObjectInfo */
|
||||
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||
|
||||
/* Used by clSetKernelExecInfoARM: */
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||
|
||||
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||
|
||||
/* Flag values used by clSVMAllocARM: */
|
||||
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||
|
||||
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||
typedef cl_uint cl_kernel_exec_info_arm;
|
||||
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clSVMAllocARM(cl_context context,
|
||||
cl_svm_mem_flags_arm flags,
|
||||
size_t size,
|
||||
cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY void CL_API_CALL
|
||||
clSVMFreeARM(cl_context context,
|
||||
void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMFreeARM(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void * user_data),
|
||||
void * user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
void * dst_ptr,
|
||||
const void * src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemFillARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
const void * pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMapARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
void * svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMUnmapARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelArgSVMPointerARM(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelExecInfoARM(cl_kernel kernel,
|
||||
cl_kernel_exec_info_arm param_name,
|
||||
size_t param_value_size,
|
||||
const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/********************************
|
||||
* cl_arm_get_core_id extension *
|
||||
********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
#define cl_arm_get_core_id 1
|
||||
|
||||
/* Device info property for bitfield of cores present */
|
||||
#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
|
||||
|
||||
#endif /* CL_VERSION_1_2 */
|
||||
|
||||
/*********************************
|
||||
* cl_arm_job_slot_selection
|
||||
*********************************/
|
||||
|
||||
#define cl_arm_job_slot_selection 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
423
benchmarks/opencl/include/CL/cl_ext_intel.h
Normal file
423
benchmarks/opencl/include/CL/cl_ext_intel.h
Normal file
|
@ -0,0 +1,423 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_ext_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __CL_EXT_INTEL_H
|
||||
#define __CL_EXT_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_thread_local_exec extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_thread_local_exec 1
|
||||
|
||||
#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
|
||||
|
||||
/***********************************************
|
||||
* cl_intel_device_partition_by_names extension *
|
||||
************************************************/
|
||||
|
||||
#define cl_intel_device_partition_by_names 1
|
||||
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
|
||||
|
||||
/************************************************
|
||||
* cl_intel_accelerator extension *
|
||||
* cl_intel_motion_estimation extension *
|
||||
* cl_intel_advanced_motion_estimation extension *
|
||||
*************************************************/
|
||||
|
||||
#define cl_intel_accelerator 1
|
||||
#define cl_intel_motion_estimation 1
|
||||
#define cl_intel_advanced_motion_estimation 1
|
||||
|
||||
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
|
||||
typedef cl_uint cl_accelerator_type_intel;
|
||||
typedef cl_uint cl_accelerator_info_intel;
|
||||
|
||||
typedef struct _cl_motion_estimation_desc_intel {
|
||||
cl_uint mb_block_type;
|
||||
cl_uint subpixel_mode;
|
||||
cl_uint sad_adjust_mode;
|
||||
cl_uint search_path_type;
|
||||
} cl_motion_estimation_desc_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_ACCELERATOR_INTEL -1094
|
||||
#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
|
||||
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
|
||||
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
|
||||
|
||||
/* cl_accelerator_type_intel */
|
||||
#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
|
||||
|
||||
/* cl_accelerator_info_intel */
|
||||
#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
|
||||
#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
|
||||
#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
|
||||
#define CL_ACCELERATOR_TYPE_INTEL 0x4093
|
||||
|
||||
/* cl_motion_detect_desc_intel flags */
|
||||
#define CL_ME_MB_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_MB_TYPE_8x8_INTEL 0x1
|
||||
#define CL_ME_MB_TYPE_4x4_INTEL 0x2
|
||||
|
||||
#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
|
||||
|
||||
#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
|
||||
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
|
||||
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
|
||||
#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
|
||||
|
||||
#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
|
||||
#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
|
||||
#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
|
||||
|
||||
#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
|
||||
#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
|
||||
#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
|
||||
#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
|
||||
#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
|
||||
|
||||
#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
|
||||
#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
|
||||
#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
|
||||
#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
|
||||
|
||||
#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_ME_VERSION_INTEL 0x407E
|
||||
|
||||
#define CL_ME_VERSION_LEGACY_INTEL 0x0
|
||||
#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
|
||||
#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
|
||||
|
||||
extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
|
||||
clCreateAcceleratorINTEL(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetAcceleratorInfoINTEL(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/******************************************
|
||||
* cl_intel_simultaneous_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_simultaneous_sharing 1
|
||||
|
||||
#define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104
|
||||
#define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105
|
||||
|
||||
/***********************************
|
||||
* cl_intel_egl_image_yuv extension *
|
||||
************************************/
|
||||
|
||||
#define cl_intel_egl_image_yuv 1
|
||||
|
||||
#define CL_EGL_YUV_PLANE_INTEL 0x4107
|
||||
|
||||
/********************************
|
||||
* cl_intel_packed_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define cl_intel_packed_yuv 1
|
||||
|
||||
#define CL_YUYV_INTEL 0x4076
|
||||
#define CL_UYVY_INTEL 0x4077
|
||||
#define CL_YVYU_INTEL 0x4078
|
||||
#define CL_VYUY_INTEL 0x4079
|
||||
|
||||
/********************************************
|
||||
* cl_intel_required_subgroup_size extension *
|
||||
*********************************************/
|
||||
|
||||
#define cl_intel_required_subgroup_size 1
|
||||
|
||||
#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108
|
||||
#define CL_KERNEL_SPILL_MEM_SIZE_INTEL 0x4109
|
||||
#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
|
||||
|
||||
/****************************************
|
||||
* cl_intel_driver_diagnostics extension *
|
||||
*****************************************/
|
||||
|
||||
#define cl_intel_driver_diagnostics 1
|
||||
|
||||
typedef cl_uint cl_diagnostics_verbose_level;
|
||||
|
||||
#define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106
|
||||
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL ( 0xff )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL ( 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL ( 1 << 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL ( 1 << 2 )
|
||||
|
||||
/********************************
|
||||
* cl_intel_planar_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define CL_NV12_INTEL 0x410E
|
||||
|
||||
#define CL_MEM_NO_ACCESS_INTEL ( 1 << 24 )
|
||||
#define CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL ( 1 << 25 )
|
||||
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F
|
||||
|
||||
/*******************************************************
|
||||
* cl_intel_device_side_avc_motion_estimation extension *
|
||||
********************************************************/
|
||||
|
||||
#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D
|
||||
|
||||
#define CL_AVC_ME_VERSION_0_INTEL 0x0; // No support.
|
||||
#define CL_AVC_ME_VERSION_1_INTEL 0x1; // First supported version.
|
||||
|
||||
#define CL_AVC_ME_MAJOR_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_16x8_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_8x16_INTEL 0x2
|
||||
#define CL_AVC_ME_MAJOR_8x8_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MINOR_8x8_INTEL 0x0
|
||||
#define CL_AVC_ME_MINOR_8x4_INTEL 0x1
|
||||
#define CL_AVC_ME_MINOR_4x8_INTEL 0x2
|
||||
#define CL_AVC_ME_MINOR_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MAJOR_FORWARD_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
|
||||
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_16x12_RADIUS_INTEL 0x9
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_4x4_RADIUS_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_2x2_RADIUS_INTEL 0xa
|
||||
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
|
||||
|
||||
#define CL_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
|
||||
#define CL_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
|
||||
#define CL_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
|
||||
#define CL_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL ( 0x3 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL ( 0x55 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL ( 0xAA << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL ( 0xFF << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL ( 0x1 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL ( 0x2 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL ( 0x1 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL ( 0x2 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL ( 0x1 << 30 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL ( 0x2 << 30 )
|
||||
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
|
||||
|
||||
#define CL_AVC_ME_INTRA_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_INTRA_8x8_INTEL 0x1
|
||||
#define CL_AVC_ME_INTRA_4x4_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
|
||||
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_FRAME_FORWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_FRAME_BACKWARD_INTEL 0x2
|
||||
#define CL_AVC_ME_FRAME_DUAL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
|
||||
#define CL_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
|
||||
#define CL_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CL_EXT_INTEL_H */
|
171
benchmarks/opencl/include/CL/cl_gl.h
Normal file
171
benchmarks/opencl/include/CL/cl_gl.h
Normal file
|
@ -0,0 +1,171 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_H
|
||||
#define __OPENCL_CL_GL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef cl_uint cl_gl_object_type;
|
||||
typedef cl_uint cl_gl_texture_info;
|
||||
typedef cl_uint cl_gl_platform_info;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
|
||||
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
|
||||
#define CL_GL_OBJECT_TEXTURE1D 0x200F
|
||||
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
|
||||
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
|
||||
#endif
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_NUM_SAMPLES 0x2012
|
||||
#endif
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLRenderbuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(cl_mem memobj,
|
||||
cl_gl_object_type * gl_object_type,
|
||||
cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Deprecated OpenCL 1.1 APIs */
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
||||
typedef cl_uint cl_gl_context_info;
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||
|
||||
/* cl_gl_context_info */
|
||||
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||
|
||||
/* Additional cl_context_properties */
|
||||
#define CL_GL_CONTEXT_KHR 0x2008
|
||||
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||
#define CL_WGL_HDC_KHR 0x200B
|
||||
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_H */
|
52
benchmarks/opencl/include/CL/cl_gl_ext.h
Normal file
52
benchmarks/opencl/include/CL/cl_gl_ext.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_EXT_H
|
||||
#define __OPENCL_CL_GL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl_gl.h>
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
*/
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromGLsyncKHR(cl_context context,
|
||||
cl_GLsync cl_GLsync,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_EXT_H */
|
1384
benchmarks/opencl/include/CL/cl_platform.h
Normal file
1384
benchmarks/opencl/include/CL/cl_platform.h
Normal file
File diff suppressed because it is too large
Load diff
172
benchmarks/opencl/include/CL/cl_va_api_media_sharing_intel.h
Normal file
172
benchmarks/opencl/include/CL/cl_va_api_media_sharing_intel.h
Normal file
|
@ -0,0 +1,172 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_va_api_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************
|
||||
* cl_intel_va_api_media_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_va_api_media_sharing 1
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
|
||||
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
|
||||
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
|
||||
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
|
||||
|
||||
/* cl_va_api_device_source_intel */
|
||||
#define CL_VA_API_DISPLAY_INTEL 0x4094
|
||||
|
||||
/* cl_va_api_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
|
||||
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
|
||||
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
|
||||
|
||||
typedef cl_uint cl_va_api_device_source_intel;
|
||||
typedef cl_uint cl_va_api_device_set_intel;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
|
||||
|
86
benchmarks/opencl/include/CL/cl_version.h
Normal file
86
benchmarks/opencl/include/CL/cl_version.h
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __CL_VERSION_H
|
||||
#define __CL_VERSION_H
|
||||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
CL_TARGET_OPENCL_VERSION != 120 && \
|
||||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
|
||||
#define CL_VERSION_2_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
|
||||
#define CL_VERSION_2_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
|
||||
#define CL_VERSION_2_0 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
|
||||
#define CL_VERSION_1_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
|
||||
#define CL_VERSION_1_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
|
||||
#define CL_VERSION_1_0 1
|
||||
#endif
|
||||
|
||||
/* Allow deprecated APIs for older OpenCL versions. */
|
||||
#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#endif /* __CL_VERSION_H */
|
47
benchmarks/opencl/include/CL/opencl.h
Normal file
47
benchmarks/opencl/include/CL/opencl.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_H
|
||||
#define __OPENCL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_gl.h>
|
||||
#include <CL/cl_gl_ext.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_H */
|
BIN
benchmarks/opencl/lib/libOpenCL.a
Normal file
BIN
benchmarks/opencl/lib/libOpenCL.a
Normal file
Binary file not shown.
|
@ -1,33 +1,35 @@
|
|||
RISCV_TOOL_PATH = $(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
POCL_CC_PATH = $(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_INC_PATH = $(wildcard ../include)
|
||||
POCL_LIB_PATH = $(wildcard ../lib)
|
||||
VX_RT_PATH = $(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH = $(wildcard ../../../simX/obj_dir)
|
||||
|
||||
RISCV_TOOL_PATH=$(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
GDB = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gdb
|
||||
|
||||
POCL_CC_PATH=$(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_RT_PATH=$(wildcard ~/dev/pocl/drops_riscv_rt)
|
||||
VX_SRCS = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_SRCS += $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_SRCS += $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_SRCS += $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_SRCS += $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_SRCS += $(VX_RT_PATH)/tests/tests.c
|
||||
VX_SRCS += $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
VX_SRCS += $(VX_STR) $(VX_FIO) $(VX_NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
|
||||
VX_RT_PATH=$(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH=$(wildcard ../../../simX/obj_dir)
|
||||
VX_CFLAGS = -nostartfiles -Wl,-Bstatic,-T,$(VX_RT_PATH)/mains/vortex_link.ld
|
||||
|
||||
CC=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
NEWLIB_PATH=$(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib
|
||||
|
||||
VX_NEWLIB = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_STR = $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_INT = $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_IO = $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_FIO = $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_API = $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
|
||||
VX_SRCS = $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
|
||||
CXXFLAGS = -g -O0 -nostartfiles -Wl,-Bstatic,-T,$(VX_RT_PATH)/mains/vortex_link.ld -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS = -g -O0 -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS += -ffreestanding # program may not begin at main()
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -Wl,--gc-sections # enable garbage collection of unused input sections
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -I$(POCL_INC_PATH)
|
||||
|
||||
LIBS = -lOpenCL
|
||||
VX_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/libOpenCL.a
|
||||
QEMU_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/qemu/libOpenCL.a
|
||||
|
||||
PROJECT=saxpy
|
||||
|
||||
|
@ -37,7 +39,10 @@ lib$(PROJECT).a: kernel.cl
|
|||
POCL_DEBUG=all POCL_DEBUG_LLVM_PASSES=1 LD_LIBRARY_PATH=$(RISCV_TOOL_PATH)/lib:$(POCL_CC_PATH)/lib $(POCL_CC_PATH)/bin/poclcc -o lib$(PROJECT).a kernel.cl
|
||||
|
||||
$(PROJECT).elf: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) -I$(POCL_RT_PATH)/include -L$(POCL_RT_PATH)/lib/static -L. $(VX_SRCS) main.cc -Wl,--whole-archive -l$(PROJECT) -Wl,--no-whole-archive $(LIBS) -o $(PROJECT).elf
|
||||
$(CXX) $(CXXFLAGS) $(VX_CFLAGS) $(VX_SRCS) main.cc $(VX_LIBS) -o $(PROJECT).elf
|
||||
|
||||
$(PROJECT).qemu: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) main.cc $(QEMU_LIBS) -o $(PROJECT).qemu
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(HEX) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
@ -45,8 +50,17 @@ $(PROJECT).hex: $(PROJECT).elf
|
|||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DMP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
run:
|
||||
$(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
run: $(PROJECT).hex
|
||||
POCL_DEBUG=all $(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
|
||||
qemu: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-s: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -g 1234 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-c: $(PROJECT).qemu
|
||||
$(GDB) $(PROJECT).qemu
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl *.qemu
|
Binary file not shown.
|
@ -17,481 +17,175 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* gcc -o cldemo -std=gnu99 -Wall -I/usr/include/nvidia-current cldemo.c -lOpenCL
|
||||
* gcc -o cldemo -std=gnu99 -Wall -I/usr/include/nvidia-current cldemo.c
|
||||
* -lOpenCL
|
||||
*
|
||||
*/
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define NUM_DATA 65536
|
||||
//#define NUM_DATA 65536
|
||||
#define NUM_DATA 4096
|
||||
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
cl_int _err = _expr; \
|
||||
if (_err == CL_SUCCESS) \
|
||||
break; \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
cl_int _err = _expr; \
|
||||
if (_err == CL_SUCCESS) \
|
||||
break; \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
|
||||
#define CL_CHECK_ERR(_expr) \
|
||||
({ \
|
||||
cl_int _err = CL_INVALID_VALUE; \
|
||||
typeof(_expr) _ret = _expr; \
|
||||
if (_err != CL_SUCCESS) { \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} \
|
||||
_ret; \
|
||||
})
|
||||
#define CL_CHECK_ERR(_expr) \
|
||||
({ \
|
||||
cl_int _err = CL_INVALID_VALUE; \
|
||||
typeof(_expr) _ret = _expr; \
|
||||
if (_err != CL_SUCCESS) { \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
void pfn_notify(const char *errinfo, const void *private_info, size_t cb, void *user_data)
|
||||
{
|
||||
fprintf(stderr, "OpenCL Error (via pfn_notify): %s\n", errinfo);
|
||||
}
|
||||
|
||||
///
|
||||
// Create an OpenCL program from the kernel source file
|
||||
//
|
||||
cl_program CreateProgram(cl_context context, cl_device_id device, const char* fileName)
|
||||
{
|
||||
cl_int errNum;
|
||||
cl_program program;
|
||||
|
||||
std::ifstream kernelFile(fileName, std::ios::in);
|
||||
if (!kernelFile.is_open())
|
||||
{
|
||||
std::cerr << "Failed to open file for reading: " << fileName << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << kernelFile.rdbuf();
|
||||
|
||||
std::string srcStdStr = oss.str();
|
||||
const char *srcStr = srcStdStr.c_str();
|
||||
program = clCreateProgramWithSource(context, 1,
|
||||
(const char**)&srcStr,
|
||||
NULL, NULL);
|
||||
if (program == NULL)
|
||||
{
|
||||
std::cerr << "Failed to create CL program from source." << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
errNum = clBuildProgram(program, 0, NULL, NULL, NULL, NULL);
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
// Determine the reason for the error
|
||||
char buildLog[16384];
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG,
|
||||
sizeof(buildLog), buildLog, NULL);
|
||||
|
||||
std::cerr << "Error in kernel: " << std::endl;
|
||||
std::cerr << buildLog;
|
||||
clReleaseProgram(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
//
|
||||
///
|
||||
// Retreive program binary for all of the devices attached to the
|
||||
// program an and store the one for the device passed in
|
||||
//
|
||||
bool SaveProgramBinary(cl_program program, cl_device_id device, const char* fileName)
|
||||
{
|
||||
//cl_uint numDevices = malloc(sizeof(cl_uint));
|
||||
//cl_uint* numDevices = malloc(sizeof(cl_uint));
|
||||
cl_int errNum;
|
||||
|
||||
printf("try getting program info\n");
|
||||
// 1 - Query for number of devices attached to program
|
||||
/*errNum = clGetProgramInfo(program, CL_PROGRAM_NUM_DEVICES, sizeof(cl_uint),
|
||||
&numDevices, NULL);
|
||||
printf("Got program_num_devices\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for number of devices." << std::endl;
|
||||
return false;
|
||||
}*/
|
||||
|
||||
// 2 - Get all of the Device IDs
|
||||
cl_device_id *devices = new cl_device_id[1];
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_DEVICES,
|
||||
sizeof(cl_device_id) * 1,
|
||||
devices, NULL);
|
||||
printf("Got program_devices\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for devices." << std::endl;
|
||||
delete [] devices;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 3 - Determine the size of each program binary
|
||||
size_t *programBinarySizes = new size_t [1];
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES,
|
||||
sizeof(size_t) * 1,
|
||||
programBinarySizes, NULL);
|
||||
printf("Got program_binary_sizes\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for program binary sizes." << std::endl;
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned char **programBinaries = new unsigned char*[1];
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
programBinaries[i] = new unsigned char[programBinarySizes[i]];
|
||||
}
|
||||
|
||||
// 4 - Get all of the program binaries
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(unsigned char*) * 1,
|
||||
programBinaries, NULL);
|
||||
printf("Got program_binarys\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for program binaries" << std::endl;
|
||||
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 5 - Finally store the binaries for the device requested out to disk for future reading.
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
// Store the binary just for the device requested. In a scenario where
|
||||
// multiple devices were being used you would save all of the binaries out here.
|
||||
if (devices[i] == device)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if(fp ==NULL){
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return false;
|
||||
}
|
||||
printf("Opened file\n");
|
||||
fwrite(programBinaries[i], 1, programBinarySizes[i], fp);
|
||||
printf("wrote file\n");
|
||||
fclose(fp);
|
||||
printf("close file\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return true;
|
||||
}
|
||||
|
||||
///
|
||||
// Attempt to create the program object from a cached binary. Note that
|
||||
// on first run this will fail because the binary has not yet been created.
|
||||
//
|
||||
cl_program CreateProgramFromBinary(cl_context context, cl_device_id device, const char* fileName)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "rb");
|
||||
if (fp == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Determine the size of the binary
|
||||
size_t binarySize;
|
||||
fseek(fp, 0, SEEK_END);
|
||||
binarySize = ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
unsigned char *programBinary = new unsigned char[binarySize];
|
||||
fread(programBinary, 1, binarySize, fp);
|
||||
fclose(fp);
|
||||
|
||||
cl_int errNum = 0;
|
||||
cl_program program;
|
||||
cl_int binaryStatus;
|
||||
|
||||
program = clCreateProgramWithBinary(context,
|
||||
1,
|
||||
&device,
|
||||
&binarySize,
|
||||
(const unsigned char**)&programBinary,
|
||||
&binaryStatus,
|
||||
&errNum);
|
||||
delete [] programBinary;
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error loading program binary." << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (binaryStatus != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Invalid binary for device" << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
errNum = clBuildProgram(program, 1, &device, NULL, NULL, NULL);
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
printf("build errNum:%d\n", errNum);
|
||||
// Determine the reason for the error
|
||||
char buildLog[16384];
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG,
|
||||
sizeof(buildLog), buildLog, NULL);
|
||||
|
||||
std::cerr << "Error in program: " << std::endl;
|
||||
std::cerr << buildLog << std::endl;
|
||||
clReleaseProgram(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return program;
|
||||
void pfn_notify(const char *errinfo, const void *private_info, size_t cb,
|
||||
void *user_data) {
|
||||
fprintf(stderr, "OpenCL Error (via pfn_notify): %s\n", errinfo);
|
||||
}
|
||||
|
||||
///
|
||||
// Cleanup any created OpenCL resources
|
||||
//
|
||||
void Cleanup(cl_context context, cl_command_queue commandQueue,
|
||||
cl_program program, cl_kernel kernel, cl_mem memObjects[3])
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (memObjects[i] != 0)
|
||||
clReleaseMemObject(memObjects[i]);
|
||||
}
|
||||
if (commandQueue != 0)
|
||||
clReleaseCommandQueue(commandQueue);
|
||||
cl_program program, cl_kernel kernel, cl_mem memObjects[3]) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (memObjects[i] != 0)
|
||||
clReleaseMemObject(memObjects[i]);
|
||||
}
|
||||
if (commandQueue != 0)
|
||||
clReleaseCommandQueue(commandQueue);
|
||||
|
||||
if (kernel != 0)
|
||||
clReleaseKernel(kernel);
|
||||
if (kernel != 0)
|
||||
clReleaseKernel(kernel);
|
||||
|
||||
if (program != 0)
|
||||
clReleaseProgram(program);
|
||||
|
||||
if (context != 0)
|
||||
clReleaseContext(context);
|
||||
if (program != 0)
|
||||
clReleaseProgram(program);
|
||||
|
||||
if (context != 0)
|
||||
clReleaseContext(context);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int main(int argc, char **argv) {
|
||||
printf("enter demo main\n");
|
||||
fflush(stdout);
|
||||
putenv("POCL_VERBOSE=1");
|
||||
putenv("POCL_DEVICES=basic");
|
||||
putenv("POCL_LEAVE_TEMP_DIRS=1");
|
||||
putenv("POCL_LEAVE_KERNEL_COMPILER_TEMP_FILES=1");
|
||||
putenv("POCL_TEMP_DIR=pocl");
|
||||
putenv("POCL_CACHE_DIR=pocl");
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(argc >= 2){
|
||||
printf("argv[1]:%s:\n",argv[1]);
|
||||
if(!strcmp(argv[1], "h"))
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(!strcmp(argv[1], "c"))
|
||||
putenv("POCL_CROSS_COMPILE=1");
|
||||
}
|
||||
if(argc >= 3){
|
||||
printf("argv[2]:%s:\n",argv[2]);
|
||||
if(!strcmp(argv[2], "h"))
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(!strcmp(argv[2], "c"))
|
||||
putenv("POCL_CROSS_COMPILE=1");
|
||||
}
|
||||
|
||||
cl_platform_id platform_id;
|
||||
cl_device_id device_id;
|
||||
size_t binary_size;
|
||||
int i;
|
||||
|
||||
//putenv("LD_LIBRARY_PATH=/scratch/colins/build/linux/fs/lib");
|
||||
//putenv("LTDL_LIBRARY_PATH=/scratch/colins/build/linux/fs/lib");
|
||||
//lt_dlsetsearchpath("/scratch/colins/build/linux/fs/lib");
|
||||
//printf("SEARCH_PATH:%s\n",lt_dlgetsearchpath());
|
||||
cl_platform_id platforms[100];
|
||||
cl_uint platforms_n = 0;
|
||||
CL_CHECK(clGetPlatformIDs(100, platforms, &platforms_n));
|
||||
// Getting platform and device information
|
||||
CL_CHECK(clGetPlatformIDs(1, &platform_id, NULL));
|
||||
CL_CHECK(clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, NULL));
|
||||
|
||||
printf("=== %d OpenCL platform(s) found: ===\n", platforms_n);
|
||||
for (int i=0; i<platforms_n; i++)
|
||||
{
|
||||
char buffer[10240];
|
||||
printf(" -- %d --\n", i);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_PROFILE, 10240, buffer, NULL));
|
||||
printf(" PROFILE = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_VERSION, 10240, buffer, NULL));
|
||||
printf(" VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_NAME, 10240, buffer, NULL));
|
||||
printf(" NAME = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_VENDOR, 10240, buffer, NULL));
|
||||
printf(" VENDOR = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, 10240, buffer, NULL));
|
||||
printf(" EXTENSIONS = %s\n", buffer);
|
||||
}
|
||||
cl_context context;
|
||||
context = CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, &pfn_notify, NULL, &_err));
|
||||
|
||||
if (platforms_n == 0)
|
||||
return 1;
|
||||
|
||||
cl_device_id devices[100];
|
||||
cl_uint devices_n = 0;
|
||||
// CL_CHECK(clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 100, devices, &devices_n));
|
||||
CL_CHECK(clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_GPU, 100, devices, &devices_n));
|
||||
|
||||
printf("=== %d OpenCL device(s) found on platform:\n", platforms_n);
|
||||
for (int i=0; i<devices_n; i++)
|
||||
{
|
||||
char buffer[10240];
|
||||
cl_uint buf_uint;
|
||||
cl_ulong buf_ulong;
|
||||
size_t wi_size[3];
|
||||
printf(" -- %d --\n", i);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_NAME = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_VENDOR, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_VENDOR = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_VERSION, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DRIVER_VERSION, sizeof(buffer), buffer, NULL));
|
||||
printf(" DRIVER_VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(buf_uint), &buf_uint, NULL));
|
||||
printf(" DEVICE_MAX_COMPUTE_UNITS = %u\n", (unsigned int)buf_uint);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof(buf_uint), &buf_uint, NULL));
|
||||
printf(" DEVICE_MAX_CLOCK_FREQUENCY = %u\n", (unsigned int)buf_uint);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(buf_ulong), &buf_ulong, NULL));
|
||||
printf(" DEVICE_GLOBAL_MEM_SIZE = %llu\n", (unsigned long long)buf_ulong);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_MAX_WORK_ITEM_SIZES, sizeof(wi_size), &wi_size, NULL));
|
||||
printf(" DEVICE_MAX_WG_SIZE X=%ld,Y=%ld,Z=%ld\n", wi_size[0], wi_size[1], wi_size[2]);
|
||||
}
|
||||
|
||||
if (devices_n == 0)
|
||||
return 1;
|
||||
|
||||
cl_context context;
|
||||
context = CL_CHECK_ERR(clCreateContext(NULL, 1, devices+1, &pfn_notify, NULL, &_err));
|
||||
|
||||
cl_command_queue queue;
|
||||
queue = CL_CHECK_ERR(clCreateCommandQueue(context, devices[1], CL_QUEUE_PROFILING_ENABLE, &_err));
|
||||
|
||||
cl_kernel kernel = 0;
|
||||
cl_mem memObjects[2] = {0,0};
|
||||
cl_command_queue queue;
|
||||
queue = CL_CHECK_ERR(clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &_err));
|
||||
|
||||
cl_kernel kernel = 0;
|
||||
cl_mem memObjects[2] = {0, 0};
|
||||
|
||||
// Create OpenCL program - first attempt to load cached binary.
|
||||
// If that is not available, then create the program from source
|
||||
// and store the binary for future use.
|
||||
std::cout << "Attempting to create program from binary..." << std::endl;
|
||||
cl_program program = CreateProgramFromBinary(context, devices[1], "kernel.cl.bin");
|
||||
if (program == NULL)
|
||||
{
|
||||
std::cout << "Binary not loaded, create from source..." << std::endl;
|
||||
program = CreateProgram(context, devices[1], "kernel.cl");
|
||||
if (program == NULL)
|
||||
{
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
}
|
||||
cl_program program =
|
||||
clCreateProgramWithBuiltInKernels(context, 1, &device_id, "saxpy", NULL);
|
||||
if (program == NULL) {
|
||||
std::cerr << "Failed to write program binary" << std::endl;
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
} else {
|
||||
std::cout << "Read program from binary." << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "Save program binary for future run..." << std::endl;
|
||||
if (SaveProgramBinary(program, devices[1], "kernel.cl.bin") == false)
|
||||
{
|
||||
std::cerr << "Failed to write program binary" << std::endl;
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Read program from binary." << std::endl;
|
||||
}
|
||||
// Build program
|
||||
CL_CHECK(clBuildProgram(program, 1, &device_id, NULL, NULL, NULL));
|
||||
|
||||
printf("attempting to create input buffer\n");
|
||||
fflush(stdout);
|
||||
cl_mem input_buffer;
|
||||
input_buffer = CL_CHECK_ERR(clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(float)*NUM_DATA, NULL, &_err));
|
||||
cl_mem input_buffer;
|
||||
input_buffer = CL_CHECK_ERR(clCreateBuffer(
|
||||
context, CL_MEM_READ_ONLY, sizeof(float) * NUM_DATA, NULL, &_err));
|
||||
|
||||
printf("attempting to create output buffer\n");
|
||||
fflush(stdout);
|
||||
cl_mem output_buffer;
|
||||
output_buffer = CL_CHECK_ERR(clCreateBuffer(context, CL_MEM_WRITE_ONLY, sizeof(float)*NUM_DATA, NULL, &_err));
|
||||
cl_mem output_buffer;
|
||||
output_buffer = CL_CHECK_ERR(clCreateBuffer(
|
||||
context, CL_MEM_WRITE_ONLY, sizeof(float) * NUM_DATA, NULL, &_err));
|
||||
|
||||
memObjects[0] = input_buffer;
|
||||
memObjects[1] = output_buffer;
|
||||
|
||||
float factor = ((float)rand()/(float)(RAND_MAX)) * 100.0;
|
||||
float factor = ((float)rand() / (float)(RAND_MAX)) * 100.0;
|
||||
|
||||
printf("attempting to create kernel\n");
|
||||
fflush(stdout);
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "saxpy", &_err));
|
||||
printf("setting up kernel args cl_mem:%lx \n",input_buffer);
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "saxpy", &_err));
|
||||
printf("setting up kernel args cl_mem:%lx \n", input_buffer);
|
||||
fflush(stdout);
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(factor), &factor));
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(factor), &factor));
|
||||
|
||||
printf("attempting to enqueue write buffer\n");
|
||||
fflush(stdout);
|
||||
for (int i=0; i<NUM_DATA; i++) {
|
||||
float in = ((float)rand()/(float)(RAND_MAX)) * 100.0;
|
||||
CL_CHECK(clEnqueueWriteBuffer(queue, input_buffer, CL_TRUE, i*sizeof(float), 4, &in, 0, NULL, NULL));
|
||||
}
|
||||
for (int i = 0; i < NUM_DATA; i++) {
|
||||
float in = ((float)rand() / (float)(RAND_MAX)) * 100.0;
|
||||
CL_CHECK(clEnqueueWriteBuffer(queue, input_buffer, CL_TRUE,
|
||||
i * sizeof(float), 4, &in, 0, NULL, NULL));
|
||||
}
|
||||
|
||||
cl_event kernel_completion;
|
||||
size_t global_work_size[1] = { NUM_DATA };
|
||||
cl_event kernel_completion;
|
||||
size_t global_work_size[1] = {NUM_DATA};
|
||||
printf("attempting to enqueue kernel\n");
|
||||
fflush(stdout);
|
||||
CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 1, NULL, global_work_size, NULL, 0, NULL, &kernel_completion));
|
||||
CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 1, NULL, global_work_size,
|
||||
NULL, 0, NULL, &kernel_completion));
|
||||
printf("Enqueue'd kerenel\n");
|
||||
fflush(stdout);
|
||||
cl_ulong time_start, time_end;
|
||||
CL_CHECK(clWaitForEvents(1, &kernel_completion));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_START, sizeof(time_start), &time_start, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_END, sizeof(time_end), &time_end, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion,
|
||||
CL_PROFILING_COMMAND_START,
|
||||
sizeof(time_start), &time_start, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_END,
|
||||
sizeof(time_end), &time_end, NULL));
|
||||
double elapsed = time_end - time_start;
|
||||
printf("time(ns):%lg\n",elapsed);
|
||||
CL_CHECK(clReleaseEvent(kernel_completion));
|
||||
printf("time(ns):%lg\n", elapsed);
|
||||
CL_CHECK(clReleaseEvent(kernel_completion));
|
||||
|
||||
printf("Result:");
|
||||
for (int i=0; i<NUM_DATA; i++) {
|
||||
float data;
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE, i*sizeof(float), 4, &data, 0, NULL, NULL));
|
||||
//printf(" %f", data);
|
||||
}
|
||||
printf("\n");
|
||||
printf("Result:");
|
||||
for (int i = 0; i < NUM_DATA; i++) {
|
||||
float data;
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE,
|
||||
i * sizeof(float), 4, &data, 0, NULL, NULL));
|
||||
// printf(" %f", data);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[1]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[1]));
|
||||
|
||||
CL_CHECK(clReleaseKernel(kernel));
|
||||
CL_CHECK(clReleaseProgram(program));
|
||||
CL_CHECK(clReleaseContext(context));
|
||||
CL_CHECK(clReleaseKernel(kernel));
|
||||
CL_CHECK(clReleaseProgram(program));
|
||||
CL_CHECK(clReleaseContext(context));
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,33 +1,35 @@
|
|||
RISCV_TOOL_PATH = $(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
POCL_CC_PATH = $(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_INC_PATH = $(wildcard ../include)
|
||||
POCL_LIB_PATH = $(wildcard ../lib)
|
||||
VX_RT_PATH = $(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH = $(wildcard ../../../simX/obj_dir)
|
||||
|
||||
RISCV_TOOL_PATH=$(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
GDB = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gdb
|
||||
|
||||
POCL_CC_PATH=$(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_RT_PATH=$(wildcard ~/dev/pocl/drops_riscv_rt)
|
||||
VX_SRCS = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_SRCS += $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_SRCS += $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_SRCS += $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_SRCS += $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_SRCS += $(VX_RT_PATH)/tests/tests.c
|
||||
VX_SRCS += $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
VX_SRCS += $(VX_STR) $(VX_FIO) $(VX_NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
|
||||
VX_RT_PATH=$(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH=$(wildcard ../../../simX/obj_dir)
|
||||
VX_CFLAGS = -nostartfiles -Wl,-Bstatic,-T,$(VX_RT_PATH)/mains/vortex_link.ld
|
||||
|
||||
CC=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
NEWLIB_PATH=$(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib
|
||||
|
||||
VX_NEWLIB = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_STR = $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_INT = $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_IO = $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_FIO = $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_API = $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
|
||||
VX_SRCS = $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
|
||||
CXXFLAGS = -g -O0 -nostartfiles -Wl,-Bstatic,-T,$(VX_RT_PATH)/mains/vortex_link.ld -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS = -g -O0 -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS += -ffreestanding # program may not begin at main()
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -Wl,--gc-sections # enable garbage collection of unused input sections
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -I$(POCL_INC_PATH)
|
||||
|
||||
LIBS = -lOpenCL
|
||||
VX_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/libOpenCL.a
|
||||
QEMU_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/qemu/libOpenCL.a
|
||||
|
||||
PROJECT=sfilter
|
||||
|
||||
|
@ -37,7 +39,10 @@ lib$(PROJECT).a: kernel.cl
|
|||
POCL_DEBUG=all POCL_DEBUG_LLVM_PASSES=1 LD_LIBRARY_PATH=$(RISCV_TOOL_PATH)/lib:$(POCL_CC_PATH)/lib $(POCL_CC_PATH)/bin/poclcc -o lib$(PROJECT).a kernel.cl
|
||||
|
||||
$(PROJECT).elf: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) -I$(POCL_RT_PATH)/include -L$(POCL_RT_PATH)/lib/static -L. $(VX_SRCS) main.cc -Wl,--whole-archive -l$(PROJECT) -Wl,--no-whole-archive $(LIBS) -o $(PROJECT).elf
|
||||
$(CXX) $(CXXFLAGS) $(VX_CFLAGS) $(VX_SRCS) main.cc $(VX_LIBS) -o $(PROJECT).elf
|
||||
|
||||
$(PROJECT).qemu: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) main.cc $(QEMU_LIBS) -o $(PROJECT).qemu
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(HEX) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
@ -45,8 +50,17 @@ $(PROJECT).hex: $(PROJECT).elf
|
|||
$(PROJECT).dump: $(PROJECT).elf
|
||||
$(DMP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
run:
|
||||
$(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
run: $(PROJECT).hex
|
||||
POCL_DEBUG=all $(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
|
||||
qemu: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-s: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -g 1234 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-c: $(PROJECT).qemu
|
||||
$(GDB) $(PROJECT).qemu
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl *.qemu
|
|
@ -17,95 +17,95 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* gcc -o cldemo -std=gnu99 -Wall -I/usr/include/nvidia-current cldemo.c -lOpenCL
|
||||
* gcc -o cldemo -std=gnu99 -Wall -I/usr/include/nvidia-current cldemo.c
|
||||
* -lOpenCL
|
||||
*
|
||||
*/
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <errno.h>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define NUM_DATA 66
|
||||
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
cl_int _err = _expr; \
|
||||
if (_err == CL_SUCCESS) \
|
||||
break; \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
cl_int _err = _expr; \
|
||||
if (_err == CL_SUCCESS) \
|
||||
break; \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
|
||||
#define CL_CHECK_ERR(_expr) \
|
||||
({ \
|
||||
cl_int _err = CL_INVALID_VALUE; \
|
||||
typeof(_expr) _ret = _expr; \
|
||||
if (_err != CL_SUCCESS) { \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} \
|
||||
_ret; \
|
||||
})
|
||||
#define CL_CHECK_ERR(_expr) \
|
||||
({ \
|
||||
cl_int _err = CL_INVALID_VALUE; \
|
||||
typeof(_expr) _ret = _expr; \
|
||||
if (_err != CL_SUCCESS) { \
|
||||
fprintf(stderr, "OpenCL Error: '%s' returned %d!\n", #_expr, (int)_err); \
|
||||
abort(); \
|
||||
} \
|
||||
_ret; \
|
||||
})
|
||||
|
||||
void pfn_notify(const char *errinfo, const void *private_info, size_t cb, void *user_data)
|
||||
{
|
||||
fprintf(stderr, "OpenCL Error (via pfn_notify): %s\n", errinfo);
|
||||
void pfn_notify(const char *errinfo, const void *private_info, size_t cb,
|
||||
void *user_data) {
|
||||
fprintf(stderr, "OpenCL Error (via pfn_notify): %s\n", errinfo);
|
||||
}
|
||||
// inlcude pocl float to half conversions
|
||||
typedef union
|
||||
{
|
||||
typedef union {
|
||||
int32_t i;
|
||||
float f;
|
||||
} FloatConvUnion;
|
||||
cl_half
|
||||
poclu_float_to_cl_half(float value)
|
||||
{
|
||||
cl_half poclu_float_to_cl_half(float value) {
|
||||
FloatConvUnion u;
|
||||
u.f = value;
|
||||
cl_half half = (u.i >> 16) & 0x8000; // sign
|
||||
cl_half fraction = (u.i >> 12) & 0x007ff; // fraction with extra bit for rounding
|
||||
cl_half exponent = (u.i >> 23) & 0xff; // exponent
|
||||
|
||||
if(exponent < 0x0067) // Return signed zero if zero or value is too small for denormal half
|
||||
cl_half fraction =
|
||||
(u.i >> 12) & 0x007ff; // fraction with extra bit for rounding
|
||||
cl_half exponent = (u.i >> 23) & 0xff; // exponent
|
||||
|
||||
if (exponent < 0x0067) // Return signed zero if zero or value is too small for
|
||||
// denormal half
|
||||
return half;
|
||||
|
||||
if(exponent > 0x008e){// value was NaN or Inf
|
||||
half |= 0x7c00u; // Make into inf
|
||||
half |= exponent == 255 && (u.i & 0x007fffffu); // If value was NaN make this into NaN
|
||||
if (exponent > 0x008e) { // value was NaN or Inf
|
||||
half |= 0x7c00u; // Make into inf
|
||||
half |= exponent == 255 &&
|
||||
(u.i & 0x007fffffu); // If value was NaN make this into NaN
|
||||
return half;
|
||||
}
|
||||
|
||||
if(exponent < 0x0071){// Denormal
|
||||
if (exponent < 0x0071) { // Denormal
|
||||
fraction |= 0x0800u;
|
||||
|
||||
// rounding
|
||||
half |= (fraction >> (0x0072 - exponent)) + ((fraction >> (0x0071 - exponent)) & 1);
|
||||
half |= (fraction >> (0x0072 - exponent)) +
|
||||
((fraction >> (0x0071 - exponent)) & 1);
|
||||
return half;
|
||||
}
|
||||
|
||||
half |= ((exponent - 0x0070) << 10) | (fraction >> 1);
|
||||
half += fraction & 1;// rounding
|
||||
half += fraction & 1; // rounding
|
||||
return half;
|
||||
}
|
||||
#ifndef INFINITY
|
||||
#define INFINITY 1.0/0.0
|
||||
#define INFINITY 1.0 / 0.0
|
||||
#endif
|
||||
|
||||
#ifndef NAN
|
||||
#define NAN 0.0/0.0
|
||||
#define NAN 0.0 / 0.0
|
||||
#endif
|
||||
|
||||
float
|
||||
poclu_cl_half_to_float(cl_half value)
|
||||
{
|
||||
float poclu_cl_half_to_float(cl_half value) {
|
||||
if (value == 0xFC00) {
|
||||
return -INFINITY;
|
||||
}
|
||||
|
@ -131,384 +131,78 @@ poclu_cl_half_to_float(cl_half value)
|
|||
return v;
|
||||
}
|
||||
|
||||
///
|
||||
// Create an OpenCL program from the kernel source file
|
||||
//
|
||||
cl_program CreateProgram(cl_context context, cl_device_id device, const char* fileName)
|
||||
{
|
||||
cl_int errNum;
|
||||
cl_program program;
|
||||
|
||||
std::ifstream kernelFile(fileName, std::ios::in);
|
||||
if (!kernelFile.is_open())
|
||||
{
|
||||
std::cerr << "Failed to open file for reading: " << fileName << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << kernelFile.rdbuf();
|
||||
|
||||
std::string srcStdStr = oss.str();
|
||||
const char *srcStr = srcStdStr.c_str();
|
||||
program = clCreateProgramWithSource(context, 1,
|
||||
(const char**)&srcStr,
|
||||
NULL, NULL);
|
||||
if (program == NULL)
|
||||
{
|
||||
std::cerr << "Failed to create CL program from source." << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
errNum = clBuildProgram(program, 0, NULL, NULL, NULL, NULL);
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
// Determine the reason for the error
|
||||
char buildLog[16384];
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG,
|
||||
sizeof(buildLog), buildLog, NULL);
|
||||
|
||||
std::cerr << "Error in kernel: " << std::endl;
|
||||
std::cerr << buildLog;
|
||||
clReleaseProgram(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
//
|
||||
///
|
||||
// Retreive program binary for all of the devices attached to the
|
||||
// program an and store the one for the device passed in
|
||||
//
|
||||
bool SaveProgramBinary(cl_program program, cl_device_id device, const char* fileName)
|
||||
{
|
||||
//cl_uint numDevices = malloc(sizeof(cl_uint));
|
||||
//cl_uint* numDevices = malloc(sizeof(cl_uint));
|
||||
cl_int errNum;
|
||||
|
||||
printf("try getting program info\n");
|
||||
// 1 - Query for number of devices attached to program
|
||||
/*errNum = clGetProgramInfo(program, CL_PROGRAM_NUM_DEVICES, sizeof(cl_uint),
|
||||
&numDevices, NULL);
|
||||
printf("Got program_num_devices\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for number of devices." << std::endl;
|
||||
return false;
|
||||
}*/
|
||||
|
||||
// 2 - Get all of the Device IDs
|
||||
cl_device_id *devices = new cl_device_id[1];
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_DEVICES,
|
||||
sizeof(cl_device_id) * 1,
|
||||
devices, NULL);
|
||||
printf("Got program_devices\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for devices." << std::endl;
|
||||
delete [] devices;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 3 - Determine the size of each program binary
|
||||
size_t *programBinarySizes = new size_t [1];
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES,
|
||||
sizeof(size_t) * 1,
|
||||
programBinarySizes, NULL);
|
||||
printf("Got program_binary_sizes\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for program binary sizes." << std::endl;
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned char **programBinaries = new unsigned char*[1];
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
programBinaries[i] = new unsigned char[programBinarySizes[i]];
|
||||
}
|
||||
|
||||
// 4 - Get all of the program binaries
|
||||
errNum = clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(unsigned char*) * 1,
|
||||
programBinaries, NULL);
|
||||
printf("Got program_binarys\n");
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error querying for program binaries" << std::endl;
|
||||
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 5 - Finally store the binaries for the device requested out to disk for future reading.
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
// Store the binary just for the device requested. In a scenario where
|
||||
// multiple devices were being used you would save all of the binaries out here.
|
||||
if (devices[i] == device)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "wb");
|
||||
if(fp ==NULL){
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return false;
|
||||
}
|
||||
printf("Opened file\n");
|
||||
fwrite(programBinaries[i], 1, programBinarySizes[i], fp);
|
||||
printf("wrote file\n");
|
||||
fclose(fp);
|
||||
printf("close file\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
delete [] devices;
|
||||
delete [] programBinarySizes;
|
||||
for (cl_uint i = 0; i < 1; i++)
|
||||
{
|
||||
delete [] programBinaries[i];
|
||||
}
|
||||
delete [] programBinaries;
|
||||
return true;
|
||||
}
|
||||
|
||||
///
|
||||
// Attempt to create the program object from a cached binary. Note that
|
||||
// on first run this will fail because the binary has not yet been created.
|
||||
//
|
||||
cl_program CreateProgramFromBinary(cl_context context, cl_device_id device, const char* fileName)
|
||||
{
|
||||
FILE *fp = fopen(fileName, "rb");
|
||||
if (fp == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Determine the size of the binary
|
||||
size_t binarySize;
|
||||
fseek(fp, 0, SEEK_END);
|
||||
binarySize = ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
unsigned char *programBinary = new unsigned char[binarySize];
|
||||
fread(programBinary, 1, binarySize, fp);
|
||||
fclose(fp);
|
||||
|
||||
cl_int errNum = 0;
|
||||
cl_program program;
|
||||
cl_int binaryStatus;
|
||||
|
||||
program = clCreateProgramWithBinary(context,
|
||||
1,
|
||||
&device,
|
||||
&binarySize,
|
||||
(const unsigned char**)&programBinary,
|
||||
&binaryStatus,
|
||||
&errNum);
|
||||
delete [] programBinary;
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Error loading program binary." << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (binaryStatus != CL_SUCCESS)
|
||||
{
|
||||
std::cerr << "Invalid binary for device" << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
errNum = clBuildProgram(program, 1, &device, NULL, NULL, NULL);
|
||||
if (errNum != CL_SUCCESS)
|
||||
{
|
||||
printf("build errNum:%d\n", errNum);
|
||||
// Determine the reason for the error
|
||||
char buildLog[16384];
|
||||
clGetProgramBuildInfo(program, device, CL_PROGRAM_BUILD_LOG,
|
||||
sizeof(buildLog), buildLog, NULL);
|
||||
|
||||
std::cerr << "Error in program: " << std::endl;
|
||||
std::cerr << buildLog << std::endl;
|
||||
clReleaseProgram(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
///
|
||||
// Cleanup any created OpenCL resources
|
||||
//
|
||||
void Cleanup(cl_context context, cl_command_queue commandQueue,
|
||||
cl_program program, cl_kernel kernel, cl_mem memObjects[3])
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (memObjects[i] != 0)
|
||||
clReleaseMemObject(memObjects[i]);
|
||||
}
|
||||
if (commandQueue != 0)
|
||||
clReleaseCommandQueue(commandQueue);
|
||||
cl_program program, cl_kernel kernel, cl_mem memObjects[3]) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (memObjects[i] != 0)
|
||||
clReleaseMemObject(memObjects[i]);
|
||||
}
|
||||
if (commandQueue != 0)
|
||||
clReleaseCommandQueue(commandQueue);
|
||||
|
||||
if (kernel != 0)
|
||||
clReleaseKernel(kernel);
|
||||
if (kernel != 0)
|
||||
clReleaseKernel(kernel);
|
||||
|
||||
if (program != 0)
|
||||
clReleaseProgram(program);
|
||||
|
||||
if (context != 0)
|
||||
clReleaseContext(context);
|
||||
if (program != 0)
|
||||
clReleaseProgram(program);
|
||||
|
||||
if (context != 0)
|
||||
clReleaseContext(context);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int main(int argc, char **argv) {
|
||||
printf("enter demo main\n");
|
||||
fflush(stdout);
|
||||
putenv("POCL_VERBOSE=1");
|
||||
putenv("POCL_DEVICES=basic");
|
||||
putenv("POCL_LEAVE_TEMP_DIRS=1");
|
||||
putenv("POCL_LEAVE_KERNEL_COMPILER_TEMP_FILES=1");
|
||||
putenv("POCL_TEMP_DIR=pocl");
|
||||
putenv("POCL_CACHE_DIR=pocl");
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(argc >= 2){
|
||||
printf("argv[1]:%s:\n",argv[1]);
|
||||
if(!strcmp(argv[1], "h"))
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(!strcmp(argv[1], "c"))
|
||||
putenv("POCL_CROSS_COMPILE=1");
|
||||
}
|
||||
if(argc >= 3){
|
||||
printf("argv[2]:%s:\n",argv[2]);
|
||||
if(!strcmp(argv[2], "h"))
|
||||
putenv("POCL_WORK_GROUP_METHOD=spmd");
|
||||
if(!strcmp(argv[2], "c"))
|
||||
putenv("POCL_CROSS_COMPILE=1");
|
||||
}
|
||||
|
||||
//putenv("LD_LIBRARY_PATH=/scratch/colins/build/linux/fs/lib");
|
||||
//putenv("LTDL_LIBRARY_PATH=/scratch/colins/build/linux/fs/lib");
|
||||
//lt_dlsetsearchpath("/scratch/colins/build/linux/fs/lib");
|
||||
//printf("SEARCH_PATH:%s\n",lt_dlgetsearchpath());
|
||||
cl_platform_id platforms[100];
|
||||
cl_uint platforms_n = 0;
|
||||
CL_CHECK(clGetPlatformIDs(100, platforms, &platforms_n));
|
||||
cl_platform_id platform_id;
|
||||
cl_device_id device_id;
|
||||
size_t binary_size;
|
||||
int i;
|
||||
|
||||
printf("=== %d OpenCL platform(s) found: ===\n", platforms_n);
|
||||
for (int i=0; i<platforms_n; i++)
|
||||
{
|
||||
char buffer[10240];
|
||||
printf(" -- %d --\n", i);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_PROFILE, 10240, buffer, NULL));
|
||||
printf(" PROFILE = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_VERSION, 10240, buffer, NULL));
|
||||
printf(" VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_NAME, 10240, buffer, NULL));
|
||||
printf(" NAME = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_VENDOR, 10240, buffer, NULL));
|
||||
printf(" VENDOR = %s\n", buffer);
|
||||
CL_CHECK(clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, 10240, buffer, NULL));
|
||||
printf(" EXTENSIONS = %s\n", buffer);
|
||||
}
|
||||
// Getting platform and device information
|
||||
CL_CHECK(clGetPlatformIDs(1, &platform_id, NULL));
|
||||
CL_CHECK(clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, NULL));
|
||||
|
||||
if (platforms_n == 0)
|
||||
return 1;
|
||||
cl_context context;
|
||||
context = CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, &pfn_notify, NULL, &_err));
|
||||
|
||||
cl_device_id devices[100];
|
||||
cl_uint devices_n = 0;
|
||||
// CL_CHECK(clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 100, devices, &devices_n));
|
||||
CL_CHECK(clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_GPU, 100, devices, &devices_n));
|
||||
|
||||
printf("=== %d OpenCL device(s) found on platform:\n", platforms_n);
|
||||
for (int i=0; i<devices_n; i++)
|
||||
{
|
||||
char buffer[10240];
|
||||
cl_uint buf_uint;
|
||||
cl_ulong buf_ulong;
|
||||
printf(" -- %d --\n", i);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_NAME, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_NAME = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_VENDOR, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_VENDOR = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_VERSION, sizeof(buffer), buffer, NULL));
|
||||
printf(" DEVICE_VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DRIVER_VERSION, sizeof(buffer), buffer, NULL));
|
||||
printf(" DRIVER_VERSION = %s\n", buffer);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(buf_uint), &buf_uint, NULL));
|
||||
printf(" DEVICE_MAX_COMPUTE_UNITS = %u\n", (unsigned int)buf_uint);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof(buf_uint), &buf_uint, NULL));
|
||||
printf(" DEVICE_MAX_CLOCK_FREQUENCY = %u\n", (unsigned int)buf_uint);
|
||||
CL_CHECK(clGetDeviceInfo(devices[i], CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(buf_ulong), &buf_ulong, NULL));
|
||||
printf(" DEVICE_GLOBAL_MEM_SIZE = %llu\n", (unsigned long long)buf_ulong);
|
||||
}
|
||||
|
||||
if (devices_n == 0)
|
||||
return 1;
|
||||
|
||||
cl_context context;
|
||||
context = CL_CHECK_ERR(clCreateContext(NULL, 1, devices+1, &pfn_notify, NULL, &_err));
|
||||
|
||||
cl_command_queue queue;
|
||||
queue = CL_CHECK_ERR(clCreateCommandQueue(context, devices[1], CL_QUEUE_PROFILING_ENABLE, &_err));
|
||||
|
||||
cl_kernel kernel = 0;
|
||||
cl_mem memObjects[2] = {0,0};
|
||||
cl_command_queue queue;
|
||||
queue = CL_CHECK_ERR(clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &_err));
|
||||
|
||||
cl_kernel kernel = 0;
|
||||
cl_mem memObjects[2] = {0, 0};
|
||||
|
||||
// Create OpenCL program - first attempt to load cached binary.
|
||||
// If that is not available, then create the program from source
|
||||
// and store the binary for future use.
|
||||
std::cout << "Attempting to create program from binary..." << std::endl;
|
||||
cl_program program = CreateProgramFromBinary(context, devices[1], "kernel.cl.bin");
|
||||
if (program == NULL)
|
||||
{
|
||||
std::cout << "Binary not loaded, create from source..." << std::endl;
|
||||
program = CreateProgram(context, devices[1], "kernel.cl");
|
||||
if (program == NULL)
|
||||
{
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
}
|
||||
cl_program program = clCreateProgramWithBuiltInKernels(context, 1, &device_id, "sfilter", NULL);
|
||||
if (program == NULL) {
|
||||
std::cerr << "Failed to write program binary" << std::endl;
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
} else {
|
||||
std::cout << "Read program from binary." << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "Save program binary for future run..." << std::endl;
|
||||
if (SaveProgramBinary(program, devices[1], "kernel.cl.bin") == false)
|
||||
{
|
||||
std::cerr << "Failed to write program binary" << std::endl;
|
||||
Cleanup(context, queue, program, kernel, memObjects);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Read program from binary." << std::endl;
|
||||
}
|
||||
// Build program
|
||||
CL_CHECK(clBuildProgram(program, 1, &device_id, NULL, NULL, NULL));
|
||||
|
||||
printf("attempting to create input buffer\n");
|
||||
fflush(stdout);
|
||||
cl_mem input_buffer;
|
||||
input_buffer = CL_CHECK_ERR(clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(float)*NUM_DATA*NUM_DATA, NULL, &_err));
|
||||
cl_mem input_buffer;
|
||||
input_buffer = CL_CHECK_ERR(
|
||||
clCreateBuffer(context, CL_MEM_READ_ONLY,
|
||||
sizeof(float) * NUM_DATA * NUM_DATA, NULL, &_err));
|
||||
|
||||
printf("attempting to create output buffer\n");
|
||||
fflush(stdout);
|
||||
cl_mem output_buffer;
|
||||
output_buffer = CL_CHECK_ERR(clCreateBuffer(context, CL_MEM_WRITE_ONLY, sizeof(float)*NUM_DATA*NUM_DATA, NULL, &_err));
|
||||
cl_mem output_buffer;
|
||||
output_buffer = CL_CHECK_ERR(
|
||||
clCreateBuffer(context, CL_MEM_WRITE_ONLY,
|
||||
sizeof(float) * NUM_DATA * NUM_DATA, NULL, &_err));
|
||||
|
||||
memObjects[0] = input_buffer;
|
||||
memObjects[1] = output_buffer;
|
||||
|
@ -527,61 +221,67 @@ int main(int argc, char **argv)
|
|||
|
||||
printf("attempting to create kernel\n");
|
||||
fflush(stdout);
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "sfilter", &_err));
|
||||
printf("setting up kernel args cl_mem:%lx \n",input_buffer);
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "sfilter", &_err));
|
||||
printf("setting up kernel args cl_mem:%lx \n", input_buffer);
|
||||
fflush(stdout);
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(ldc), (&ldc)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 3, sizeof(m0), (&m0)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 4, sizeof(m1), (&m1)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 5, sizeof(m2), (&m2)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 6, sizeof(m3), (&m3)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 7, sizeof(m4), (&m4)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 8, sizeof(m5), (&m5)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 9, sizeof(m6), (&m6)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 10, sizeof(m7), (&m7)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 11, sizeof(m8), (&m8)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(ldc), (&ldc)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 3, sizeof(m0), (&m0)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 4, sizeof(m1), (&m1)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 5, sizeof(m2), (&m2)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 6, sizeof(m3), (&m3)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 7, sizeof(m4), (&m4)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 8, sizeof(m5), (&m5)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 9, sizeof(m6), (&m6)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 10, sizeof(m7), (&m7)));
|
||||
CL_CHECK(clSetKernelArg(kernel, 11, sizeof(m8), (&m8)));
|
||||
|
||||
printf("attempting to enqueue write buffer\n");
|
||||
fflush(stdout);
|
||||
for (int i=0; i<NUM_DATA*NUM_DATA; i++) {
|
||||
float in = ((float)rand()/(float)(RAND_MAX)) * 100.0;
|
||||
CL_CHECK(clEnqueueWriteBuffer(queue, input_buffer, CL_TRUE, i*sizeof(float), 4, &in, 0, NULL, NULL));
|
||||
}
|
||||
for (int i = 0; i < NUM_DATA * NUM_DATA; i++) {
|
||||
float in = ((float)rand() / (float)(RAND_MAX)) * 100.0;
|
||||
CL_CHECK(clEnqueueWriteBuffer(queue, input_buffer, CL_TRUE,
|
||||
i * sizeof(float), 4, &in, 0, NULL, NULL));
|
||||
}
|
||||
|
||||
cl_event kernel_completion;
|
||||
size_t global_offset[2] = { 1, 1};
|
||||
size_t global_work_size[2] = { NUM_DATA - 2, NUM_DATA - 2};//avoid the edges
|
||||
const size_t local_work_size[2] = { 64, 1 };
|
||||
cl_event kernel_completion;
|
||||
size_t global_offset[2] = {1, 1};
|
||||
size_t global_work_size[2] = {NUM_DATA - 2, NUM_DATA - 2}; // avoid the edges
|
||||
const size_t local_work_size[2] = {64, 1};
|
||||
printf("attempting to enqueue kernel\n");
|
||||
fflush(stdout);
|
||||
CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 2, global_offset, global_work_size, local_work_size, 0, NULL, &kernel_completion));
|
||||
CL_CHECK(clEnqueueNDRangeKernel(queue, kernel, 2, global_offset,
|
||||
global_work_size, local_work_size, 0, NULL,
|
||||
&kernel_completion));
|
||||
printf("Enqueue'd kerenel\n");
|
||||
fflush(stdout);
|
||||
cl_ulong time_start, time_end;
|
||||
CL_CHECK(clWaitForEvents(1, &kernel_completion));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_START, sizeof(time_start), &time_start, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_END, sizeof(time_end), &time_end, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion,
|
||||
CL_PROFILING_COMMAND_START,
|
||||
sizeof(time_start), &time_start, NULL));
|
||||
CL_CHECK(clGetEventProfilingInfo(kernel_completion, CL_PROFILING_COMMAND_END,
|
||||
sizeof(time_end), &time_end, NULL));
|
||||
double elapsed = time_end - time_start;
|
||||
printf("time(ns):%lg\n",elapsed);
|
||||
CL_CHECK(clReleaseEvent(kernel_completion));
|
||||
printf("time(ns):%lg\n", elapsed);
|
||||
CL_CHECK(clReleaseEvent(kernel_completion));
|
||||
|
||||
printf("Result:");
|
||||
for (int i=0; i<NUM_DATA*NUM_DATA; i++) {
|
||||
float data;
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE, i*sizeof(float), 4, &data, 0, NULL, NULL));
|
||||
//printf(" %f", data);
|
||||
}
|
||||
printf("\n");
|
||||
printf("Result:");
|
||||
for (int i = 0; i < NUM_DATA * NUM_DATA; i++) {
|
||||
float data;
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE,
|
||||
i * sizeof(float), 4, &data, 0, NULL, NULL));
|
||||
// printf(" %f", data);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[1]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
CL_CHECK(clReleaseMemObject(memObjects[1]));
|
||||
|
||||
CL_CHECK(clReleaseKernel(kernel));
|
||||
CL_CHECK(clReleaseProgram(program));
|
||||
CL_CHECK(clReleaseContext(context));
|
||||
CL_CHECK(clReleaseKernel(kernel));
|
||||
CL_CHECK(clReleaseProgram(program));
|
||||
CL_CHECK(clReleaseContext(context));
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,7 @@
|
|||
|
||||
RISCV_TOOL_PATH = $(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
POCL_CC_PATH = $(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_RT_PATH = $(wildcard ~/dev/pocl/drops_riscv_rt)
|
||||
POCL_RT0_PATH = $(wildcard ~/dev/pocl/drops_riscv_rt0)
|
||||
POCL_INC_PATH = $(wildcard ../include)
|
||||
POCL_LIB_PATH = $(wildcard ../lib)
|
||||
VX_RT_PATH = $(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH = $(wildcard ../../../simX/obj_dir)
|
||||
|
||||
|
@ -27,10 +26,10 @@ CXXFLAGS = -g -O0 -march=rv32im -mabi=ilp32
|
|||
CXXFLAGS += -ffreestanding # program may not begin at main()
|
||||
CXXFLAGS += -Wl,--gc-sections # enable garbage collection of unused input sections
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -I$(POCL_RT_PATH)/include
|
||||
CXXFLAGS += -I$(POCL_INC_PATH)
|
||||
|
||||
VX_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_RT_PATH)/lib/static/libOpenCL.a
|
||||
QEMU_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_RT0_PATH)/lib/static/libOpenCL.a
|
||||
VX_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/libOpenCL.a
|
||||
QEMU_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/qemu/libOpenCL.a
|
||||
|
||||
PROJECT=sgemm
|
||||
|
||||
|
@ -45,9 +44,6 @@ $(PROJECT).elf: main.cc lib$(PROJECT).a
|
|||
$(PROJECT).qemu: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) main.cc $(QEMU_LIBS) -o $(PROJECT).qemu
|
||||
|
||||
$(PROJECT).qemu: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) -I$(POCL_RT0_PATH)/include -L$(POCL_RT0_PATH)/lib/static -L. main.cc -Wl,--whole-archive -l$(PROJECT) -Wl,--no-whole-archive $(LIBS) -o $(PROJECT).qemu
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(HEX) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
||||
|
@ -66,8 +62,5 @@ gdb-s: $(PROJECT).qemu
|
|||
gdb-c: $(PROJECT).qemu
|
||||
$(GDB) $(PROJECT).qemu
|
||||
|
||||
qemu: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl *.qemu
|
|
@ -82,6 +82,8 @@ void Cleanup(cl_context context, cl_command_queue commandQueue,
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("enter demo main\n");
|
||||
|
||||
cl_platform_id platform_id;
|
||||
cl_device_id device_id;
|
||||
size_t binary_size;
|
||||
|
@ -117,6 +119,7 @@ int main(int argc, char **argv) {
|
|||
} else {
|
||||
std::cout << "Read program from binary." << std::endl;
|
||||
}
|
||||
|
||||
// Build program
|
||||
CL_CHECK(clBuildProgram(program, 1, &device_id, NULL, NULL, NULL));
|
||||
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
RISCV_TOOL_PATH = $(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
POCL_CC_PATH = $(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_INC_PATH = $(wildcard ../include)
|
||||
POCL_LIB_PATH = $(wildcard ../lib)
|
||||
VX_RT_PATH = $(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH = $(wildcard ../../../simX/obj_dir)
|
||||
|
||||
RISCV_TOOL_PATH=$(wildcard ~/dev/riscv-gnu-toolchain/drops)
|
||||
CC = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
GDB = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gdb
|
||||
|
||||
POCL_CC_PATH=$(wildcard ~/dev/pocl/drops_riscv_cc)
|
||||
POCL_RT_PATH=$(wildcard ~/dev/pocl/drops_riscv_rt)
|
||||
POCL_RT0_PATH=$(wildcard ~/dev/pocl/drops_riscv_rt0)
|
||||
|
||||
VX_RT_PATH=$(wildcard ../../../runtime)
|
||||
VX_SIMX_PATH=$(wildcard ../../../simX/obj_dir)
|
||||
|
||||
CC=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||
CXX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||
DMP=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
HEX=$(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
NEWLIB_PATH=$(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib
|
||||
|
||||
VX_NEWLIB = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_STR = $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_INT = $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_IO = $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_FIO = $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_API = $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
|
||||
VX_SRCS = $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
VX_SRCS = $(VX_RT_PATH)/newlib/newlib.c
|
||||
VX_SRCS += $(VX_RT_PATH)/startup/vx_start.s
|
||||
VX_SRCS += $(VX_RT_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_SRCS += $(VX_RT_PATH)/io/vx_io.s $(VX_RT_PATH)/io/vx_io.c
|
||||
VX_SRCS += $(VX_RT_PATH)/fileio/fileio.s
|
||||
VX_SRCS += $(VX_RT_PATH)/tests/tests.c
|
||||
VX_SRCS += $(VX_RT_PATH)/vx_api/vx_api.c
|
||||
VX_SRCS += $(VX_STR) $(VX_FIO) $(VX_NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST)
|
||||
|
||||
VX_CFLAGS = -nostartfiles -Wl,-Bstatic,-T,$(VX_RT_PATH)/mains/vortex_link.ld
|
||||
|
||||
CXXFLAGS = -g -O0 -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS = -g -O0 -march=rv32im -mabi=ilp32
|
||||
CXXFLAGS += -ffreestanding # program may not begin at main()
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -Wl,--gc-sections # enable garbage collection of unused input sections
|
||||
CXXFLAGS += -fno-rtti -fno-non-call-exceptions # disable RTTI and exceptions
|
||||
CXXFLAGS += -I$(POCL_INC_PATH)
|
||||
|
||||
LIBS = -lOpenCL
|
||||
VX_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/libOpenCL.a
|
||||
QEMU_LIBS = -Wl,--whole-archive lib$(PROJECT).a -Wl,--no-whole-archive $(POCL_LIB_PATH)/qemu/libOpenCL.a
|
||||
|
||||
PROJECT=vecadd
|
||||
|
||||
|
@ -40,10 +39,10 @@ lib$(PROJECT).a: kernel.cl
|
|||
POCL_DEBUG=all POCL_DEBUG_LLVM_PASSES=1 LD_LIBRARY_PATH=$(RISCV_TOOL_PATH)/lib:$(POCL_CC_PATH)/lib $(POCL_CC_PATH)/bin/poclcc -o lib$(PROJECT).a kernel.cl
|
||||
|
||||
$(PROJECT).elf: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) $(VX_CFLAGS) -I$(POCL_RT_PATH)/include -L$(POCL_RT_PATH)/lib/static -L. $(VX_SRCS) main.cc -Wl,--whole-archive -l$(PROJECT) -Wl,--no-whole-archive $(LIBS) -o $(PROJECT).elf
|
||||
$(CXX) $(CXXFLAGS) $(VX_CFLAGS) $(VX_SRCS) main.cc $(VX_LIBS) -o $(PROJECT).elf
|
||||
|
||||
$(PROJECT).qemu: main.cc lib$(PROJECT).a
|
||||
$(CXX) $(CXXFLAGS) -I$(POCL_RT0_PATH)/include -L$(POCL_RT0_PATH)/lib/static -L. main.cc -Wl,--whole-archive -l$(PROJECT) -Wl,--no-whole-archive $(LIBS) -o $(PROJECT).qemu
|
||||
$(CXX) $(CXXFLAGS) main.cc $(QEMU_LIBS) -o $(PROJECT).qemu
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
$(HEX) -O ihex $(PROJECT).elf $(PROJECT).hex
|
||||
|
@ -52,10 +51,16 @@ $(PROJECT).dump: $(PROJECT).elf
|
|||
$(DMP) -D $(PROJECT).elf > $(PROJECT).dump
|
||||
|
||||
run: $(PROJECT).hex
|
||||
$(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
POCL_DEBUG=all $(VX_SIMX_PATH)/Vcache_simX -E -a rv32i --core $(PROJECT).hex -s -b 1> emulator.debug
|
||||
|
||||
qemu: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-s: $(PROJECT).qemu
|
||||
POCL_DEBUG=all $(RISCV_TOOL_PATH)/bin/qemu-riscv32 -g 1234 -d in_asm -D debug.log $(PROJECT).qemu
|
||||
|
||||
gdb-c: $(PROJECT).qemu
|
||||
$(GDB) $(PROJECT).qemu
|
||||
|
||||
clean:
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl
|
||||
rm -rf *.elf *.dump *.hex *.a *.pocl *.qemu
|
|
@ -6,8 +6,8 @@
|
|||
#define MAX_KERNELS 1
|
||||
#define KERNEL_NAME "vecadd"
|
||||
#define KERNEL_FILE_NAME "vecadd.pocl"
|
||||
#define SIZE 64
|
||||
#define NUM_WORK_GROUPS 16
|
||||
#define SIZE 4
|
||||
#define NUM_WORK_GROUPS 2
|
||||
|
||||
#define CL_CHECK(_expr) \
|
||||
do { \
|
||||
|
@ -59,6 +59,8 @@ void cleanup() {
|
|||
}
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
printf("enter demo main\n");
|
||||
|
||||
cl_platform_id platform_id;
|
||||
cl_device_id device_id;
|
||||
size_t binary_size;
|
||||
|
|
|
@ -19,4 +19,5 @@ vx_vec_test:
|
|||
vsw.v v2, (a3) # Store result
|
||||
add a3, a3, t0 # Bump pointer
|
||||
bnez a0, loop # Loop back
|
||||
vmacc.vv v1, v2, v2
|
||||
ret # Finished
|
|
@ -5,7 +5,7 @@ int main()
|
|||
{
|
||||
vx_tmc(1);
|
||||
|
||||
int n = 5;
|
||||
int n = 32;
|
||||
int *a = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
int *b = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
int *c = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,11 +1,11 @@
|
|||
:0200000480007A
|
||||
:100000009705000093854506130540006B10B50069
|
||||
:10001000EF004005130510006B0005001385C108B3
|
||||
:100020001386810C3306A64093050000EF10003CB8
|
||||
:10003000171500001305C5AEEF00102AEF001034AD
|
||||
:08004000EF0090156F00902AFB
|
||||
:100020001386810C3306A64093050000EF10403C78
|
||||
:1000300017150000130505AFEF00502AEF005034EC
|
||||
:08004000EF00D0156F00D02A7B
|
||||
:10004800B70700009387070063880700371500800B
|
||||
:100058001305C5B16F00D027678000001305400065
|
||||
:10005800130505B26F0010286780000013054000E3
|
||||
:100068006B000500972100009381C179F3261002E7
|
||||
:100078009396A601732600029315A6001316260070
|
||||
:1000880037F1FF6F3301B1403301D1403301C10073
|
||||
|
@ -13,448 +13,448 @@
|
|||
:1000A80067800000D772850007E0051233055540C8
|
||||
:1000B80093922200B38555008760061233065600D6
|
||||
:1000C8005781000227E10602B3865600E31E05FCAD
|
||||
:1000D80067800000130101FD232681021304010338
|
||||
:1000E800232EA4FC232CB4FC232AC4FC8327C4FDA0
|
||||
:1000F80083A707002326F4FE930744FD2322F4FE7A
|
||||
:10010800832744FE03C707008327C4FE2380E70034
|
||||
:100118008327C4FE93871700032744FE034717006D
|
||||
:100128002380E7008327C4FE93872700032744FE24
|
||||
:10013800034727002380E7008327C4FE93873700FF
|
||||
:10014800032744FE034737002380E7008327C4FEC4
|
||||
:10015800938747002326F4FE232404FE6F00400300
|
||||
:10016800832784FE032784FDB307F70003C707002E
|
||||
:100178008327C4FE2380E7008327C4FE93871700E4
|
||||
:100188002326F4FE832784FE938717002324F4FE96
|
||||
:10019800832744FD032784FEE344F7FC8327C4FE3A
|
||||
:1001A8002320F4FE832704FE93F73700032704FE79
|
||||
:1001B800B307F7002320F4FE832704FE2326F4FE6A
|
||||
:1001C8008327C4FD0327C4FE23A0E7001300000013
|
||||
:1001D8000324C1021301010367800000130101FC1D
|
||||
:1001E800232E8102130401042326A4FC2324B4FC37
|
||||
:1001F8008327C4FC83A707002326F4FE9307C4FDC6
|
||||
:100208002322F4FE8327C4FE03C70700832744FE86
|
||||
:100218002380E700832744FE938717000327C4FE43
|
||||
:10022800034717002380E700832744FE93872700AE
|
||||
:100238000327C4FE034727002380E700832744FEE3
|
||||
:10024800938737000327C4FE034737002380E7005E
|
||||
:100258008327C4FE938747002326F4FE232404FE45
|
||||
:100268006F004003832784FE032784FCB307F7004D
|
||||
:100278000327C4FE034707002380E7008327C4FE43
|
||||
:10028800938717002326F4FE832784FE938717009D
|
||||
:100298002324F4FE8327C4FD032784FEE344F7FCEC
|
||||
:1002A8008327C4FE2320F4FE832704FE93F7370038
|
||||
:1002B800032704FEB307F7002320F4FE832704FE78
|
||||
:1002C8002326F4FE8327C4FC0327C4FE23A0E700EB
|
||||
:1002D800130000000324C103130101046780000018
|
||||
:1002E800130101FF232681001304010113000000FC
|
||||
:1002F8000324C1001301010167800000130101FEFE
|
||||
:10030800232E8100130401022326A4FE2324B4FE15
|
||||
:10031800832784FE3727000023A2E7009307000005
|
||||
:10032800138507000324C10113010102678000003F
|
||||
:10033800130101FE232E1100232C81001304010256
|
||||
:100348002326A4FEB72700801385C7B2EF00C04F4D
|
||||
:1003580093071000138507008320C101032481013E
|
||||
:100368001301010267800000130101FD2326110219
|
||||
:100378002324810213040103232EA4FC232CB4FCA0
|
||||
:10038800232AC4FCB70700712326F4FEB7070072BE
|
||||
:100398002324F4FE930730002322F4FE130744FEBF
|
||||
:1003A8009307C4FE13064000930507001385070052
|
||||
:1003B800EFF05FD21307C4FD9307C4FE1306400095
|
||||
:1003C8009305070013850700EFF0DFD0130784FDBE
|
||||
:1003D8009307C4FE13064000930507001385070022
|
||||
:1003E800EFF05FCF130744FD9307C4FE13064000E8
|
||||
:1003F8009305070013850700EFF0DFCD83A74107BA
|
||||
:10040800E7800700130704FE930784FE930507009F
|
||||
:1004180013850700EFF09FDC832704FE1385070090
|
||||
:100428008320C102032481021301010367800000B5
|
||||
:10043800130101FD23261102232481021304010361
|
||||
:10044800232EA4FC232CB4FC232AC4FCB707007178
|
||||
:100458002324F4FEB70700722326F4FE9307400016
|
||||
:100468002322F4FE130744FE930784FE130640007C
|
||||
:100478009305070013850700EFF0DFC51307C4FDD8
|
||||
:10048800930784FE130640009305070013850700B1
|
||||
:10049800EFF05FC4130784FD930784FE1306400042
|
||||
:1004A8009305070013850700EFF0DFC2130744FD2B
|
||||
:1004B800930784FE13064000930507001385070081
|
||||
:1004C800EFF05FC183A74107E7800700832744FD5A
|
||||
:1004D800138507008320C10203248102130101034D
|
||||
:1004E80067800000130101FD2326110223248102E5
|
||||
:1004F80013040103232EA4FC232CB4FC232AC4FCDC
|
||||
:10050800B70700712326F4FE930750002324F4FE56
|
||||
:10051800130784FE9307C4FE1306400093050700E3
|
||||
:1005280013850700EFF01FBB1307C4FD9307C4FE34
|
||||
:10053800130640009305070013850700EFF09FB9E5
|
||||
:100548009307C4FE032644FD832584FD1385070015
|
||||
:10055800EFF05FB883A74107E7800700832744FDD2
|
||||
:10056800138507008320C1020324810213010103BC
|
||||
:1005780067800000130101FD232681021304010393
|
||||
:10058800232EA4FC8327C4FD63D807008327C4FD5A
|
||||
:10059800B307F040232EF4FC0327C4FDB73700004F
|
||||
:1005A8009387078063D8E700B737000093870780F1
|
||||
:1005B800232EF4FC83A781072326F4FE03A78107D3
|
||||
:1005C8008327C4FD3307F70023ACE1068327C4FE65
|
||||
:1005D800138507000324C10213010103678000008B
|
||||
:1005E800130101FE232E1100232C810013040102A4
|
||||
:1005F8002326A4FE13050000EF00001E13000000D0
|
||||
:100608008320C101032481011301010267800000D6
|
||||
:10061800130101FD2326110223248102130401037F
|
||||
:10062800232EA4FC232CB4FC232AC4FCB707007196
|
||||
:100638002326F4FEB70700722324F4FE9307700004
|
||||
:100648002322F4FE130744FE9307C4FE130640005A
|
||||
:100658009305070013850700EFF0DFA71307C4FD14
|
||||
:100668009307C4FE1306400093050700138507008F
|
||||
:10067800EFF05FA6130784FD9307C4FE130640003E
|
||||
:100688009305070013850700EFF0DFA4130744FD67
|
||||
:100698009307C4FE1306400093050700138507005F
|
||||
:1006A800EFF05FA383A74107E7800700130704FE65
|
||||
:1006B800930784FE9305070013850700EFF01FB228
|
||||
:1006C800832704FE138507008320C10203248102C7
|
||||
:1006D8001301010367800000130101FF23261100A5
|
||||
:1006E8002324810013040101B7270080138507B470
|
||||
:1006F800EF008015130000008320C100032481004F
|
||||
:100708001301010167800000130101FF2326110076
|
||||
:100718002324810013040101EF00800E93070500D4
|
||||
:10072800138507008320C100032481001301010100
|
||||
:1007380067800000130101FF232611002324810094
|
||||
:1007480013040101B7270080138547B6EF00C00FD7
|
||||
:10075800130000008320C10003248100130101015C
|
||||
:1007680067800000130101FF232611002324810064
|
||||
:1007780013040101B7270080138587B8EF00C00C68
|
||||
:1007880083A781099386170023ACD1081385070036
|
||||
:100798008320C10003248100130101016780000048
|
||||
:1007A800130101FF232611002324810013040101F2
|
||||
:1007B800B7270080138547BBEF000009130000002E
|
||||
:1007C8008320C10003248100130101016780000018
|
||||
:1007D8006B10B500678000006B00050067800000A3
|
||||
:1007E8006B40B500678000006B2005006780000043
|
||||
:1007F8006B300000678000007325100267800000DE
|
||||
:100808007325000267800000130540006B00050097
|
||||
:10081800F32610029396F600732600029315A6009D
|
||||
:100828001316260037F1FF6F3301B1403301D14071
|
||||
:100838003301C100F3261002638606001305000089
|
||||
:100848006B00050067800000130141FF23201100A1
|
||||
:100858002322B1008345050063880500EF00C0012D
|
||||
:10086800130515006FF01FFF832001008325410049
|
||||
:100878001301C10067800000B702010023A0B20085
|
||||
:1008880067800000130101FD232611022324810241
|
||||
:1008980013040103232EA4FC0327C4FD9307F000CF
|
||||
:1008A80063E4E702B72700800327C4FD1317270076
|
||||
:1008B80093878700B307F70083A70700138507000E
|
||||
:1008C800EFF09FF86F004007930700022326F4FE1D
|
||||
:1008D800A30504FE8327C4FE9387C7FF0327C4FD2F
|
||||
:1008E800B357F70093F7F7002322F4FE832744FE5B
|
||||
:1008F8006386070093071000A305F4FE8347B4FE40
|
||||
:1009080063820702B7270080032744FE13172700D6
|
||||
:1009180093878700B307F70083A7070013850700AD
|
||||
:10092800EFF09FF28327C4FE9387C7FF2326F4FEC8
|
||||
:100938008327C4FEE340F0FA8320C1020324810226
|
||||
:100948001301010367800000130101FE232E11002B
|
||||
:10095800232C8100130401022326A4FE2324B4FEC1
|
||||
:100968000325C4FEEFF05FEE032584FEEFF09FF150
|
||||
:10097800B7270080138587C1EFF01FED1300000033
|
||||
:100988008320C10103248101130101026780000053
|
||||
:10099800130101FD232611022324810213040103FC
|
||||
:1009A80013051000EFF05FE3930750002322F4FED5
|
||||
:1009B800832744FE9397270013850700EF004025FF
|
||||
:1009C800930705002320F4FE832744FE939727000E
|
||||
:1009D80013850700EF00C02393070500232EF4FCBE
|
||||
:1009E800832744FE9397270013850700EF004022D2
|
||||
:1009F80093070500232CF4FC232604FE6F008005D2
|
||||
:100A08008327C4FE93972700032704FEB307F70044
|
||||
:100A18001307100023A0E7008327C4FE939727003D
|
||||
:100A28000327C4FDB307F7001307100023A0E7004E
|
||||
:100A38008327C4FE93972700032784FDB307F70095
|
||||
:100A48001307100023A0E7008327C4FE938717002D
|
||||
:100A58002326F4FE0327C4FE832744FEE342F7FA65
|
||||
:100A6800832684FD0326C4FD832504FE032544FE56
|
||||
:100A7800EFF04FE3232404FE6F00C002832784FEB7
|
||||
:100A880093972700032784FDB307F70083A7070080
|
||||
:100A980013850700EFF01FDF832784FE9387170075
|
||||
:100AA8002324F4FE032784FE832744FEE348F7FC4F
|
||||
:100AB80013050000EFF05FD2130000001385070054
|
||||
:100AC8008320C1020324810213010103678000000F
|
||||
:100AD80093050500930600001306000013050000A7
|
||||
:100AE8006F005024130101FF9305000023248100A7
|
||||
:100AF8002326110013040500EF00502C03A501075D
|
||||
:100B08008327C50363840700E780070013050400F3
|
||||
:100B1800EFF01FAD130101FF232481002322910070
|
||||
:100B280037240080B72400809387440013044400CE
|
||||
:100B38003304F440232611001354244063020402B2
|
||||
:100B4800931424009384C4FFB384F40083A704009F
|
||||
:100B58001304F4FF9384C4FFE7800700E31804FE3E
|
||||
:100B68008320C10003248100832441001301010173
|
||||
:100B780067800000130101FF232481002320210145
|
||||
:100B880037240080372900809307040013090900DF
|
||||
:100B98003309F940232611002322910013592940D3
|
||||
:100BA800630009021304040093040000832704006F
|
||||
:100BB8009384140013044400E7800700E31899FEA7
|
||||
:100BC800372400803729008093070400130949005F
|
||||
:100BD8003309F9401359294063000902130404003A
|
||||
:100BE8009304000083270400938414001304440032
|
||||
:100BF800E7800700E31899FE8320C10003248100E1
|
||||
:100C080083244100032901001301010167800000CA
|
||||
:100C18009305050003A501086F0000019305050071
|
||||
:100C280003A501086F00103D130101FD2322910265
|
||||
:100C3800232E31012326110223248102232021039C
|
||||
:100C4800232C4101232A5101232861012326710104
|
||||
:100C580023248101232291019384B5009307600125
|
||||
:100C68009309050063E497069307000163ECB72036
|
||||
:100C7800EF0010059304000193078001130620007C
|
||||
:100C8800138981C6B307F90003A44700138787FFB8
|
||||
:100C98006302E424832744008326C40003268400D7
|
||||
:100CA80093F7C7FFB307F40003A747002326D6002E
|
||||
:100CB80023A4C600136717001385090023A2E700C1
|
||||
:100CC800EF005000130584006F00801C93F484FF2C
|
||||
:100CD80063CA041A63E8B41AEF00807E9307701F92
|
||||
:100CE80063F8974693D79400638E071C1307400058
|
||||
:100CF800636CF73E93D764001386970313858703C5
|
||||
:100D080093163600138981C6B306D90003A446009A
|
||||
:100D1800938686FF638C8602832744009305F00040
|
||||
:100D280093F7C7FF3387974063C0E50263580734DA
|
||||
:100D38000324C400638C86008327440093F7C7FF0D
|
||||
:100D480033879740E3D4E5FE130605000324090121
|
||||
:100D580013088900630C0419832544001307F00065
|
||||
:100D680093F5C5FFB3879540634AF740232A0901E5
|
||||
:100D78002328090163D4073E9307F01F63E6B730C1
|
||||
:100D880093D53500938715009397370003254900BD
|
||||
:100D9800B307F90083A6070093D525401307100071
|
||||
:100DA8003317B7003367A700938587FF2326B4005E
|
||||
:100DB8002324D4002322E90023A0870023A6860049
|
||||
:100DC8009357264093061000B396F600636AD7122D
|
||||
:100DD800B3F7E60063940702939616001376C6FFEE
|
||||
:100DE800B3F7E60013064600639A070093961600C9
|
||||
:100DF800B3F7E60013064600E38A07FE1305F00082
|
||||
:100E080093183600B30819019385080013030600E8
|
||||
:100E180003A4C500639A85006F00402F6352073012
|
||||
:100E28000324C4006384852E8327440093F7C7FFF7
|
||||
:100E380033879740E354E5FE8326C40003268400E5
|
||||
:100E480093E514002322B4002326D60023A4C60069
|
||||
:100E5800B3049400232A9900232899009366170065
|
||||
:100E680023A6040123A4040123A2D400B307F40099
|
||||
:100E78001385090023A0E700EF00C0641305840070
|
||||
:100E88006F0000019307C00023A0F90013050000BC
|
||||
:100E98008320C10203248102832441020329010221
|
||||
:100EA8008329C101032A8101832A4101032B0101FE
|
||||
:100EB800832BC100032C8100832C41001301010303
|
||||
:100EC8006780000093060020130600041305F00352
|
||||
:100ED8006FF05FE303A4C70013062600E39C87DADC
|
||||
:100EE8000324090113088900E31804E703274900CC
|
||||
:100EF8009357264093061000B396F600E37AD7EC92
|
||||
:100F080003248900832A440013FCCAFF63689C00F9
|
||||
:100F1800B3079C401307F000634EF71283AA4109F8
|
||||
:100F280003A741089307F0FF330A8401B38A5401E9
|
||||
:100F38006308F732B71700009387F700B38AFA00FF
|
||||
:100F4800B7F7FFFFB3FAFA0093850A001385090083
|
||||
:100F5800EF0080579307F0FF130B0500630AF5268F
|
||||
:100F680063664527938BC10983A70B00B387FA00F3
|
||||
:100F780023A0FB00138707006306AA3883A641084D
|
||||
:100F88009307F0FF638EF638330A4B413307EA00C4
|
||||
:100F980023A0EB00937C7B0063860C2E330B9B41D4
|
||||
:100FA800B7170000130B8B00138AF7FFB30A5B0116
|
||||
:100FB8009387870033F74A01B3879741B387E740A0
|
||||
:100FC80033FA470193050A0013850900EF00C04F63
|
||||
:100FD8009307F0FF6300F53A33056541B30A45010D
|
||||
:100FE80083A70B002324690193EA1A00B307FA00C8
|
||||
:100FF80023A0FB0023225B01630824331306F000BF
|
||||
:10100800637886338326440013074CFF137787FFE2
|
||||
:1010180093F61600B3E6E6002322D40093055000A9
|
||||
:10102800B306E40023A2B60023A4B600636EE63438
|
||||
:10103800832A4B0013040B0083A6010963F4F6000E
|
||||
:1010480023A8F10883A6C10863F8F61823A6F108B7
|
||||
:101058006F00801813E714002322E400B3049400FF
|
||||
:101068002324990093E717001385090023A2F400AD
|
||||
:10107800EF004045130584006FF09FE18326C4000C
|
||||
:10108800032684006FF01FC293D795001307400012
|
||||
:101098006374F712130740016360F7229386C7054C
|
||||
:1010A8001387B70593963600B306D90083A70600C1
|
||||
:1010B800938686FF638AF61A03A747001377C7FF4C
|
||||
:1010C80063F6E50083A78700E398F6FE83A6C700CA
|
||||
:1010D800032749002326D4002324F40023A48600F0
|
||||
:1010E80023A687006FF0DFCD130740016378F71060
|
||||
:1010F800130740056360F71E93D7C4001386F706ED
|
||||
:101108001385E706931636006FF0DFBF130313004D
|
||||
:101118009377330093858500E39C07CE6F00C00F5B
|
||||
:10112800B307F40003A747008326C40003268400FE
|
||||
:101138001367170023A2E7002326D60013850900AA
|
||||
:1011480023A4C600EF000038130584006FF05FD4B5
|
||||
:1011580013D63400938784006FF09FB2B305B400B0
|
||||
:1011680083A745001385090093E7170023A2F5001C
|
||||
:10117800EF004035130584006FF09FD113E714008A
|
||||
:101188002322E400B3049400232A99002328990019
|
||||
:1011980013E7170023A6040123A4040123A2E400F3
|
||||
:1011A800B305B4001385090023A0F500EF008031D2
|
||||
:1011B800130584006FF0DFCD93D7650093869703FE
|
||||
:1011C80013878703939636006FF01FEE630224138C
|
||||
:1011D80003248900832A440093FACAFFB3879A40FC
|
||||
:1011E80063E69A001307F000E346F7E61385090063
|
||||
:1011F800EF00402D130500006FF09FC91386C70547
|
||||
:101208001385B705931636006FF0DFAF83A7880004
|
||||
:101218001306F6FF6394171D93773600938888FFAB
|
||||
:10122800E39607FE0327490093C7F6FFB3F7E700E5
|
||||
:101238002322F90093961600E3E4D7CCE38206CC88
|
||||
:1012480033F7F600631A07009396160033F7F60093
|
||||
:1012580013034300E30A07FE130603006FF05FBAA7
|
||||
:10126800938A0A016FF05FCE032549009355274002
|
||||
:10127800130710003317B7003367A7002322E900CC
|
||||
:101288006FF05FE5B71700001387F7FF330A5B01BC
|
||||
:10129800337AEA00B387474133FAE70093050A0037
|
||||
:1012A80013850900EF0040229307F0FFE316F5D2FB
|
||||
:1012B800130A00006FF0DFD2130740056360F708D8
|
||||
:1012C80093D7C5009386F7061387E70693963600EB
|
||||
:1012D8006FF09FDD130740156360F70893D7F4009C
|
||||
:1012E8001386870713857707931636006FF09FA13B
|
||||
:1012F800938BC10903A70B003387EA0023A0EB00F7
|
||||
:101308006FF0DFC793164A01E39A06C603248900E3
|
||||
:10131800B30A5C0193EA1A00232254016FF0DFD16B
|
||||
:1013280023A261096FF01FC713040B006FF0DFD011
|
||||
:10133800930710002322FB006FF05FEB13074015A3
|
||||
:101348006362F70693D7F5009386870713877707B5
|
||||
:10135800939636006FF05FD5130740556362F70622
|
||||
:1013680093D724011386D7071385C707931636002A
|
||||
:101378006FF05F99938C8CFFB38A9A01B38A6A41A4
|
||||
:10138800130A00006FF0DFC5930584001385090078
|
||||
:10139800EF0040460324890083A70B00832A4400FA
|
||||
:1013A8006FF09FC9130740556364F70293D725016F
|
||||
:1013B8009386D7071387C707939636006FF0DFCE5B
|
||||
:1013C8009306803F1306F0071305E0076FF09F931D
|
||||
:1013D8009306803F1307E0076FF01FCD832749006E
|
||||
:1013E8006FF05FE51303F00013070500637EC30287
|
||||
:1013F8009377F7006390070A63920508937606FFD0
|
||||
:101408001376F600B386E6002320B7002322B70040
|
||||
:101418002324B7002326B70013070701E366D7FE86
|
||||
:101428006314060067800000B306C3409396260045
|
||||
:1014380097020000B38656006780C6002307B700EE
|
||||
:10144800A306B7002306B700A305B7002305B70016
|
||||
:10145800A304B7002304B700A303B7002303B7000E
|
||||
:10146800A302B7002302B700A301B7002301B70006
|
||||
:10147800A300B7002300B7006780000093F5F50FBD
|
||||
:1014880093968500B3E5D50093960501B3E5D5009D
|
||||
:101498006FF0DFF69396270097020000B386560098
|
||||
:1014A80093820000E78006FA93800200938707FF83
|
||||
:1014B8003307F7403306F600E378C3F66FF0DFF33F
|
||||
:1014C8006780000067800000130101FF232481006A
|
||||
:1014D800232291009304050013850500232611009B
|
||||
:1014E80023A2010CEFF00F899307F0FF630CF500BE
|
||||
:1014F8008320C100032481008324410013010101DA
|
||||
:101508006780000083A7410CE38407FE8320C100A5
|
||||
:101518000324810023A0F400832441001301010166
|
||||
:101528006780000003A7010783278714638C0704DB
|
||||
:1015380003A747001308F001634EE80613182700B5
|
||||
:1015480063060502338307012324C30883A8871889
|
||||
:10155800130610003316E600B3E8C80023A41719D1
|
||||
:101568002324D310930620006304D5021307170021
|
||||
:1015780023A2E700B387070123A4B70013050000DF
|
||||
:10158800678000009307C7142324F7146FF05FFAED
|
||||
:1015980083A6C7181307170023A2E70033E6C6007F
|
||||
:1015A80023A6C718B387070123A4B70013050000B3
|
||||
:1015B800678000001305F0FF67800000130101FD3C
|
||||
:1015C8002324810103AC0107232E3101232C41017F
|
||||
:1015D800232A510123286101232611022324810291
|
||||
:1015E800232291022320210323267101930A050057
|
||||
:1015F800138B0500130A10009309F0FF03298C14BC
|
||||
:1016080063080902832449001384F4FF6342040237
|
||||
:1016180093942400B304990063040B0483A7441033
|
||||
:10162800638067051304F4FF9384C4FFE31634FF53
|
||||
:101638008320C10203248102832441020329010279
|
||||
:101648008329C101032A8101832A4101032B010156
|
||||
:10165800832BC100032C8100130101036780000064
|
||||
:101668008327490083A644009387F7FF638A87048A
|
||||
:1016780023A20400E38806FA8327891833178A000F
|
||||
:10168800832B4900B377F700639E0700E7800600C5
|
||||
:1016980083274900E39477F783278C14E38427F999
|
||||
:1016A8006FF0DFF58327C91883A544083377F7005F
|
||||
:1016B800631C070013850A00E78006006FF05FFDD2
|
||||
:1016C800232289006FF01FFB13850500E7800600C1
|
||||
:1016D8006FF01FFC130101FE23282101232C810038
|
||||
:1016E800232A91002326310113840500232E11009B
|
||||
:1016F80093090500138981C6EFF09FDC83268900D2
|
||||
:10170800371700009307F7FE83A446003384874009
|
||||
:1017180093F4C4FF330494001354C4001304F4FF77
|
||||
:101728001314C400634EE4009305000013850900F8
|
||||
:10173800EFF09FD983278900B38797006306F502E6
|
||||
:1017480013850900EFF01FD88320C101032481010C
|
||||
:1017580083244101032901018329C10013050000E5
|
||||
:101768001301010267800000B3058040138509005A
|
||||
:10177800EFF09FD59307F0FF6304F50483A7C10931
|
||||
:1017880083268900B384844093E41400338487401B
|
||||
:101798001385090023A2960023AE8108EFF09FD29B
|
||||
:1017A8008320C1010324810183244101032901010C
|
||||
:1017B8008329C1001305100013010102678000008E
|
||||
:1017C8009305000013850900EFF01FD00327890057
|
||||
:1017D8009306F000B307E540E3D4F6F683A6410884
|
||||
:1017E80093E717002322F7003305D54023AEA1085D
|
||||
:1017F8006FF01FF563860512130101FF2324810092
|
||||
:101808002322910013840500930405002326110068
|
||||
:10181800EFF01FCB0325C4FF130784FF9377E5FF81
|
||||
:101828003306F700938581C68326460003A8850002
|
||||
:1018380093F6C6FF630EC8182322D6001375150049
|
||||
:101848003308D6006310050A032384FF03284800E1
|
||||
:101858003307674083288700138501C7B38767006C
|
||||
:10186800137818006380A8140323C70023A6680010
|
||||
:10187800232413016306081C93E617002322D700CC
|
||||
:101888002320F6009306F01F63E8F60A93D7370083
|
||||
:10189800938617009396360003A84500B386D500B3
|
||||
:1018A80003A5060013D6274093071000B397C70077
|
||||
:1018B800B3E70701138686FF2326C7002324A70062
|
||||
:1018C80023A2F50023A0E6002326E50003248100D7
|
||||
:1018D8008320C10013850400832441001301010102
|
||||
:1018E8006FF05FBE0325480013751500631C0502E1
|
||||
:1018F800B387D700138501C78326860093E81700AE
|
||||
:101908003308F700638AA6140326C60023A6C60078
|
||||
:101918002324D600232217012320F8006FF09FF616
|
||||
:101928006780000093E61700232ED4FE2320F600DC
|
||||
:101938009306F01FE3FCF6F493D6970013064000D5
|
||||
:10194800636ED60C93D667001385960313868603B9
|
||||
:10195800131535003385A50083260500130585FF7B
|
||||
:10196800630AD51003A646001376C6FF63F6C700C0
|
||||
:1019780083A68600E318D5FE03A5C6002326A70084
|
||||
:101988002324D700032481002324E5008320C100F9
|
||||
:10199800138504008324410023A6E60013010101F6
|
||||
:1019A8006FF05FB263180812832586000326C6000D
|
||||
:1019B800B387F60093E6170023A6C5002324B600D4
|
||||
:1019C8002322D7003307F7002320F7006FF01FF01A
|
||||
:1019D80013751500B387D70063100502032584FF2C
|
||||
:1019E8003307A7408326C70003268700B387A700CD
|
||||
:1019F8002326D60023A4C60013E6170083A6810871
|
||||
:101A08002322C70023A4E500E3E2D7EC83A541091C
|
||||
:101A180013850400EFF01FCC6FF05FEB1306400155
|
||||
:101A28006374D602130640056364D60693D6C700CE
|
||||
:101A38001385F6061386E606131535006FF09FF139
|
||||
:101A4800B387D7006FF05FEB1385C6051386B6051D
|
||||
:101A5800131535006FF01FF023AAE50023A8E50051
|
||||
:101A68002326A7002324A700232217012320F800F8
|
||||
:101A78006FF0DFE503A845001356264093071000D2
|
||||
:101A88003396C7003366060123A2C5006FF01FEF27
|
||||
:101A980013064015636CD60093D6F70013858607A6
|
||||
:101AA80013867607131535006FF0DFEA13064055E5
|
||||
:101AB800636CD60093D627011385D6071386C6070D
|
||||
:101AC800131535006FF01FE91305803F1306E00773
|
||||
:101AD8006FF05FE893E617002322D7002320F60073
|
||||
:041AE8006FF0DFDEDE
|
||||
:101AEC003000000031000000320000003300000024
|
||||
:101AFC003400000035000000360000003700000004
|
||||
:101B0C003800000039000000610000006200000095
|
||||
:101B1C006300000064000000650000006600000027
|
||||
:101B2C0048656C6C6F2066726F6D205F69736174B1
|
||||
:101B3C0074790A004552524F523A205F6B696C6CB3
|
||||
:101B4C00206E6F742079657420696D706C656D659D
|
||||
:101B5C006E7465640A0000004552524F523A205F81
|
||||
:101B6C00756E6C696E6B206E6F742079657420696C
|
||||
:101B7C006D706C656D656E7465640A004552524FEC
|
||||
:101B8C00523A205F67657474696D656F666461793C
|
||||
:101B9C00206E6F742079657420696D706C656D654D
|
||||
:101BAC006E7465640A0000004552524F523A205F31
|
||||
:101BBC006C696E6B206E6F742079657420696D7022
|
||||
:101BCC006C656D656E7465640A0000003000000081
|
||||
:101BDC00310000003200000033000000340000002F
|
||||
:101BEC00350000003600000037000000380000000F
|
||||
:101BFC00390000006100000062000000630000007A
|
||||
:0E1C0C006400000065000000660000000A0091
|
||||
:1000D800D72021B667800000130101FD2326810285
|
||||
:1000E80013040103232EA4FC232CB4FC232AC4FCF0
|
||||
:1000F8008327C4FD83A707002326F4FE930744FD46
|
||||
:100108002322F4FE832744FE03C707008327C4FE87
|
||||
:100118002380E7008327C4FE93871700032744FE44
|
||||
:10012800034717002380E7008327C4FE938727002F
|
||||
:10013800032744FE034727002380E7008327C4FEE4
|
||||
:1001480093873700032744FE034737002380E700DF
|
||||
:100158008327C4FE938747002326F4FE232404FE46
|
||||
:100168006F004003832784FE032784FDB307F7004D
|
||||
:1001780003C707008327C4FE2380E7008327C4FE44
|
||||
:10018800938717002326F4FE832784FE938717009E
|
||||
:100198002324F4FE832744FD032784FEE344F7FC6D
|
||||
:1001A8008327C4FE2320F4FE832704FE93F7370039
|
||||
:1001B800032704FEB307F7002320F4FE832704FE79
|
||||
:1001C8002326F4FE8327C4FD0327C4FE23A0E700EB
|
||||
:1001D800130000000324C10213010103678000001B
|
||||
:1001E800130101FC232E8102130401042326A4FC1D
|
||||
:1001F8002324B4FC8327C4FC83A707002326F4FE2A
|
||||
:100208009307C4FD2322F4FE8327C4FE03C7070017
|
||||
:10021800832744FE2380E700832744FE9387170043
|
||||
:100228000327C4FE034717002380E700832744FE03
|
||||
:10023800938727000327C4FE034727002380E7008E
|
||||
:10024800832744FE938737000327C4FE03473700FC
|
||||
:100258002380E7008327C4FE938747002326F4FE04
|
||||
:10026800232404FE6F004003832784FE032784FCB5
|
||||
:10027800B307F7000327C4FE034707002380E700FE
|
||||
:100288008327C4FE938717002326F4FE832784FE62
|
||||
:10029800938717002324F4FE8327C4FD032784FED5
|
||||
:1002A800E344F7FC8327C4FE2320F4FE832704FEDF
|
||||
:1002B80093F73700032704FEB307F7002320F4FE63
|
||||
:1002C800832704FE2326F4FE8327C4FC0327C4FEE9
|
||||
:1002D80023A0E700130000000324C1031301010455
|
||||
:1002E80067800000130101FF232681001304010128
|
||||
:1002F800130000000324C1001301010167800000FE
|
||||
:10030800130101FE232E8100130401022326A4FEFB
|
||||
:100318002324B4FE832784FE3727000023A2E700A6
|
||||
:1003280093070000138507000324C101130101028C
|
||||
:1003380067800000130101FE232E1100232C810089
|
||||
:10034800130401022326A4FEB7270080138507B3F0
|
||||
:10035800EF00C04F93071000138507008320C101E9
|
||||
:10036800032481011301010267800000130101FDCC
|
||||
:10037800232611022324810213040103232EA4FC43
|
||||
:10038800232CB4FC232AC4FCB70700712326F4FEEF
|
||||
:10039800B70700722324F4FE930730002322F4FEEB
|
||||
:1003A800130744FE9307C4FE130640009305070095
|
||||
:1003B80013850700EFF05FD21307C4FD9307C4FE4F
|
||||
:1003C800130640009305070013850700EFF0DFD000
|
||||
:1003D800130784FD9307C4FE130640009305070026
|
||||
:1003E80013850700EFF05FCF130744FD9307C4FEA2
|
||||
:1003F800130640009305070013850700EFF0DFCDD3
|
||||
:1004080083A74107E7800700130704FE930784FECC
|
||||
:100418009305070013850700EFF09FDC832704FE90
|
||||
:10042800138507008320C1020324810213010103FD
|
||||
:1004380067800000130101FD232611022324810295
|
||||
:1004480013040103232EA4FC232CB4FC232AC4FC8C
|
||||
:10045800B70700712324F4FEB70700722326F4FEC1
|
||||
:10046800930740002322F4FE130744FE930784FEFB
|
||||
:10047800130640009305070013850700EFF0DFC55A
|
||||
:100488001307C4FD930784FE130640009305070075
|
||||
:1004980013850700EFF05FC4130784FD930784FEFC
|
||||
:1004A800130640009305070013850700EFF0DFC22D
|
||||
:1004B800130744FD930784FE1306400093050700C5
|
||||
:1004C80013850700EFF05FC183A74107E7800700A6
|
||||
:1004D800832744FD138507008320C102032481027A
|
||||
:1004E8001301010367800000130101FD2326110297
|
||||
:1004F8002324810213040103232EA4FC232CB4FC1F
|
||||
:10050800232AC4FCB70700712326F4FE9307500082
|
||||
:100518002324F4FE130784FE9307C4FE1306400049
|
||||
:100528009305070013850700EFF01FBB1307C4FDF1
|
||||
:100538009307C4FE130640009305070013850700C0
|
||||
:10054800EFF09FB99307C4FE032644FD832584FD7D
|
||||
:1005580013850700EFF05FB883A74107E78007001E
|
||||
:10056800832744FD138507008320C10203248102E9
|
||||
:100578001301010367800000130101FD2326810296
|
||||
:1005880013040103232EA4FC8327C4FD63D80700AA
|
||||
:100598008327C4FDB307F040232EF4FC0327C4FDD2
|
||||
:1005A800B73700009387078063D8E700B7370000A4
|
||||
:1005B80093870780232EF4FC83A781072326F4FE64
|
||||
:1005C80003A781078327C4FD3307F70023ACE1069F
|
||||
:1005D8008327C4FE138507000324C1021301010306
|
||||
:1005E80067800000130101FE232E1100232C8100D7
|
||||
:1005F800130401022326A4FE13050000EF00001EC9
|
||||
:10060800130000008320C1010324810113010102AA
|
||||
:1006180067800000130101FD2326110223248102B3
|
||||
:1006280013040103232EA4FC232CB4FC232AC4FCAA
|
||||
:10063800B70700712326F4FEB70700722324F4FEDF
|
||||
:10064800930770002322F4FE130744FE9307C4FEA9
|
||||
:10065800130640009305070013850700EFF0DFA796
|
||||
:100668001307C4FD9307C4FE130640009305070053
|
||||
:1006780013850700EFF05FA6130784FD9307C4FEF8
|
||||
:10068800130640009305070013850700EFF0DFA469
|
||||
:10069800130744FD9307C4FE1306400093050700A3
|
||||
:1006A80013850700EFF05FA383A74107E7800700E2
|
||||
:1006B800130704FE930784FE9305070013850700BC
|
||||
:1006C800EFF01FB2832704FE138507008320C102C1
|
||||
:1006D800032481021301010367800000130101FF55
|
||||
:1006E800232611002324810013040101B727008069
|
||||
:1006F800138547B4EF008015130000008320C10064
|
||||
:10070800032481001301010167800000130101FF28
|
||||
:10071800232611002324810013040101EF00800E19
|
||||
:1007280093070500138507008320C1000324810077
|
||||
:100738001301010167800000130101FF2326110046
|
||||
:100748002324810013040101B7270080138587B68D
|
||||
:10075800EF00C00F130000008320C10003248100B4
|
||||
:100768001301010167800000130101FF2326110016
|
||||
:100778002324810013040101B72700801385C7B81B
|
||||
:10078800EF00C00C83A781099386170023ACD1081A
|
||||
:10079800138507008320C100032481001301010190
|
||||
:1007A80067800000130101FF232611002324810024
|
||||
:1007B80013040101B7270080138587BBEF000009E8
|
||||
:1007C800130000008320C1000324810013010101EC
|
||||
:1007D800678000006B10B500678000006B000500A3
|
||||
:1007E800678000006B40B500678000006B20050043
|
||||
:1007F800678000006B3000006780000073251002DE
|
||||
:100808006780000073250002678000001305400020
|
||||
:100818006B000500F32610029396F600732600027B
|
||||
:100828009315A6001316260037F1FF6F3301B14068
|
||||
:100838003301D1403301C100F3261002638606005C
|
||||
:10084800130500006B00050067800000130141FFDD
|
||||
:10085800232011002322B100834505006388050089
|
||||
:10086800EF00C001130515006FF01FFF8320010082
|
||||
:10087800832541001301C10067800000B702010011
|
||||
:1008880023A0B20067800000130101FD2326110296
|
||||
:100898002324810213040103232EA4FC0327C4FD8F
|
||||
:1008A8009307F00063E4E702B72700800327C4FD3D
|
||||
:1008B8001317270093878700B307F70083A707005C
|
||||
:1008C80013850700EFF09FF86F00400793070002B9
|
||||
:1008D8002326F4FEA30504FE8327C4FE9387C7FFDF
|
||||
:1008E8000327C4FDB357F70093F7F7002322F4FE5C
|
||||
:1008F800832744FE6386070093071000A305F4FED0
|
||||
:100908008347B4FE63820702B7270080032744FEAB
|
||||
:100918001317270093878700B307F70083A70700FB
|
||||
:1009280013850700EFF09FF28327C4FE9387C7FF64
|
||||
:100938002326F4FE8327C4FEE340F0FA8320C10295
|
||||
:10094800032481021301010367800000130101FEE3
|
||||
:10095800232E1100232C8100130401022326A4FE58
|
||||
:100968002324B4FE0325C4FEEFF05FEE032584FEC6
|
||||
:10097800EFF09FF1B72700801385C7C1EFF01FED97
|
||||
:10098800130000008320C101032481011301010227
|
||||
:1009980067800000130101FD232611022324810230
|
||||
:1009A8001304010313051000EFF05FE3930700023F
|
||||
:1009B8002322F4FE832744FE93972700138507001C
|
||||
:1009C800EF004025930705002320F4FE832744FE0B
|
||||
:1009D8009397270013850700EF00C02393070500AE
|
||||
:1009E800232EF4FC832744FE9397270013850700E2
|
||||
:1009F800EF00402293070500232CF4FC232604FE75
|
||||
:100A08006F0080058327C4FE93972700032704FE01
|
||||
:100A1800B307F7001307100023A0E7008327C4FEDD
|
||||
:100A2800939727000327C4FDB307F70013071000A7
|
||||
:100A380023A0E7008327C4FE93972700032784FD9C
|
||||
:100A4800B307F7001307100023A0E7008327C4FEAD
|
||||
:100A5800938717002326F4FE0327C4FE832744FE4A
|
||||
:100A6800E342F7FA832684FD0326C4FD832504FEAA
|
||||
:100A7800032544FEEFF00FE3232404FE6F00C002B9
|
||||
:100A8800832784FE93972700032784FDB307F70085
|
||||
:100A980083A7070013850700EFF01FDF832784FE75
|
||||
:100AA800938717002324F4FE032784FE832744FE3C
|
||||
:100AB800E348F7FC13050000EFF05FD213000000D5
|
||||
:100AC800138507008320C102032481021301010357
|
||||
:100AD80067800000930505009306000013060000D8
|
||||
:100AE800130500006F005024130101FF9305000057
|
||||
:100AF800232481002326110013040500EF00502C45
|
||||
:100B080003A501078327C50363840700E78007005F
|
||||
:100B180013050400EFF01FAD130101FF232481002A
|
||||
:100B28002322910037240080B72400809387440053
|
||||
:100B3800130444003304F4402326110013542440C2
|
||||
:100B480063020402931424009384C4FFB384F40062
|
||||
:100B580083A704001304F4FF9384C4FFE78007000D
|
||||
:100B6800E31804FE8320C10003248100832441008C
|
||||
:100B78001301010167800000130101FF2324810094
|
||||
:100B8800232021013724008037290080930704009F
|
||||
:100B9800130909003309F940232611002322910083
|
||||
:100BA8001359294063000902130404009304000048
|
||||
:100BB800832704009384140013044400E78007008B
|
||||
:100BC800E31899FE37240080372900809307040032
|
||||
:100BD800130949003309F9401359294063000902F0
|
||||
:100BE8001304040093040000832704009384140072
|
||||
:100BF80013044400E7800700E31899FE8320C1002E
|
||||
:100C08000324810083244100032901001301010109
|
||||
:100C1800678000009305050003A501086F00000127
|
||||
:100C28009305050003A501086F00103D130101FDA0
|
||||
:100C380023229102232E310123261102232481022B
|
||||
:100C480023202103232C4101232A51012328610158
|
||||
:100C58002326710123248101232291019384B50065
|
||||
:100C6800930760019309050063E497069307000161
|
||||
:100C780063ECB720EF00100593040001930780018F
|
||||
:100C880013062000138981C6B307F90003A447009F
|
||||
:100C9800138787FF6302E424832744008326C40064
|
||||
:100CA8000326840093F7C7FFB307F40003A74700A0
|
||||
:100CB8002326D60023A4C60013671700138509004E
|
||||
:100CC80023A2E700EF005000130584006F00801C8A
|
||||
:100CD80093F484FF63CA041A63E8B41AEF00807EB1
|
||||
:100CE8009307701F63F8974693D79400638E071C89
|
||||
:100CF80013074000636CF73E93D76400138697038D
|
||||
:100D08001385870393163600138981C6B306D90065
|
||||
:100D180003A44600938686FF638C860283274400DB
|
||||
:100D28009305F00093F7C7FF3387974063C0E50248
|
||||
:100D3800635807340324C400638C86008327440067
|
||||
:100D480093F7C7FF33879740E3D4E5FE1306050002
|
||||
:100D58000324090113088900630C0419832544003E
|
||||
:100D68001307F00093F5C5FFB3879540634AF74032
|
||||
:100D7800232A09012328090163D4073E9307F01F9A
|
||||
:100D880063E6B73093D535009387150093973700FE
|
||||
:100D980003254900B307F90083A6070093D525402A
|
||||
:100DA800130710003317B7003367A700938587FF31
|
||||
:100DB8002326B4002324D4002322E90023A087009B
|
||||
:100DC80023A686009357264093061000B396F60094
|
||||
:100DD800636AD712B3F7E600639407029396160086
|
||||
:100DE8001376C6FFB3F7E60013064600639A0700BA
|
||||
:100DF80093961600B3F7E60013064600E38A07FE4B
|
||||
:100E08001305F00093183600B308190193850800FC
|
||||
:100E18001303060003A4C500639A85006F00402FE2
|
||||
:100E2800635207300324C4006384852E832744005B
|
||||
:100E380093F7C7FF33879740E354E5FE8326C40042
|
||||
:100E48000326840093E514002322B4002326D60049
|
||||
:100E580023A4C600B3049400232A990023289900E8
|
||||
:100E68009366170023A6040123A4040123A2D40037
|
||||
:100E7800B307F4001385090023A0E700EF00C0645E
|
||||
:100E8800130584006F0000019307C00023A0F90038
|
||||
:100E9800130500008320C102032481028324410238
|
||||
:100EA800032901028329C101032A8101832A4101FF
|
||||
:100EB800032B0101832BC100032C8100832C4100EB
|
||||
:100EC8001301010367800000930600201306000445
|
||||
:100ED8001305F0036FF05FE303A4C70013062600B1
|
||||
:100EE800E39C87DA0324090113088900E31804E75F
|
||||
:100EF800032749009357264093061000B396F6003F
|
||||
:100F0800E37AD7EC03248900832A440013FCCAFF40
|
||||
:100F180063689C00B3079C401307F000634EF71208
|
||||
:100F280083AA410903A741089307F0FF330A840104
|
||||
:100F3800B38A54016308F732B71700009387F700A4
|
||||
:100F4800B38AFA00B7F7FFFFB3FAFA0093850A00ED
|
||||
:100F580013850900EF0080579307F0FF130B050076
|
||||
:100F6800630AF52663664527938BC10983A70B009F
|
||||
:100F7800B387FA0023A0FB00138707006306AA388B
|
||||
:100F880083A641089307F0FF638EF638330A4B4176
|
||||
:100F98003307EA0023A0EB00937C7B0063860C2ECA
|
||||
:100FA800330B9B41B7170000130B8B00138AF7FF15
|
||||
:100FB800B30A5B019387870033F74A01B3879741E8
|
||||
:100FC800B387E74033FA470193050A001385090000
|
||||
:100FD800EF00C04F9307F0FF6300F53A3305654112
|
||||
:100FE800B30A450183A70B002324690193EA1A0079
|
||||
:100FF800B307FA0023A0FB0023225B016308243314
|
||||
:101008001306F000637886338326440013074CFFE9
|
||||
:10101800137787FF93F61600B3E6E6002322D40081
|
||||
:1010280093055000B306E40023A2B60023A4B6003B
|
||||
:10103800636EE634832A4B0013040B0083A6010970
|
||||
:1010480063F4F60023A8F10883A6C10863F8F6182C
|
||||
:1010580023A6F1086F00801813E714002322E40088
|
||||
:10106800B30494002324990093E71700138509001B
|
||||
:1010780023A2F400EF004045130584006FF09FE1C0
|
||||
:101088008326C400032684006FF01FC293D79500FF
|
||||
:10109800130740006374F712130740016360F722D7
|
||||
:1010A8009386C7051387B70593963600B306D9000C
|
||||
:1010B80083A70600938686FF638AF61A03A747006C
|
||||
:1010C8001377C7FF63F6E50083A78700E398F6FE6A
|
||||
:1010D80083A6C700032749002326D4002324F4004D
|
||||
:1010E80023A4860023A687006FF0DFCD13074001F5
|
||||
:1010F8006378F710130740056360F71E93D7C400A1
|
||||
:101108001386F7061385E706931636006FF0DFBFE0
|
||||
:10111800130313009377330093858500E39C07CE70
|
||||
:101128006F00C00FB307F40003A747008326C4006D
|
||||
:10113800032684001367170023A2E7002326D6009E
|
||||
:101148001385090023A4C600EF00003813058400A6
|
||||
:101158006FF05FD413D63400938784006FF09FB28A
|
||||
:10116800B305B40083A745001385090093E717006A
|
||||
:1011780023A2F500EF004035130584006FF09FD1DE
|
||||
:1011880013E714002322E400B3049400232A9900EF
|
||||
:101198002328990013E7170023A6040123A40401B8
|
||||
:1011A80023A2E400B305B4001385090023A0F500C9
|
||||
:1011B800EF008031130584006FF0DFCD93D7650011
|
||||
:1011C8009386970313878703939636006FF01FEE75
|
||||
:1011D8006302241303248900832A440093FACAFF74
|
||||
:1011E800B3879A4063E69A001307F000E346F7E6F0
|
||||
:1011F80013850900EF00402D130500006FF09FC90B
|
||||
:101208001386C7051385B705931636006FF0DFAF51
|
||||
:1012180083A788001306F6FF6394171D937736009B
|
||||
:10122800938888FFE39607FE0327490093C7F6FFD4
|
||||
:10123800B3F7E7002322F90093961600E3E4D7CC2E
|
||||
:10124800E38206CC33F7F600631A0700939616007C
|
||||
:1012580033F7F60013034300E30A07FE13060300FF
|
||||
:101268006FF05FBA938A0A016FF05FCE03254900D9
|
||||
:1012780093552740130710003317B7003367A700AB
|
||||
:101288002322E9006FF05FE5B71700001387F7FF27
|
||||
:10129800330A5B01337AEA00B387474133FAE70040
|
||||
:1012A80093050A0013850900EF0040229307F0FF19
|
||||
:1012B800E316F5D2130A00006FF0DFD213074005DA
|
||||
:1012C8006360F70893D7C5009386F7061387E70688
|
||||
:1012D800939636006FF09FDD130740156360F7089B
|
||||
:1012E80093D7F4001386870713857707931636007C
|
||||
:1012F8006FF09FA1938BC10903A70B003387EA0006
|
||||
:1013080023A0EB006FF0DFC793164A01E39A06C6E5
|
||||
:1013180003248900B30A5C0193EA1A0023225401CA
|
||||
:101328006FF0DFD123A261096FF01FC713040B0010
|
||||
:101338006FF0DFD0930710002322FB006FF05FEB04
|
||||
:10134800130740156362F70693D7F500938687075E
|
||||
:1013580013877707939636006FF05FD513074055CC
|
||||
:101368006362F70693D724011386D7071385C70747
|
||||
:10137800931636006FF05F99938C8CFFB38A9A01AD
|
||||
:10138800B38A6A41130A00006FF0DFC59305840031
|
||||
:1013980013850900EF0040460324890083A70B004A
|
||||
:1013A800832A44006FF09FC9130740556364F7020E
|
||||
:1013B80093D725019386D7071387C70793963600D7
|
||||
:1013C8006FF0DFCE9306803F1306F0071305E007A2
|
||||
:1013D8006FF09F939306803F1307E0076FF01FCDD0
|
||||
:1013E800832749006FF05FE51303F000130705003A
|
||||
:1013F800637EC3029377F7006390070A6392050838
|
||||
:10140800937606FF1376F600B386E6002320B7002E
|
||||
:101418002322B7002324B7002326B70013070701A8
|
||||
:10142800E366D7FE6314060067800000B306C34076
|
||||
:101438009396260097020000B38656006780C60080
|
||||
:101448002307B700A306B7002306B700A305B70014
|
||||
:101458002305B700A304B7002304B700A303B7000C
|
||||
:101468002303B700A302B7002302B700A301B70004
|
||||
:101478002301B700A300B7002300B700678000006E
|
||||
:1014880093F5F50F93968500B3E5D500939605017E
|
||||
:10149800B3E5D5006FF0DFF69396270097020000BA
|
||||
:1014A800B386560093820000E78006FA9380020014
|
||||
:1014B800938707FF3307F7403306F600E378C3F650
|
||||
:1014C8006FF0DFF36780000067800000130101FF01
|
||||
:1014D800232481002322910093040500138505002D
|
||||
:1014E8002326110023A2010CEFF00F899307F0FFC8
|
||||
:1014F800630CF5008320C10003248100832441008C
|
||||
:10150800130101016780000083A7410CE38407FEF3
|
||||
:101518008320C1000324810023A0F4008324410018
|
||||
:10152800130101016780000003A7010783278714BF
|
||||
:10153800638C070403A747001308F001634EE8060D
|
||||
:101548001318270063060502338307012324C30801
|
||||
:1015580083A88718130610003316E600B3E8C800FE
|
||||
:1015680023A417192324D310930620006304D5025B
|
||||
:101578001307170023A2E700B387070123A4B700C6
|
||||
:1015880013050000678000009307C7142324F7148D
|
||||
:101598006FF05FFA83A6C7181307170023A2E700A6
|
||||
:1015A80033E6C60023A6C718B387070123A4B700EC
|
||||
:1015B80013050000678000001305F0FF6780000036
|
||||
:1015C800130101FD2324810103AC0107232E3101FE
|
||||
:1015D800232C4101232A51012328610123261102CA
|
||||
:1015E800232481022322910223202103232671012F
|
||||
:1015F800930A0500138B0500130A10009309F0FFE6
|
||||
:1016080003298C1463080902832449001384F4FF16
|
||||
:101618006342040293942400B304990063040B0406
|
||||
:1016280083A74410638067051304F4FF9384C4FF01
|
||||
:10163800E31634FF8320C10203248102832441027C
|
||||
:10164800032901028329C101032A8101832A410157
|
||||
:10165800032B0101832BC100032C8100130101031B
|
||||
:10166800678000008327490083A644009387F7FF1B
|
||||
:10167800638A870423A20400E38806FA832789186B
|
||||
:1016880033178A00832B4900B377F700639E07005E
|
||||
:10169800E780060083274900E39477F783278C14B3
|
||||
:1016A800E38427F96FF0DFF58327C91883A5440879
|
||||
:1016B8003377F700631C070013850A00E7800600EC
|
||||
:1016C8006FF05FFD232289006FF01FFB1385050073
|
||||
:1016D800E78006006FF01FFC130101FE232821019B
|
||||
:1016E800232C8100232A910023263101138405002D
|
||||
:1016F800232E110093090500138981C6EFF09FDCA2
|
||||
:1017080083268900371700009307F7FE83A4460055
|
||||
:101718003384874093F4C4FF330494001354C40003
|
||||
:101728001304F4FF1314C400634EE400930500008F
|
||||
:1017380013850900EFF09FD983278900B3879700A5
|
||||
:101748006306F50213850900EFF01FD88320C10155
|
||||
:101758000324810183244101032901018329C10054
|
||||
:10176800130500001301010267800000B3058040E3
|
||||
:1017780013850900EFF09FD59307F0FF6304F50484
|
||||
:1017880083A7C10983268900B384844093E41400A5
|
||||
:10179800338487401385090023A2960023AE81086D
|
||||
:1017A800EFF09FD28320C1010324810183244101EA
|
||||
:1017B800032901018329C100130510001301010247
|
||||
:1017C800678000009305000013850900EFF01FD023
|
||||
:1017D800032789009306F000B307E540E3D4F6F643
|
||||
:1017E80083A6410893E717002322F7003305D54065
|
||||
:1017F80023AEA1086FF01FF563860512130101FFE0
|
||||
:1018080023248100232291001384050093040500FA
|
||||
:1018180023261100EFF01FCB0325C4FF130784FF15
|
||||
:101828009377E5FF3306F700938581C68326460044
|
||||
:1018380003A8850093F6C6FF630EC8182322D600B6
|
||||
:10184800137515003308D6006310050A032384FFB7
|
||||
:10185800032848003307674083288700138501C79A
|
||||
:10186800B3876700137818006380A8140323C700A0
|
||||
:1018780023A66800232413016306081C93E61700B7
|
||||
:101888002322D7002320F6009306F01F63E8F60A08
|
||||
:1018980093D73700938617009396360003A8450020
|
||||
:1018A800B386D50003A5060013D62740930710007A
|
||||
:1018B800B397C700B3E70701138686FF2326C7003F
|
||||
:1018C8002324A70023A2F50023A0E6002326E50091
|
||||
:1018D800032481008320C100138504008324410070
|
||||
:1018E800130101016FF05FBE032548001375150051
|
||||
:1018F800631C0502B387D700138501C783268600BA
|
||||
:1019080093E817003308F700638AA6140326C60075
|
||||
:1019180023A6C6002324D600232217012320F8007B
|
||||
:101928006FF09FF66780000093E61700232ED4FE21
|
||||
:101938002320F6009306F01FE3FCF6F493D69700F5
|
||||
:1019480013064000636ED60C93D667001385960382
|
||||
:1019580013868603131535003385A50083260500F5
|
||||
:10196800130585FF630AD51003A646001376C6FF44
|
||||
:1019780063F6C70083A68600E318D5FE03A5C60054
|
||||
:101988002326A7002324D700032481002324E5006D
|
||||
:101998008320C100138504008324410023A6E600A8
|
||||
:1019A800130101016FF05FB26318081283258600E6
|
||||
:1019B8000326C600B387F60093E6170023A6C500E2
|
||||
:1019C8002324B6002322D7003307F7002320F7008B
|
||||
:1019D8006FF01FF013751500B387D7006310050269
|
||||
:1019E800032584FF3307A7408326C7000326870003
|
||||
:1019F800B387A7002326D60023A4C60013E6170042
|
||||
:101A080083A681082322C70023A4E500E3E2D7ECDC
|
||||
:101A180083A5410913850400EFF01FCC6FF05FEB3D
|
||||
:101A2800130640016374D602130640056364D606A4
|
||||
:101A380093D6C7001385F6061386E60613153500F8
|
||||
:101A48006FF09FF1B387D7006FF05FEB1385C60582
|
||||
:101A58001386B605131535006FF01FF023AAE500AD
|
||||
:101A680023A8E5002326A7002324A7002322170183
|
||||
:101A78002320F8006FF0DFE503A845001356264041
|
||||
:101A8800930710003396C7003366060123A2C500EA
|
||||
:101A98006FF01FEF13064015636CD60093D6F7005E
|
||||
:101AA8001385860713867607131535006FF0DFEA6E
|
||||
:101AB80013064055636CD60093D627011385D607C5
|
||||
:101AC8001386C607131535006FF01FE91305803F0D
|
||||
:101AD8001306E0076FF05FE893E617002322D700AC
|
||||
:081AE8002320F6006FF0DFDEA1
|
||||
:101AF0003000000031000000320000003300000020
|
||||
:101B000034000000350000003600000037000000FF
|
||||
:101B10003800000039000000610000006200000091
|
||||
:101B20006300000064000000650000006600000023
|
||||
:101B300048656C6C6F2066726F6D205F69736174AD
|
||||
:101B400074790A004552524F523A205F6B696C6CAF
|
||||
:101B5000206E6F742079657420696D706C656D6599
|
||||
:101B60006E7465640A0000004552524F523A205F7D
|
||||
:101B7000756E6C696E6B206E6F7420796574206968
|
||||
:101B80006D706C656D656E7465640A004552524FE8
|
||||
:101B9000523A205F67657474696D656F6664617938
|
||||
:101BA000206E6F742079657420696D706C656D6549
|
||||
:101BB0006E7465640A0000004552524F523A205F2D
|
||||
:101BC0006C696E6B206E6F742079657420696D701E
|
||||
:101BD0006C656D656E7465640A000000300000007D
|
||||
:101BE000310000003200000033000000340000002B
|
||||
:101BF000350000003600000037000000380000000B
|
||||
:101C00003900000061000000620000006300000075
|
||||
:0E1C10006400000065000000660000000A008D
|
||||
:042000004800008014
|
||||
:10200800D81B0080DC1B0080E01B0080E41B0080E4
|
||||
:10201800E81B0080EC1B0080F01B0080F41B008094
|
||||
:10202800F81B0080FC1B0080001C0080041C008042
|
||||
:10203800081C00800C1C0080101C0080141C0080F0
|
||||
:10200800DC1B0080E01B0080E41B0080E81B0080D4
|
||||
:10201800EC1B0080F01B0080F41B0080F81B008084
|
||||
:10202800FC1B0080001C0080041C0080081C008031
|
||||
:102038000C1C0080101C0080141C0080181C0080E0
|
||||
:1020480000000000342300809C23008004240080CA
|
||||
:102058000000000000000000000000000000000078
|
||||
:102068000000000000000000000000000000000068
|
||||
|
|
41
rvvector/benchmark_temp/Makefile
Normal file
41
rvvector/benchmark_temp/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
|||
LIB_PATH = ../../runtime
|
||||
|
||||
COMP = /nethome/ekim79/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-gcc
|
||||
|
||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,$(LIB_PATH)/mains/vortex_link.ld -march=rv32imv -mabi=ilp32
|
||||
|
||||
DMP = /nethome/ekim79/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objdump
|
||||
CPY = /nethome/ekim79/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
# VX_STR = ../../startup/vx_start.s
|
||||
|
||||
NEWLIB = $(LIB_PATH)/newlib/newlib.c
|
||||
VX_STR = $(LIB_PATH)/startup/vx_start.s
|
||||
VX_INT = $(LIB_PATH)/intrinsics/vx_intrinsics.s
|
||||
VX_IO = $(LIB_PATH)/io/vx_io.s $(LIB_PATH)/io/vx_io.c
|
||||
VX_API = $(LIB_PATH)/vx_api/vx_api.c
|
||||
VX_TEST = $(LIB_PATH)/tests/tests.c
|
||||
VX_FIO = $(LIB_PATH)/fileio/fileio.s
|
||||
VX_VEC1 = vx_vec_vvaddint32.s
|
||||
VX_VEC2 = vx_vec_saxpy.s #float --> int
|
||||
VX_VEC3 = vx_vec_sgemm_float.s #float --> int
|
||||
VX_VEC4 = vx_vec_vsadd.s
|
||||
VX_VEC5 = vx_vec_memcpy.s
|
||||
LIBS = /nethome/ekim79/riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a /nethome/ekim79/riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||
|
||||
VX_MAIN = vx_vec_benchmark
|
||||
|
||||
all: HEX DUMP ELF
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D $(VX_MAIN).elf > $(VX_MAIN).dump
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex $(VX_MAIN).elf $(VX_MAIN).hex
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC1) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
# $(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC2) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
# $(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC3) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
# $(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC4) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf
|
||||
# $(COMP) $(CC_FLAGS) $(VX_STR) $(VX_VEC5) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN).c $(LIBS) -Iinclude -o $(VX_MAIN).elf~
|
9
rvvector/benchmark_temp/TO_DO_LIST
Normal file
9
rvvector/benchmark_temp/TO_DO_LIST
Normal file
|
@ -0,0 +1,9 @@
|
|||
1. add benchmarks under (Vortex/benchmarks/..)
|
||||
1.1 bfs --> blas spmv approach
|
||||
1.2 kmeans // stage 2
|
||||
1.3 saxpy --> sample
|
||||
1.4 sfilter // stage 2
|
||||
1.5 sgemm --> sample modify (float --> int)
|
||||
1.6 vecadd --> sample
|
||||
|
||||
|
156
rvvector/benchmark_temp/vx_vec_benchmark.c
Normal file
156
rvvector/benchmark_temp/vx_vec_benchmark.c
Normal file
|
@ -0,0 +1,156 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "../../runtime/intrinsics/vx_intrinsics.h"
|
||||
#include "vx_vec_benchmark.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
vx_tmc(1);
|
||||
int n = 5;
|
||||
int *a = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
int *b = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
int *c = (int*)malloc(sizeof(int) * n); //{1, 1, 1, 1, 1};
|
||||
|
||||
for (int i = 0; i < n; ++i) { a[i] = 1; b[i] = 2; c[i] = 5; }
|
||||
|
||||
#if 1
|
||||
//---------------------------------------------------------------
|
||||
/* vvaddint32
|
||||
* # vector-vector add routine of 32-bit integers
|
||||
* # void vvaddint32(size_t n, const int*x, const int*y, int*z)
|
||||
* # { for (size_t i=0; i<n; i++) { z[i]=x[i]+y[i]; } } */
|
||||
printf("vvaddint...\na[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d ", a[i]);
|
||||
printf("\nb[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d ", b[i]);
|
||||
printf("\nc[%d] = a[%d] + b[%d]: ", n, n, n);
|
||||
for(int i = 0; i < n; ++i) printf("%d ", c[i]);
|
||||
|
||||
vx_vec_vvaddint32(n, a, b, c);
|
||||
|
||||
for(int i = 0; i < n; ++i)
|
||||
{
|
||||
if(c[i] != (a[i]+b[i]))
|
||||
{
|
||||
printf("\n<vddint32> failed at <index: %d>! \n", i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
printf("\nPASSED.......................... <vddint32> \n");
|
||||
#endif
|
||||
#if 0
|
||||
//---------------------------------------------------------------
|
||||
/* # vector-scalar add
|
||||
# for (i=0; i<N; i++) { C[i] = A[i] + B; } // 32-bit ints */
|
||||
for (int i = 0; i < n; ++i) { a[i] = 1; b[i] = 1;}
|
||||
int scalar = 10;
|
||||
printf("vsadd...scalar:%d\na[%d]: ", scalar, n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", a[i]);
|
||||
printf("\nb: %d", scalar);
|
||||
|
||||
vx_vec_vsadd(n, a, scalar);
|
||||
|
||||
for(int i = 0; i < n; ++i)
|
||||
{
|
||||
if(a[i] != (b[i] * scalar))
|
||||
{
|
||||
printf("\n<vsadd> failed at <index: %d>! \n", i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
printf("\nPASSED.......................... <vsadd> \n");
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
//---------------------------------------------------------------
|
||||
/* # memory copy
|
||||
# void *memcpy(void* dest, const void* src, size_t n) */
|
||||
for (int i = 0; i < n; ++i) { a[i] = 1; b[i] = 2;}
|
||||
printf("memcpy\na[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", a[i]);
|
||||
printf("\nb[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", b[i]);
|
||||
|
||||
vx_vec_memcpy(a, b, n);
|
||||
|
||||
for(int i = 0; i < n; ++i)
|
||||
{
|
||||
if(a[i] != b[i])
|
||||
{
|
||||
printf("\n<memcpy> failed at <index: %d>! \n", i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
printf("\nPASSED.......................... <memcpy> \n");
|
||||
//---------------------------------------------------------------
|
||||
/* # void saxpy(size_t n, const float a, const float *x, float *y)
|
||||
# ==> convert to int!!
|
||||
# void saxpy(size_t n, const int a, const int *x, int *y)
|
||||
# {
|
||||
# size_t i;
|
||||
# for (i=0; i<n; i++) y[i] = a * x[i] + y[i];
|
||||
# } */
|
||||
for (int i = 0; i < n; ++i) { a[i] = 1; b[i] = 2; c[i] = 2;}
|
||||
|
||||
printf("saxpy\na[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", a[i]);
|
||||
printf("\nb[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", b[i]);
|
||||
|
||||
vx_vec_saxpy(n, scalar, a, b);
|
||||
|
||||
for(int i = 0; i < n; ++i)
|
||||
{
|
||||
if(b[i] != ((a[i] * scalar) + c[i]))
|
||||
{
|
||||
printf("\n<saxpy> failed at <index: %d>! \n", i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
printf("\nPASSED.......................... <saxpy> \n");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
/* # void sgemm_nn(size_t n, size_t m, size_t k, const float*a, // m * k matrix
|
||||
# size_t lda, const float*b, // k * n matrix
|
||||
# size_t ldb, float*c, // m * n matrix
|
||||
# size_t ldc)
|
||||
# c += a*b (alpha=1, no transpose on input matrices)
|
||||
# matrices stored in C row-major order */
|
||||
|
||||
int m = 8;
|
||||
int k = 8;
|
||||
int n = 8
|
||||
int lda = 4;
|
||||
int ldb = 4;
|
||||
int ldc = 4;
|
||||
|
||||
int* a1 = (int*)malloc(sizeof(m * k));
|
||||
int* b1 = (int*)malloc(sizeof(k * n));
|
||||
int* c1 = (int*)malloc(sizeof(m * n));
|
||||
|
||||
for(int i = 0; i < (m * k); ++i) a1[i] = 1;
|
||||
for(int i = 0; i < (k * n); ++i) b1[i] = 1;
|
||||
for(int i = 0; i < (m * n); ++i) c1[i] = 1;
|
||||
|
||||
printf("sgemm_nn\na[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", a1[i]);
|
||||
printf("\nb[%d]: ", n);
|
||||
for(int i = 0; i < n; ++i) printf("%d \n", b1[i]);
|
||||
|
||||
vx_vec_sgemm_nn(n, m, k, a1, lda, b1, ldb, c1, ldc);
|
||||
|
||||
//for(int i = 0; i < n; ++i)
|
||||
//{
|
||||
// if(b[i] != ((a[i] * scalar) + c[i]))
|
||||
// {
|
||||
// printf("\n<sgemm_nn> failed at <index: %d>! \n", i);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
printf("\nNOT TESTED.......................... <sgemm_nn> \n");
|
||||
//---------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
vx_tmc(0);
|
||||
return 0;
|
||||
}
|
16
rvvector/benchmark_temp/vx_vec_benchmark.h
Normal file
16
rvvector/benchmark_temp/vx_vec_benchmark.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void vx_vec_vvaddint32(int n, int* a, int* b, int *c);
|
||||
//void vx_vec_vsadd(int n, int* a, int scalar);
|
||||
//void vx_vec_memcpy(int* a, int* b, int n);
|
||||
//void vx_vec_saxpy(int n, int scalar, int* a, int* b);
|
||||
//void vx_vec_sgemm_nn(int n, int m, int k, int* a1, int lda, int* b1, int ldb, int* c1, int ldc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
17
rvvector/benchmark_temp/vx_vec_memcpy.s
Normal file
17
rvvector/benchmark_temp/vx_vec_memcpy.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.type vx_vec_memcpy, @function
|
||||
.global vx_vec_memcpy
|
||||
# void *memcpy(void* dest, const void* src, size_t n)
|
||||
# a0=dest, a1=src, a2=n
|
||||
#
|
||||
vx_vec_memcpy:
|
||||
# memcpy
|
||||
mv a3, a0 # Copy destination
|
||||
vsetvli t0, a2, e8,m8 # Vectors of 8b
|
||||
loop:
|
||||
vlb.v v0, (a1) # Load bytes
|
||||
add a1, a1, t0 # Bump pointer
|
||||
sub a2, a2, t0 # Decrement count
|
||||
vsb.v v0, (a3) # Store bytes
|
||||
add a3, a3, t0 # Bump pointer
|
||||
bnez a2, loop # Any more?
|
||||
ret # Return
|
28
rvvector/benchmark_temp/vx_vec_saxpy.s
Normal file
28
rvvector/benchmark_temp/vx_vec_saxpy.s
Normal file
|
@ -0,0 +1,28 @@
|
|||
.type vx_vec_saxpy, @function
|
||||
.global vx_vec_saxpy
|
||||
# void
|
||||
# saxpy(size_t n, const float a, const float *x, float *y)
|
||||
# {
|
||||
# size_t i;
|
||||
# for (i=0; i<n; i++)
|
||||
# y[i] = a * x[i] + y[i];
|
||||
# }
|
||||
#
|
||||
# register arguments:
|
||||
# a0 n
|
||||
# fa0 a
|
||||
# a1 x
|
||||
# a2 y
|
||||
vx_vec_saxpy:
|
||||
vsetvli a4, a0, e32, m8
|
||||
saxpy:
|
||||
vlw.v v0, (a1)
|
||||
sub a0, a0, a4
|
||||
slli a4, a4, 2
|
||||
add a1, a1, a4
|
||||
vlw.v v8, (a2)
|
||||
vfmacc.vf v8, fa0, v0
|
||||
vsw.v v8, (a2)
|
||||
add a2, a2, a4
|
||||
bnez a0, saxpy
|
||||
ret
|
28
rvvector/benchmark_temp/vx_vec_saxpy_float.s
Normal file
28
rvvector/benchmark_temp/vx_vec_saxpy_float.s
Normal file
|
@ -0,0 +1,28 @@
|
|||
.type vx_vec_saxpy, @function
|
||||
.global vx_vec_saxpy_float
|
||||
# void
|
||||
# saxpy(size_t n, const float a, const float *x, float *y)
|
||||
# {
|
||||
# size_t i;
|
||||
# for (i=0; i<n; i++)
|
||||
# y[i] = a * x[i] + y[i];
|
||||
# }
|
||||
#
|
||||
# register arguments:
|
||||
# a0 n
|
||||
# fa0 a
|
||||
# a1 x
|
||||
# a2 y
|
||||
vx_vec_saxpy_float:
|
||||
vsetvli a4, a0, e32, m8
|
||||
saxpy:
|
||||
vlw.v v0, (a1)
|
||||
sub a0, a0, a4
|
||||
slli a4, a4, 2
|
||||
add a1, a1, a4
|
||||
vlw.v v8, (a2)
|
||||
vfmacc.vf v8, fa0, v0
|
||||
vsw.v v8, (a2)
|
||||
add a2, a2, a4
|
||||
bnez a0, saxpy
|
||||
ret
|
220
rvvector/benchmark_temp/vx_vec_sgemm.s
Normal file
220
rvvector/benchmark_temp/vx_vec_sgemm.s
Normal file
|
@ -0,0 +1,220 @@
|
|||
.type vx_vec_sgemm_nn, @function
|
||||
.global vx_vec_sgemm_nn
|
||||
# RV64IDV system
|
||||
#
|
||||
# void
|
||||
# sgemm_nn(size_t n,
|
||||
# size_t m,
|
||||
# size_t k,
|
||||
# const float*a, // m * k matrix
|
||||
# size_t lda,
|
||||
# const float*b, // k * n matrix
|
||||
# size_t ldb,
|
||||
# float*c, // m * n matrix
|
||||
# size_t ldc)
|
||||
#
|
||||
# c += a*b (alpha=1, no transpose on input matrices)
|
||||
# matrices stored in C row-major order
|
||||
|
||||
#define n a0
|
||||
#define m a1
|
||||
#define k a2
|
||||
#define ap a3
|
||||
#define astride a4
|
||||
#define bp a5
|
||||
#define bstride a6
|
||||
#define cp a7
|
||||
#define cstride t0
|
||||
#define kt t1
|
||||
#define nt t2
|
||||
#define bnp t3
|
||||
#define cnp t4
|
||||
#define akp t5
|
||||
#define bkp s0
|
||||
#define nvl s1
|
||||
#define ccp s2
|
||||
#define amp s3
|
||||
|
||||
# Use args as additional temporaries
|
||||
#define ft12 fa0
|
||||
#define ft13 fa1
|
||||
#define ft14 fa2
|
||||
#define ft15 fa3
|
||||
|
||||
# This version holds a 16*VLMAX block of C matrix in vector registers
|
||||
# in inner loop, but otherwise does not cache or TLB tiling.
|
||||
vx_vec_sgemm_nn:
|
||||
#sgemm_nn:
|
||||
addi sp, sp, -FRAMESIZE
|
||||
sd s0, OFFSET(sp)
|
||||
sd s1, OFFSET(sp)
|
||||
sd s2, OFFSET(sp)
|
||||
|
||||
# Check for zero size matrices
|
||||
beqz n, exit
|
||||
beqz m, exit
|
||||
beqz k, exit
|
||||
|
||||
# Convert elements strides to byte strides.
|
||||
ld cstride, OFFSET(sp) # Get arg from stack frame
|
||||
slli astride, astride, 2
|
||||
slli bstride, bstride, 2
|
||||
slli cstride, cstride, 2
|
||||
|
||||
slti t6, m, 16
|
||||
bnez t6, end_rows
|
||||
|
||||
c_row_loop: # Loop across rows of C blocks
|
||||
|
||||
mv nt, n # Initialize n counter for next row of C blocks
|
||||
|
||||
mv bnp, bp # Initialize B n-loop pointer to start
|
||||
mv cnp, cp # Initialize C n-loop pointer
|
||||
|
||||
c_col_loop: # Loop across one row of C blocks
|
||||
vsetvli nvl, nt, e32 # 32-bit vectors, LMUL=1
|
||||
|
||||
mv akp, ap # reset pointer into A to beginning
|
||||
mv bkp, bnp # step to next column in B matrix
|
||||
|
||||
# Initalize current C submatrix block from memory.
|
||||
vlw.v v0, (cnp); add ccp, cnp, cstride;
|
||||
vlw.v v1, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v2, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v3, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v4, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v5, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v6, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v7, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v8, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v9, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v10, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v11, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v12, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v13, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v14, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v15, (ccp)
|
||||
|
||||
|
||||
mv kt, k # Initialize inner loop counter
|
||||
|
||||
# Inner loop scheduled assuming 4-clock occupancy of vfmacc instruction and single-issue pipeline
|
||||
# Software pipeline loads
|
||||
flw ft0, (akp); add amp, akp, astride;
|
||||
flw ft1, (amp); add amp, amp, astride;
|
||||
flw ft2, (amp); add amp, amp, astride;
|
||||
flw ft3, (amp); add amp, amp, astride;
|
||||
# Get vector from B matrix
|
||||
vlw.v v16, (bkp)
|
||||
|
||||
# Loop on inner dimension for current C block
|
||||
k_loop:
|
||||
vfmacc.vf v0, ft0, v16
|
||||
add bkp, bkp, bstride
|
||||
flw ft4, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v1, ft1, v16
|
||||
addi kt, kt, -1 # Decrement k counter
|
||||
flw ft5, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v2, ft2, v16
|
||||
flw ft6, (amp)
|
||||
add amp, amp, astride
|
||||
flw ft7, (amp)
|
||||
vfmacc.vf v3, ft3, v16
|
||||
add amp, amp, astride
|
||||
flw ft8, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v4, ft4, v16
|
||||
flw ft9, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v5, ft5, v16
|
||||
flw ft10, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v6, ft6, v16
|
||||
flw ft11, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v7, ft7, v16
|
||||
flw ft12, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v8, ft8, v16
|
||||
flw ft13, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v9, ft9, v16
|
||||
flw ft14, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v10, ft10, v16
|
||||
flw ft15, (amp)
|
||||
add amp, amp, astride
|
||||
addi akp, akp, 4 # Move to next column of a
|
||||
vfmacc.vf v11, ft11, v16
|
||||
beqz kt, 1f # Don't load past end of matrix
|
||||
flw ft0, (akp)
|
||||
add amp, akp, astride
|
||||
1: vfmacc.vf v12, ft12, v16
|
||||
beqz kt, 1f
|
||||
flw ft1, (amp)
|
||||
add amp, amp, astride
|
||||
1: vfmacc.vf v13, ft13, v16
|
||||
beqz kt, 1f
|
||||
flw ft2, (amp)
|
||||
add amp, amp, astride
|
||||
1: vfmacc.vf v14, ft14, v16
|
||||
beqz kt, 1f # Exit out of loop
|
||||
flw ft3, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v15, ft15, v16
|
||||
vlw.v v16, (bkp) # Get next vector from B matrix, overlap loads with jump stalls
|
||||
j k_loop
|
||||
|
||||
1: vfmacc.vf v15, ft15, v16
|
||||
|
||||
# Save C matrix block back to memory
|
||||
vsw.v v0, (cnp); add ccp, cnp, cstride;
|
||||
vsw.v v1, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v2, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v3, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v4, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v5, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v6, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v7, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v8, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v9, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v10, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v11, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v12, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v13, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v14, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v15, (ccp)
|
||||
|
||||
# Following tail instructions should be scheduled earlier in free slots during C block save.
|
||||
# Leaving here for clarity.
|
||||
|
||||
# Bump pointers for loop across blocks in one row
|
||||
slli t6, nvl, 2
|
||||
add cnp, cnp, t6 # Move C block pointer over
|
||||
add bnp, bnp, t6 # Move B block pointer over
|
||||
sub nt, nt, nvl # Decrement element count in n dimension
|
||||
bnez nt, c_col_loop # Any more to do?
|
||||
|
||||
# Move to next set of rows
|
||||
addi m, m, -16 # Did 16 rows above
|
||||
slli t6, astride, 4 # Multiply astride by 16
|
||||
add ap, ap, t6 # Move A matrix pointer down 16 rows
|
||||
slli t6, cstride, 4 # Multiply cstride by 16
|
||||
add cp, cp, t6 # Move C matrix pointer down 16 rows
|
||||
|
||||
slti t6, m, 16
|
||||
beqz t6, c_row_loop
|
||||
|
||||
# Handle end of matrix with fewer than 16 rows.
|
||||
# Can use smaller versions of above decreasing in powers-of-2 depending on code-size concerns.
|
||||
end_rows:
|
||||
# Not done.
|
||||
|
||||
exit:
|
||||
ld s0, OFFSET(sp)
|
||||
ld s1, OFFSET(sp)
|
||||
ld s2, OFFSET(sp)
|
||||
addi sp, sp, FRAMESIZE
|
||||
ret
|
220
rvvector/benchmark_temp/vx_vec_sgemm_float.s
Normal file
220
rvvector/benchmark_temp/vx_vec_sgemm_float.s
Normal file
|
@ -0,0 +1,220 @@
|
|||
.type vx_vec_sgemm_nn_float, @function
|
||||
.global vx_vec_sgemm_nn_float
|
||||
# RV64IDV system
|
||||
#
|
||||
# void
|
||||
# sgemm_nn(size_t n,
|
||||
# size_t m,
|
||||
# size_t k,
|
||||
# const float*a, // m * k matrix
|
||||
# size_t lda,
|
||||
# const float*b, // k * n matrix
|
||||
# size_t ldb,
|
||||
# float*c, // m * n matrix
|
||||
# size_t ldc)
|
||||
#
|
||||
# c += a*b (alpha=1, no transpose on input matrices)
|
||||
# matrices stored in C row-major order
|
||||
|
||||
#define n a0
|
||||
#define m a1
|
||||
#define k a2
|
||||
#define ap a3
|
||||
#define astride a4
|
||||
#define bp a5
|
||||
#define bstride a6
|
||||
#define cp a7
|
||||
#define cstride t0
|
||||
#define kt t1
|
||||
#define nt t2
|
||||
#define bnp t3
|
||||
#define cnp t4
|
||||
#define akp t5
|
||||
#define bkp s0
|
||||
#define nvl s1
|
||||
#define ccp s2
|
||||
#define amp s3
|
||||
|
||||
# Use args as additional temporaries
|
||||
#define ft12 fa0
|
||||
#define ft13 fa1
|
||||
#define ft14 fa2
|
||||
#define ft15 fa3
|
||||
|
||||
# This version holds a 16*VLMAX block of C matrix in vector registers
|
||||
# in inner loop, but otherwise does not cache or TLB tiling.
|
||||
vx_vec_sgemm_nn_float:
|
||||
#sgemm_nn:
|
||||
addi sp, sp, -FRAMESIZE
|
||||
sd s0, OFFSET(sp)
|
||||
sd s1, OFFSET(sp)
|
||||
sd s2, OFFSET(sp)
|
||||
|
||||
# Check for zero size matrices
|
||||
beqz n, exit
|
||||
beqz m, exit
|
||||
beqz k, exit
|
||||
|
||||
# Convert elements strides to byte strides.
|
||||
ld cstride, OFFSET(sp) # Get arg from stack frame
|
||||
slli astride, astride, 2
|
||||
slli bstride, bstride, 2
|
||||
slli cstride, cstride, 2
|
||||
|
||||
slti t6, m, 16
|
||||
bnez t6, end_rows
|
||||
|
||||
c_row_loop: # Loop across rows of C blocks
|
||||
|
||||
mv nt, n # Initialize n counter for next row of C blocks
|
||||
|
||||
mv bnp, bp # Initialize B n-loop pointer to start
|
||||
mv cnp, cp # Initialize C n-loop pointer
|
||||
|
||||
c_col_loop: # Loop across one row of C blocks
|
||||
vsetvli nvl, nt, e32 # 32-bit vectors, LMUL=1
|
||||
|
||||
mv akp, ap # reset pointer into A to beginning
|
||||
mv bkp, bnp # step to next column in B matrix
|
||||
|
||||
# Initalize current C submatrix block from memory.
|
||||
vlw.v v0, (cnp); add ccp, cnp, cstride;
|
||||
vlw.v v1, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v2, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v3, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v4, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v5, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v6, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v7, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v8, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v9, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v10, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v11, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v12, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v13, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v14, (ccp); add ccp, ccp, cstride;
|
||||
vlw.v v15, (ccp)
|
||||
|
||||
|
||||
mv kt, k # Initialize inner loop counter
|
||||
|
||||
# Inner loop scheduled assuming 4-clock occupancy of vfmacc instruction and single-issue pipeline
|
||||
# Software pipeline loads
|
||||
flw ft0, (akp); add amp, akp, astride;
|
||||
flw ft1, (amp); add amp, amp, astride;
|
||||
flw ft2, (amp); add amp, amp, astride;
|
||||
flw ft3, (amp); add amp, amp, astride;
|
||||
# Get vector from B matrix
|
||||
vlw.v v16, (bkp)
|
||||
|
||||
# Loop on inner dimension for current C block
|
||||
k_loop:
|
||||
vfmacc.vf v0, ft0, v16
|
||||
add bkp, bkp, bstride
|
||||
flw ft4, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v1, ft1, v16
|
||||
addi kt, kt, -1 # Decrement k counter
|
||||
flw ft5, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v2, ft2, v16
|
||||
flw ft6, (amp)
|
||||
add amp, amp, astride
|
||||
flw ft7, (amp)
|
||||
vfmacc.vf v3, ft3, v16
|
||||
add amp, amp, astride
|
||||
flw ft8, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v4, ft4, v16
|
||||
flw ft9, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v5, ft5, v16
|
||||
flw ft10, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v6, ft6, v16
|
||||
flw ft11, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v7, ft7, v16
|
||||
flw ft12, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v8, ft8, v16
|
||||
flw ft13, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v9, ft9, v16
|
||||
flw ft14, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v10, ft10, v16
|
||||
flw ft15, (amp)
|
||||
add amp, amp, astride
|
||||
addi akp, akp, 4 # Move to next column of a
|
||||
vfmacc.vf v11, ft11, v16
|
||||
beqz kt, 1f # Don't load past end of matrix
|
||||
flw ft0, (akp)
|
||||
add amp, akp, astride
|
||||
1: vfmacc.vf v12, ft12, v16
|
||||
beqz kt, 1f
|
||||
flw ft1, (amp)
|
||||
add amp, amp, astride
|
||||
1: vfmacc.vf v13, ft13, v16
|
||||
beqz kt, 1f
|
||||
flw ft2, (amp)
|
||||
add amp, amp, astride
|
||||
1: vfmacc.vf v14, ft14, v16
|
||||
beqz kt, 1f # Exit out of loop
|
||||
flw ft3, (amp)
|
||||
add amp, amp, astride
|
||||
vfmacc.vf v15, ft15, v16
|
||||
vlw.v v16, (bkp) # Get next vector from B matrix, overlap loads with jump stalls
|
||||
j k_loop
|
||||
|
||||
1: vfmacc.vf v15, ft15, v16
|
||||
|
||||
# Save C matrix block back to memory
|
||||
vsw.v v0, (cnp); add ccp, cnp, cstride;
|
||||
vsw.v v1, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v2, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v3, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v4, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v5, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v6, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v7, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v8, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v9, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v10, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v11, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v12, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v13, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v14, (ccp); add ccp, ccp, cstride;
|
||||
vsw.v v15, (ccp)
|
||||
|
||||
# Following tail instructions should be scheduled earlier in free slots during C block save.
|
||||
# Leaving here for clarity.
|
||||
|
||||
# Bump pointers for loop across blocks in one row
|
||||
slli t6, nvl, 2
|
||||
add cnp, cnp, t6 # Move C block pointer over
|
||||
add bnp, bnp, t6 # Move B block pointer over
|
||||
sub nt, nt, nvl # Decrement element count in n dimension
|
||||
bnez nt, c_col_loop # Any more to do?
|
||||
|
||||
# Move to next set of rows
|
||||
addi m, m, -16 # Did 16 rows above
|
||||
slli t6, astride, 4 # Multiply astride by 16
|
||||
add ap, ap, t6 # Move A matrix pointer down 16 rows
|
||||
slli t6, cstride, 4 # Multiply cstride by 16
|
||||
add cp, cp, t6 # Move C matrix pointer down 16 rows
|
||||
|
||||
slti t6, m, 16
|
||||
beqz t6, c_row_loop
|
||||
|
||||
# Handle end of matrix with fewer than 16 rows.
|
||||
# Can use smaller versions of above decreasing in powers-of-2 depending on code-size concerns.
|
||||
end_rows:
|
||||
# Not done.
|
||||
|
||||
exit:
|
||||
ld s0, OFFSET(sp)
|
||||
ld s1, OFFSET(sp)
|
||||
ld s2, OFFSET(sp)
|
||||
addi sp, sp, FRAMESIZE
|
||||
ret
|
20
rvvector/benchmark_temp/vx_vec_vsadd.s
Normal file
20
rvvector/benchmark_temp/vx_vec_vsadd.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.type vx_vec_vsadd, @function
|
||||
.global vx_vec_vsadd
|
||||
# vector-scalar add
|
||||
# N = a0, a[] = a1, B = a2
|
||||
# for (i=0; i<N; i++)
|
||||
# { C[i] = A[i] + B; } // 32-bit ints
|
||||
#
|
||||
vx_vec_vsadd:
|
||||
# vcfg2*V32bINT, 1*S32bINT #
|
||||
# vmv v2, a2 # Copy B to vector unit scalar
|
||||
loop:
|
||||
# setvl t0, a0 # a0 holds N, t0 holds amount done
|
||||
ld v0, a1 # load strip of A vector
|
||||
vadd v1, v0, v2 # add vectors
|
||||
st v1, a3 # store strip of C vector
|
||||
slli t1, t0, 2 # multiply by 4 to get bytes
|
||||
add a1, a1, t1 # bump pointers
|
||||
add a3, a3, t1
|
||||
sub a0, a0, t0 # Subtract amount done
|
||||
bnez a0, loop
|
22
rvvector/benchmark_temp/vx_vec_vvaddint32.s
Normal file
22
rvvector/benchmark_temp/vx_vec_vvaddint32.s
Normal file
|
@ -0,0 +1,22 @@
|
|||
.type vx_vec_vvaddi32, @function
|
||||
.global vx_vec_vvaddint32
|
||||
# vector-vector add routine of 32-bit integers
|
||||
# void vvaddint32(size_t n, const int*x, const int*y, int*z)
|
||||
# { for (size_t i=0; i<n; i++) { z[i]=x[i]+y[i]; } }
|
||||
#
|
||||
# a0 = n, a1 = x, a2 = y, a3 = z
|
||||
# Non-vector instructions are indented
|
||||
vx_vec_vvaddint32:
|
||||
vsetvli t0, a0, e32 # Set vector length based on 32-bit vectors
|
||||
loop:
|
||||
vlw.v v0, (a1) # Get first vector
|
||||
sub a0, a0, t0 # Decrement number done
|
||||
slli t0, t0, 2 # Multiply number done by 4 bytes
|
||||
add a1, a1, t0 # Bump pointer
|
||||
vlw.v v1, (a2) # Get second vector
|
||||
add a2, a2, t0 # Bump pointer
|
||||
vadd.vv v2, v0, v1 # Sum vectors
|
||||
vsw.v v2, (a3) # Store result
|
||||
add a3, a3, t0 # Bump pointer
|
||||
bnez a0, loop # Loop back
|
||||
ret # Finished
|
|
@ -2014,7 +2014,65 @@ void Instruction::executeOn(Warp &c, trace_inst_t * trace_inst) {
|
|||
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 45: //vmacc
|
||||
{
|
||||
D(3, "vmacc");
|
||||
uint8_t *result_ptr;
|
||||
|
||||
vector<Reg<char *>> & vr1 = c.vreg[rsrc[0]];
|
||||
vector<Reg<char *>> & vr2 = c.vreg[rsrc[1]];
|
||||
vector<Reg<char *>> & vd = c.vreg[rdest];
|
||||
if(c.vtype.vsew == 8){
|
||||
for(uint8_t i = 0; i < c.vl; i++){
|
||||
uint8_t *first_ptr = (uint8_t *)vr1[i].val;
|
||||
uint8_t *second_ptr = (uint8_t *)vr2[i].val;
|
||||
uint8_t result = (*first_ptr * *second_ptr);
|
||||
cout << "Comparing " << *first_ptr << " + " << *second_ptr << " = " << result << '\n';
|
||||
|
||||
result_ptr = (uint8_t *) vd[i].val;
|
||||
*result_ptr += result;
|
||||
}
|
||||
for(uint8_t i = c.vl; i < VLMAX; i++){
|
||||
result_ptr = (uint8_t *) vd[i].val;
|
||||
*result_ptr = 0;
|
||||
}
|
||||
}
|
||||
else if(c.vtype.vsew == 16) {
|
||||
uint16_t *result_ptr;
|
||||
for(uint16_t i = 0; i < c.vl; i++){
|
||||
uint16_t *first_ptr = (uint16_t *)vr1[i].val;
|
||||
uint16_t *second_ptr = (uint16_t *)vr2[i].val;
|
||||
uint16_t result = (*first_ptr * *second_ptr);
|
||||
cout << "Comparing " << *first_ptr << " + " << *second_ptr << " = " << result << '\n';
|
||||
|
||||
result_ptr = (uint16_t *) vd[i].val;
|
||||
*result_ptr += result;
|
||||
}
|
||||
for(uint16_t i = c.vl; i < VLMAX; i++){
|
||||
result_ptr = (uint16_t *) vd[i].val;
|
||||
*result_ptr = 0;
|
||||
}
|
||||
|
||||
} else if(c.vtype.vsew == 32) {
|
||||
uint32_t *result_ptr;
|
||||
|
||||
for(uint32_t i = 0; i < c.vl; i++){
|
||||
uint32_t *first_ptr = (uint32_t *)vr1[i].val;
|
||||
uint32_t *second_ptr = (uint32_t *)vr2[i].val;
|
||||
uint32_t result = (*first_ptr * *second_ptr);
|
||||
cout << "Comparing " << *first_ptr << " + " << *second_ptr << " = " << result << '\n';
|
||||
|
||||
result_ptr = (uint32_t *) vd[i].val;
|
||||
*result_ptr += result;
|
||||
}
|
||||
for(Word i = c.vl; i < VLMAX; i++){
|
||||
result_ptr = (uint32_t *) vd[i].val;
|
||||
*result_ptr = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
6
simX/test_benchmark.sh
Executable file
6
simX/test_benchmark.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
echo start > results.txt
|
||||
|
||||
# echo ../kernel/vortex_test.hex
|
||||
make
|
||||
printf "Fasten your seatbelts ladies and gentelmen!!\n\n\n\n"
|
||||
cd obj_dir && ./Vcache_simX -E -a rv32i --core ../../rvvector/benchmark_temp/vx_vec_benchmark.hex -s -b 1> emulator.debug
|
Loading…
Add table
Add a link
Reference in a new issue