An opencl-based heterogeneous parallel loading scheduling method for sca components

By parsing the configuration file of the SCA component, determining and matching the loading parameters of the OpenCL component, and utilizing the OpenCL heterogeneous platform for component loading and scheduling, the problem of low running efficiency of the SCA component is solved, and efficient heterogeneous device management and parallel computing are achieved.

CN119759452BActive Publication Date: 2025-11-18NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411985318.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-11-18
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The SCA component operates inefficiently on heterogeneous devices, making it difficult to meet the parallel scheduling requirements of future waveform intelligent algorithm modules. Furthermore, there are device partitioning conflicts between the loading of OpenCL components and the loading of SCA components, resulting in an inability to effectively manage the platform's operating status.

Method used

By parsing the waveform SAD and PRF configuration files, it is determined whether the component is of OpenCL type, the loading parameters are obtained, and the optimal structural device is matched in the SCA platform. The component is loaded and scheduled using the OpenCL heterogeneous parallel platform, including the configuration and allocation of kernel files, memory space and running parameters.

Benefits of technology

It improves the operating efficiency and device compatibility of SCA components, reduces intermediate steps in component loading and scheduling, makes full use of heterogeneous computing resources, and improves the success rate and performance of component loading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759452B_ABST
    Figure CN119759452B_ABST
Patent Text Reader

Abstract

The application discloses an OpenCL-based SCA component heterogeneous parallel loading scheduling method, relates to the field of data processing, and comprises the following steps: waveform SAD configuration files are parsed to obtain corresponding components; PRF configuration files corresponding to each component are parsed; whether the corresponding component belongs to an OpenCL component is judged according to the PRF configuration file, if yes, loading parameters of the OpenCL component of the corresponding component are obtained; the running state of a device supporting OpenCL component loading in an SCA platform is obtained; the loading matching requirement of the OpenCL component is calculated according to the obtained loading parameters of the OpenCL component; the corresponding device supporting OpenCL component loading in the SCA platform is obtained according to the loading matching requirement; the OpenCL component is loaded according to the obtained device supporting OpenCL component loading; and the interface in the waveform SAD configuration file is called to start a waveform after the component is loaded according to the obtained waveform SAD configuration file. The application improves the running efficiency of the SCA component in view of the low running efficiency of the SCA component heterogeneous device in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more specifically, to a heterogeneous parallel loading and scheduling method for SCA components based on OpenCL. Background Technology

[0002] Software-defined radio (SDR) technology loads waveform software, including communication systems, data formats, encryption modes, and network protocols, onto a general-purpose hardware platform through an open, standardized, and modular unified architecture platform to realize wireless communication system functions. Among these, Software Communication Architecture (SCA), after more than two decades of development, has become the most widely used technical standard in the field of SDR. SCA specifies the hardware and software architecture, security architecture, and API interface specifications, aiming to achieve hardware modularity, software portability, reusability, and interoperability.

[0003] For waveform applications on the SCA platform, the software platform parses component configuration information to obtain a list of devices that can be loaded for each component, and then checks whether each component can be loaded onto a device. However, the SCA standard currently only provides configuration descriptions for multi-core processors and lacks fine-grained resource scheduling methods for each computing core. This results in coarse-grained device matching and poor adaptability for waveform component loading and operation, making it difficult to perform fine-grained control of computing units and failing to meet the parallel scheduling requirements of future waveform intelligent algorithm modules.

[0004] OpenCL is the most widely used framework for parallel computing applications. It defines a platform model for host and device interaction, allowing detailed device information to be obtained through APIs. The host controls parallel computing on the device side, supporting various intelligent computing frameworks and effectively addressing the acceleration needs of intelligent model applications on the SCA platform. However, there is a device allocation conflict between OpenCL loading and SCA component loading: the SCA core framework allocates devices for the entire waveform component, while the host program for the OpenCL component queries and allocates platform devices again. If it is scheduled to a different device, the SCA core framework cannot uniformly manage the overall platform runtime state.

[0005] Therefore, it is urgent to integrate the OpenCL framework and optimize the scheduling of SCA parallel computing devices to improve the matching degree of platform running devices, effectively manage the entire platform, avoid the failure of fine-grained loading of OpenCL components due to insufficient device loading capacity, and improve the loading capacity of waveform intelligent components. Summary of the Invention

[0006] 1. Technical problems to be solved

[0007] To address the problem of low operating efficiency of heterogeneous devices in existing SCA components, this application provides a heterogeneous parallel loading and scheduling method for SCA components based on OpenCL. By matching and scheduling heterogeneous devices, the operating efficiency of SCA components is improved by utilizing the OpenCL heterogeneous parallel platform.

[0008] 2. Technical Solution

[0009] The purpose of this application is achieved through the following technical solution.

[0010] One aspect of this application provides a heterogeneous parallel loading and scheduling method for SCA components based on OpenCL, comprising: parsing a waveform SAD configuration file to obtain a component list, and obtaining the corresponding components according to the component list; parsing the PRF configuration file corresponding to each component according to the obtained components; determining whether the corresponding component belongs to an OpenCL component according to the PRF configuration file, and if so, obtaining the loading parameters of the OpenCL component of the corresponding component; obtaining devices in the SCA platform that support OpenCL component loading, and obtaining the running status of the devices that support OpenCL component loading; calculating the loading matching requirements of the OpenCL component according to the obtained loading parameters of the OpenCL component; obtaining the corresponding devices that support OpenCL component loading from the SCA platform according to the loading matching requirements; determining that the obtained devices that support OpenCL component loading are OpenCL components; and, after loading the component according to the obtained waveform SAD configuration file, calling the interface in the waveform SAD configuration file to start the waveform.

[0011] The Waveform SAD Configuration File, also known as the Software Architecture Description File, is a file that describes the architecture and components of a software system. A Waveform SAD Configuration File is a SAD file specific to a particular waveform application, describing the software architecture and components of that application. By parsing the Waveform SAD Configuration File, information about each component in the waveform application can be obtained, such as the component list, the type of each component, and the path to its configuration parameter file.

[0012] A Properties File (PRF) is a file used to store various attribute parameters of a software component. Each component has a corresponding PRF configuration file, which contains important information such as the component's type, supported parallel frameworks, dependent hardware, and operating system. By parsing a component's PRF configuration file, it's possible to determine whether the component belongs to the OpenCL type and to obtain various parameters required for loading the OpenCL component.

[0013] OpenCL components are a heterogeneous parallel programming framework that can accelerate computation using different processors such as CPUs, GPUs, and FPGAs. Software components that support OpenCL are called OpenCL components, which include host programs and device kernel programs developed for the OpenCL framework. OpenCL components can be loaded and executed in parallel on heterogeneous devices that support the OpenCL environment, leveraging the acceleration capabilities of various heterogeneous computing resources.

[0014] The Software Communication Architecture Platform (SCA) is an architecture specification based on software-defined radio (SCR) for developing portable and reusable SCR systems. The SCA platform is a hardware and software environment compliant with the SCA specification, including heterogeneous computing devices such as general-purpose processors (GPPs), digital signal processors (DSPs), and field-programmable gate arrays (FPGAs), as well as SCA middleware, development libraries, and toolchains. The SCA platform provides a deployment and runtime environment for SCR components, allowing different types of components to be loaded and scheduled for execution on corresponding heterogeneous devices. In this application, the component list is first obtained by parsing the waveform SAD configuration file, and then the component SPD configuration file is parsed to determine whether each component belongs to the OpenCL type. For OpenCL components, loading parameters are extracted from their PRF configuration files, and the parameters are used to match heterogeneous devices on the SCA platform that support OpenCL. After matching the optimal device, the OpenCL component is loaded onto that device and run. The entire process achieves adaptive loading and scheduling of OpenCL-based SCA components on heterogeneous SCA platforms, fully utilizing heterogeneous computing resources.

[0015] Furthermore, the process involves determining whether a component belongs to OpenCL based on the SPD configuration file. This includes: parsing the SPD configuration file for each component to obtain component information; determining whether the corresponding component belongs to the OpenCL type; parsing the PRF configuration file to obtain the component's configuration parameters; and if the component belongs to the OpenCL type, obtaining the corresponding OpenCL component's loading parameters based on the relevant configuration parameters. The OpenCL component loading parameters include the OpenCL component's kernel file, memory space, running device dependencies, and OpenCL running parameters.

[0016] The kernel file is the source code or binary file containing OpenCL kernel functions. Kernel functions are code units that execute parallel computing tasks on an OpenCL device. They are written in OpenCL C and can be compiled into executable instructions for the target device. The kernel file is a crucial component of OpenCL components, determining the component's computational behavior on heterogeneous devices. When loading an OpenCL component, the kernel file needs to be compiled and loaded onto the specified OpenCL device.

[0017] Memory space refers to the amount of memory resources required by OpenCL components during execution to store input data, intermediate results, and output data. Memory space refers to the size and layout of memory needed by an OpenCL component on both the host and device sides. Data transfer and memory management between host and device memory can be performed through the OpenCL runtime API. The OpenCL component's PRF configuration file describes the memory space information required by the component; when loading the component, memory needs to be allocated on the corresponding device based on this information.

[0018] Runtime Device Dependency refers to the requirement of an OpenCL component to run on specific hardware devices, such as GPUs and FPGAs. Different types and models of devices have varying levels of support and performance for OpenCL. Runtime device dependency refers to the requirements of an OpenCL component regarding hardware type, computing power, driver version, etc. The OpenCL component's PRF configuration file specifies its runtime device dependencies, and the appropriate OpenCL device must be selected based on these dependencies when loading the component.

[0019] OpenCL runtime parameters are a series of parameters related to the runtime behavior of OpenCL components, such as workgroup size, memory object type, and synchronization method. These parameters affect the execution efficiency and resource utilization of OpenCL kernel functions. Recommended or default runtime parameter values ​​are contained in the OpenCL component's PRF configuration file. When loading an OpenCL component, these parameters can be adjusted according to actual needs to optimize the component's performance on specific devices.

[0020] The Software Package Descriptor (SPD) configuration file is an XML-formatted file defined in the Software Communications Architecture (SCA) specification, used to describe the basic information and interface characteristics of SCA components. In this application, the key information obtained by parsing the SPD configuration file is the component's implementation description and resource requirements. Based on the component implementation code characteristics (such as file extensions, keywords, etc.) given in the implementation description, it can be determined whether the component is an OpenCL implementation, i.e., whether it needs to be loaded and executed on heterogeneous devices that support OpenCL. The component's resource requirements information helps match the most suitable heterogeneous computing resources.

[0021] In this application, the process of determining whether a component belongs to OpenCL first parses the SPD and PRF configuration files to obtain the component's configuration information and determines whether the component type is OpenCL. If it is OpenCL, the necessary loading information, such as its kernel file, memory space, runtime device dependencies, and runtime parameters, is extracted based on the parallel computing framework support information in the PRF configuration file to form complete OpenCL component loading parameters for subsequent component loading and scheduling processes.

[0022] Furthermore, based on the loading matching requirements, the system retrieves the corresponding devices supporting OpenCL component loading from the SCA platform, including: obtaining parameters of the loading devices in the SCA platform, such as device type, device loading capability, device operating status, and loading capacity; matching the corresponding devices supporting OpenCL component loading from the SCA platform according to the SCA standard based on the obtained parameters and the loading parameters of the obtained OpenCL components; for devices that match as supporting OpenCL component loading, selecting the OpenCL loading device based on the loading parameters of the OpenCL components, and matching the host program of the OpenCL component to the CPU device in the SCA platform; completing the final component matching based on the component running configuration parameters and device running status; and obtaining a list of correspondences between components and loading devices based on the device ID of the selected loading device.

[0023] Furthermore, based on the obtained devices that support OpenCL component loading, the loading process for determining if a device is an OpenCL component includes: selecting the corresponding OpenCL loading device based on the obtained list of correspondences between OpenCL components and OpenCL loading devices; loading the kernel program of the OpenCL component into the selected OpenCL loading device based on the kernel file in the obtained OpenCL component loading parameters; allocating memory space for the OpenCL component on the selected OpenCL loading device based on the memory space in the obtained OpenCL component loading parameters; setting the running parameters of the OpenCL component on the selected OpenCL loading device based on the OpenCL running parameters in the obtained OpenCL component loading parameters; loading the host program of the OpenCL component on the CPU device of the SCA platform, and establishing communication with the kernel program of the selected OpenCL loading device to complete the loading of the OpenCL component.

[0024] In this context, the CPU device (Central Processing Unit) refers to the general-purpose processor device in the SCA platform, typically a multi-core processor based on the x86 architecture. In a heterogeneous computing environment, the CPU is primarily responsible for executing serial, general-purpose tasks, such as business logic, data preprocessing, task distribution, and result aggregation. The CPU device communicates and collaborates with other heterogeneous computing devices through the OpenCL runtime and drivers. The host-side program of the OpenCL component generally runs on the CPU device, interacting and transferring data with the kernel program on the acceleration device through the OpenCL API.

[0025] The host program, or OpenCL host program, is a regular C / C++ program running on the CPU. It is responsible for initializing the OpenCL environment, managing memory objects, loading and compiling the kernel program, setting kernel parameters, executing the kernel, transferring data, and coordinating parallel task synchronization between the host and devices. The host program interacts with the OpenCL runtime through OpenCL API function calls to control and utilize heterogeneous devices. The host program of an OpenCL component is the control center of the component, working together with the device-side kernel program to complete the component's parallel computing tasks.

[0026] In this application, during the loading process of components identified as OpenCL, the target device corresponding to the component is first selected based on the list of correspondences between OpenCL components and OpenCL loading devices. Then, the kernel file is extracted from the component's loading parameters, compiled, and loaded onto the selected device. Next, the required memory resources are allocated on the device according to memory space parameters. Then, OpenCL runtime parameters are set in the kernel program to control its parallel execution behavior. Finally, the host program of the OpenCL component is loaded on the CPU device, and a communication connection is established between it and the kernel program on the loading device. At this point, the loading process of the OpenCL component on the heterogeneous platform is complete. The host program can call the kernel program through the OpenCL API to collaboratively complete parallel computing tasks. This heterogeneous parallel loading and scheduling method for OpenCL-based SCA components fully considers the characteristics of OpenCL components and the architecture of heterogeneous platforms, achieving adaptive mapping and dynamic loading from components to hardware, thus improving the parallel performance and flexibility of the SCA system. The host program and kernel program execute on the CPU and acceleration device respectively, working collaboratively through data transmission and synchronization mechanisms, demonstrating the advantages of heterogeneous collaborative computing.

[0027] Furthermore, based on the kernel file in the loading parameters of the obtained OpenCL component, the kernel program of the OpenCL component is loaded into the selected OpenCL loading device, including: obtaining the source code or binary file of the kernel file based on the kernel file in the loading parameters of the OpenCL component; and using the API functions of the OpenCL component runtime to compile the obtained source code or binary file and load it into the selected OpenCL loading device.

[0028] Furthermore, based on the memory space in the OpenCL component's loading parameters, the memory space of the OpenCL component is allocated on the selected OpenCL loading device, including: based on the OpenCL component's memory space, calling the OpenCL component's runtime API function to allocate a specified size of memory space on the selected OpenCL loading device.

[0029] Furthermore, the waveform SAD configuration file is parsed to obtain a component list, and the corresponding components are obtained based on the component list. This includes: parsing the component description information in the waveform SAD configuration file to obtain the component name, type, and configuration parameter file path; and generating a component list based on the obtained component name, type, and configuration parameter file path.

[0030] Another aspect of this application provides a heterogeneous parallel loading and scheduling system for SCA components based on OpenCL, comprising: a file parsing module, which parses waveform SAD configuration files, obtains a component list, and retrieves the corresponding components based on the component list; an OpenCL parameter extraction module, which parses the obtained SPD configuration files corresponding to each component, determines whether the corresponding component belongs to an OpenCL component based on the SPD configuration file, and if so, parses the PRF configuration file to obtain the loading parameters of the corresponding component's OpenCL component; and a platform device manager module, which obtains a list of devices loaded in the SCA platform and their running status, and obtains the OpenCL loading information of devices that support OpenCL component loading; waveform The application factory module obtains a list of waveforms in the platform, as well as information on the list of components contained in each waveform. The OpenCL device matching module calculates the loading matching requirements of the OpenCL components based on their loading parameters, and reads the platform device manager module to obtain the corresponding devices that support OpenCL component loading from the SCA platform according to the loading matching requirements. The OpenCL device loading module completes the loading of the host program and device kernel program of the OpenCL component. It loads the host program of OpenCL according to the allocated CPU device, and loads the device kernel program of OpenCL according to the obtained devices that support OpenCL component loading.

[0031] Another aspect of this application provides a heterogeneous hardware system, comprising: a host device running an OpenCL-based SCA component heterogeneous parallel loading and scheduling system; at least two general-purpose processors connected to the host device, executing host-side programs and computational tasks of the SCA components; at least one heterogeneous computing device connected to the host device, executing the kernel program of the OpenCL components; the host device communicating with each CPU and the device supporting OpenCL component loading through the API interface of the OpenCL component runtime, and loading the OpenCL components onto the matching heterogeneous computing devices for execution; the CPU returning the execution result of the OpenCL components to the host device through the API interface of the OpenCL component runtime; the heterogeneous computing device receiving the kernel program, memory space and running parameters sent by the host device through the API interface of the OpenCL component runtime, loading and executing the kernel program of the OpenCL components, and returning the execution result to the host device through the API interface of the OpenCL component runtime.

[0032] 3. Beneficial effects

[0033] Compared to existing technologies, the advantages of this application are:

[0034] (1) The SCA component heterogeneous parallel loading scheduling method based on OpenCL provided in this application obtains the loading parameters of the OpenCL component of the component by parsing the configuration file, matches the optimal heterogeneous loading device, and directly deploys the component to the matching device. It also adopts mechanisms such as OpenCL API to compile the kernel and ABI to load binary code, which reduces the intermediate links of component loading scheduling and effectively improves the loading efficiency and performance of waveform components.

[0035] (2) Based on the component's requirements for operating device dependence, memory space, and operating parameters, this application matches the optimal CPU and OpenCL heterogeneous loading device, enabling the SCA component to flexibly adapt to and fully utilize the heterogeneous parallel processing capabilities of the platform device, thereby improving the device adaptability of the component loading. When the platform device changes, there is no need to modify the waveform and components; adaptation can be achieved by adjusting the loading parameters of the OpenCL component, thus improving operating efficiency.

[0036] (3) By establishing a correspondence between components and matching devices, components are directly deployed to the corresponding CPU and OpenCL devices, reducing data transmission between components and giving full play to the collaborative parallel advantages of CPU and OpenCL devices, thereby improving the heterogeneous parallel processing performance of SCA. Attached Figure Description

[0037] Figure 1 This is a flowchart of one embodiment of the present application;

[0038] Figure 2 This is a flowchart illustrating the component module analysis steps according to one embodiment of this application;

[0039] Figure 3 This is a diagram illustrating device dependency matching steps according to an embodiment of this application;

[0040] Figure 4 This is a diagram illustrating the component loading steps according to an embodiment of this application;

[0041] Figure 5 This is a schematic diagram of the SCA component device loading correspondence according to an embodiment of this application;

[0042] Figure 6 This is a schematic diagram illustrating the device loading correspondence of OpenCL-supporting components according to one embodiment of this application;

[0043] Figure 7 This is a block diagram of a heterogeneous parallel loading and scheduling system according to an embodiment of this application. Detailed Implementation

[0044] The present application will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0045] Reference Figure 1 As shown, the SCA waveform creation and release optimization method based on component sleep in this application includes the following steps:

[0046] First, the waveform SAD configuration file is parsed to obtain the component list, and then the corresponding components are retrieved based on the component list; specifically,

[0047] The waveform SAD configuration file is read, typically an XML file with the "sad.xml" extension. The SoftwareAssembly Descriptor (SAD) configuration file describes a complete waveform application, containing information such as a list of components and the connections between them. It provides the overall structure and component composition information of the waveform application and is the starting point for parsing and loading waveforms.

[0048] The XML content of the SAD configuration file is parsed to obtain detailed configuration information of the components, such as component type, component attributes, and component implementation code. The parsed component identifiers and configuration information are stored in a component list data structure, forming a complete component list. This component list contains the identifiers and configuration information of all components in the waveform application, centrally managing the component information of the waveform application and facilitating subsequent component loading, instantiation, and connection operations. Specifically, it obtains... <componentfiles>Elements. Traversal <componentfiles>Each under element <componentfile>Child element: Get <componentfile>The "id" attribute value serves as a unique identifier for the component; [the value is then retrieved]. <componentfile>Down <localfile>The "name" attribute value of the element serves as the path to the SPD configuration file corresponding to the component. Based on the parsed SPD configuration file path, the SPD configuration file for each component is read, typically an XML file with the "spd.xml" extension. The Software Package Descriptor (SPD) configuration file describes detailed information about a single component, such as component type, attributes, and implementation code. It provides the component's metadata and implementation details and is the basis for loading and instantiating the component.

[0049] like Figure 2 As shown, based on the obtained components, the corresponding PRF configuration files for each component are parsed, including: reading the component's SPD configuration file, which is usually an XML file with the "spd.xml" extension; parsing the XML content of the SPD configuration file to obtain the component's description information; and obtaining... <implementation>Information about the element, including the component implementation platform processor, operating system, etc. (Get) <code>Information about the element, including the binary filename, input parameters, stack size, priority, etc. In the standard SPD file format, this is achieved through... <code>Add "OpenCL" to the element's type attribute to determine its type. <code>The element's "type" attribute is checked for "OpenCL" to determine if the component is an OpenCL component. This OpenCL component classification is stored for future component type determination. This step is absent in the existing SCA specification. By adding an OpenCL type identifier, OpenCL components can be easily filtered out, and suitable heterogeneous computing resources can be matched during subsequent scheduling, fully leveraging the heterogeneous parallel advantages of OpenCL and improving component execution efficiency. Specifically, this is achieved by reading the SPD configuration file. <propertyfile>The "localfile" attribute of the element allows you to obtain the component's PRF configuration parameter file. This PRF configuration file, typically an XML file with the "prf.xml" extension, is read. The XML content of the PRF configuration file is parsed to obtain the component's configuration parameters: during the component information acquisition step, it is determined whether the component is an OpenCL component. If it is an OpenCL component, the kernel file, memory space, runtime device dependencies, OpenCL version, and runtime parameters are saved separately in the PRF file. If it is not an OpenCL component, the PRF configuration file parameters are parsed normally, and the component's runtime configuration parameters are saved. This application, based on the original SCA component parsing process, adds the identification of OpenCL type components and the extraction of OpenCL-specific configuration parameters, laying the foundation for subsequent heterogeneous device matching and scheduling. Through extensions and optimizations for OpenCL, the heterogeneous computing potential of SCA components is fully explored, overcoming the problem of low operating efficiency of SCA components on heterogeneous devices in existing technologies.

[0050] The Properties File (PRF) configuration file determines whether the corresponding component is an OpenCL component. If so, it retrieves the OpenCL component loading parameters. The PRF file describes the component's properties, including parameters, configuration, and resource requirements, providing configurable attributes. During component loading and instantiation, the component can be configured and customized based on the attribute values ​​in the PRF file. OpenCL components are SCA components implemented using the OpenCL (Open Computing Language) parallel computing framework. Leveraging OpenCL's heterogeneous computing capabilities, parallel acceleration can be achieved on OpenCL-enabled devices (such as GPUs and FPGAs). Loading an OpenCL component requires specific parameters, such as the OpenCL platform, device, kernel file, and memory objects, which are specified in the component's PRF configuration file.

[0051] Specifically, in this embodiment, the OpenCL parameters in the PRF configuration file are parsed: Parameters such as "clKernel," "clBuffer," "clDeviceType," "clVersion," and "clArgs" are added to the PRF component configuration file to describe information such as the OpenCL component's kernel file, memory space, runtime device dependencies, OpenCL version, and runtime parameters. Among these: obtaining the kernel file parameters corresponds to... <simple>The element's "name" attribute is "clKernel" and its type is "string". This retrieves the memory space parameter, corresponding to... <simple>The element's "name" attribute is "clBuffer" and its type is "integer". This retrieves the runtime device dependency parameters, corresponding to... <simple>The element's "name" attribute is "clDeviceType", of type "string", and its value can be "CL_DEVICE_CPU", "CL_DEVICE_GPU", "CL_DEVICE_FPGA", etc. This retrieves the OpenCL version parameter, corresponding to... <simple>The element's "name" attribute is "clVersion" and its type is "string". This retrieves the corresponding OpenCL runtime parameters. <simple>The element's "name" attribute is "clArgs" and its type is "string". The obtained OpenCL parameters are stored for subsequent OpenCL component loading and initialization.

[0052] Retrieve devices in the SCA platform that support OpenCL component loading, and obtain the running status of these devices; such as... Figure 3 As shown, the platform loads device information by iterating through all loaded devices on the platform. For each device, the device ID (device identifier) ​​is obtained. For devices that support OpenCL component loading, their `query` method is called to obtain OpenCL-related information: The device type `clDeviceType` is obtained, including `CL_DEVICE_CPU`, `CL_DEVICE_GPU`, `CL_DEVICE_FPGA`, etc. The queue length `clWgSize` is obtained, representing the maximum workgroup size supported by the device. The memory capacity `clMemSize` is obtained, representing the available memory size of the device. The OpenCL version `clVersion` is obtained, representing the OpenCL version supported by the device. The device's running status is obtained: `adminState` (device management status), including locked, unlocked, powered off, etc. The device's `usageState` (device usage status), including idle, running, busy, etc., is obtained. The device's `operationalState` (device operation status), including available, unavailable, etc. The obtained device information is stored in a data structure, such as a dictionary or list, for subsequent component matching and loading.

[0053] Based on the obtained OpenCL component loading parameters, the loading matching requirements of the OpenCL component are calculated. Then, the corresponding device supporting OpenCL component loading is obtained from the SCA platform according to the loading matching requirements. Specifically, the component list of the waveform is traversed. For each component: if the component is an OpenCL component, based on the OpenCL parameters obtained in the component module parsing step, and according to the component's device-side kernel program running requirements, including device type, memory capacity, OpenCL version, etc., the loading device information of the currently traversed platform is matched to determine whether the device type is consistent, whether the OpenCL version is compatible, and whether the device memory capacity meets the component's memory space requirements. If the match is successful, its OpenCL host program is allocated a CPU device. If the match fails, the next platform loading device is traversed. After the OpenCL device and component are matched, the running status is matched again using the component's configuration parameters. If the current device running status is unlocked, idle, or available, the component and device are finally matched, and the correspondence between the component and the device is stored in a list or dictionary, including the component ID and device ID. At this point, if it is an OpenCL component, the matching of its device-side kernel program with the OpenCL loading device is complete. If the matching fails, the process continues to the next device. If no matching OpenCL component is found after traversing the platform devices, the following approach can be taken: record the information of the unmatched component, such as the component ID and required parameters. In subsequent error handling or logging, notify the user that a suitable device is missing. Once the component is matched, the process continues to the next component until all components are matched, returning a list of waveform component and device correspondences, including the successfully matched component ID and device ID.

[0054] Based on the devices that support OpenCL component loading, the loading process identifies OpenCL components. Specifically, it obtains the user program and kernel program for the OpenCL component and loads them onto the corresponding CPU and OpenCL device, respectively. Figure 4 As shown, the loading capacity allocation is as follows: Based on the loading requirements of the waveform component, the allocateCapacity() method is called on the loading device to allocate the loading capacity interface.

[0055] The load(*) interface is called on the loading device to load the waveform component binary code. Specifically, if the component is a regular SCA component, the execution steps are skipped directly after loading. If the component is an OpenCL component, after the OpenCL host program is loaded on the CPU side, the OpenCL device-side kernel program is read from the kernel file corresponding to "clKernel" in the component's PRF configuration file. The OpenCL API interface clCreateKernel function is called to compile the kernel program, and the corresponding cache space is allocated on the corresponding OpenCL device according to the kernel program memory capacity requirements corresponding to "clBuffer" in the component's PRF configuration file. This application utilizes the characteristics of the OpenCL heterogeneous parallel platform, optimizes data transmission and access efficiency by pre-allocating the memory required by the kernel, and effectively improves the component's running performance.

[0056] Figure 5 This diagram illustrates the corresponding relationships between SCA components and their running on the appropriate devices. The waveform includes multiple components: waveform controller component, component 1, component 2, ..., up to component N. After being assigned to corresponding devices, each component is loaded onto its corresponding CPU, GPU, FPGA, or other loading device for execution. This fine-grained, component-level heterogeneous loading fully leverages the computational advantages of heterogeneous hardware and overcomes the problem of low operating efficiency of SCA components on heterogeneous devices in existing technologies.

[0057] Figure 6 To support the device-to-device mapping for OpenCL component loading, this application illustrates a method that loads the host-side component and kernel program of an OpenCL component onto the CPU and GPU devices, respectively. Compared to the traditional method of loading only onto the CPU, this application achieves flexible loading of SCA components onto various heterogeneous devices such as CPUs and GPUs through heterogeneous device matching and scheduling. This effectively manages the platform's loading devices, improves the component loading success rate, and avoids the problem of loading failure due to insufficient device capacity. Simultaneously, thanks to OpenCL's superior heterogeneous parallel performance, the operating efficiency of the SCA component is also significantly improved. This application effectively solves the problem of low heterogeneous device operating efficiency of existing SCA components by enhancing heterogeneous device matching and OpenCL environment support during the component loading stage. This method can dynamically select the optimal heterogeneous device for loading based on component characteristics and device status, and fully utilizes OpenCL's heterogeneous parallel mechanism to fully exploit hardware performance, significantly improving component execution efficiency while ensuring a high loading success rate.

[0058] Optionally, if the component loading type is Executable, the execute(*) method needs to be called on the loading device to execute the component's binary code and save the component process ID; if the component is an OpenCL component, the OpenCL API interface clSetKernel function is called on the corresponding allocated device to set its kernel execution parameters, which are obtained by parsing the "clArgs" parameter in the PRF configuration file. Component registration: After the component is loaded, it registers its own object with the application factory component registration manager. Component port connection: After all waveform components are registered, the connectUsesPort(*) method of the component's PortAccessor interface is called to complete the port connection; Waveform initialization configuration: The assembly controller component instance of the waveform is found according to the waveform configuration file, and the waveform initialization parameters are configured. The platform achieves synchronous control and loading operation of SCA waveforms and OpenCL components through unified interface management and configuration description of OpenCL devices and components. Waveform startup: The start(*) interface is called to start the waveform.

[0059] Correspondingly, such as Figure 7 As shown, this invention also provides a heterogeneous parallel loading and scheduling system for SCA components based on OpenCL, comprising: a file parsing module, which parses waveform SAD configuration files, obtains a component list, and retrieves the corresponding components based on the component list; an OpenCL parameter extraction module, which parses the obtained SPD configuration files corresponding to each component, determines whether the corresponding component belongs to an OpenCL component based on the SPD configuration file, and if so, parses the PRF configuration file to obtain the loading parameters of the corresponding component's OpenCL component; a platform device manager module, which obtains a list of devices loaded in the SCA platform and their running status, and obtains the OpenCL loading information of devices that support OpenCL component loading; and a waveform... The factory module retrieves a list of waveforms in the platform, along with information on the list of components contained in each waveform. The OpenCL device matching module calculates the loading matching requirements for OpenCL components based on their loading parameters and reads the platform's device manager module to retrieve the corresponding devices supporting OpenCL component loading from the SCA platform according to these requirements. The OpenCL device loading module loads both the host-side program and the device-side kernel program for the OpenCL component. It loads the host-side program based on the allocated CPU device and loads the device-side kernel program based on the retrieved devices supporting OpenCL component loading.

[0060] This application introduces OpenCL-related configuration parameters into the SPD and PRF configuration files of the SCA component, such as... <code>The system configures OpenCL components with parameters such as "OpenCL" type, "clKernel" (kernel file), "clBuffer" (memory requirements), and "clArgs" (kernel execution parameters). During component loading, the system reads the component's SPD and PRF configuration files and parses them to obtain OpenCL-related parameters. Based on these parameters, fine-grained resource allocation and management are performed on the platform's OpenCL devices, including memory allocation and kernel compilation. This unified OpenCL parameter configuration and management enables unified control over OpenCL components, improving the success rate of component loading.

[0061] This application enhances the loading capabilities of OpenCL components by introducing support for OpenCL devices, such as GPUs and FPGAs, into the platform's device management. OpenCL-related methods, such as clCreateKernel and clSetKernel, are added to the device interfaces. During component loading, the appropriate OpenCL device is selected for loading and execution based on the component's OpenCL parameters. Through fine-grained OpenCL device management and component loading, the loading capabilities of OpenCL components are effectively improved, avoiding loading failures caused by inconsistent device management.

[0062] This application leverages the parallel computing capabilities of OpenCL components. These OpenCL components execute on the OpenCL device through a kernel program, thus utilizing the device's parallel computing power. During component loading, the kernel program is compiled and loaded onto the OpenCL device, and kernel execution parameters are set using the clSetKernel method. During component execution, the kernel execution is initiated through the OpenCL API interface, utilizing the device's parallel computing capabilities to improve the component's computational efficiency.

[0063] This application extends the SCA core framework platform by introducing support for OpenCL components. During component loading and port connection processes, SCA standard methods are still used, such as load(*) and connectUsesPort(*). By extending OpenCL support on the standard SCA framework, standard compliance in the waveform deployment process is ensured.

[0064] The foregoing illustrative description of the invention and its embodiments is not restrictive and can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. The accompanying drawings are only one embodiment of the invention, and the actual structure is not limited thereto. No reference numerals in the claims should limit the scope of the claims. Therefore, if a person skilled in the art, inspired by this description, designs a similar structure and embodiment without departing from the spirit of the invention, such design should fall within the scope of protection of this patent. Furthermore, the word "comprising" does not exclude other elements or steps, and the word "a" preceding an element does not exclude the inclusion of "a plurality" of that element. Multiple elements stated in the product claims can also be implemented by a single element through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.< / code> < / simple> < / simple> < / simple> < / simple> < / simple> < / propertyfile> < / code> < / code> < / code> < / implementation> < / localfile> < / componentfile> < / componentfile> < / componentfile> < / componentfiles> < / componentfiles>

Claims

1. A heterogeneous parallel loading and scheduling method for SCA components based on OpenCL, characterized in that, include: Parse the waveform SAD configuration file, obtain the component list, and retrieve the corresponding component based on the component list; Based on the obtained components, parse the PRF configuration files corresponding to each component; The system determines whether the corresponding component is an OpenCL component based on the PRF configuration file. If it is, the loading parameters of the corresponding OpenCL component are obtained; otherwise, the PRF configuration file is saved. Obtain the devices in the SCA platform that support OpenCL component loading, and obtain the running status of the devices that support OpenCL component loading; Based on the obtained loading parameters of the OpenCL component, calculate the loading matching requirements of the OpenCL component; Based on the loading matching requirements, obtain the corresponding devices that support OpenCL component loading from the SCA platform; Based on the obtained devices that support OpenCL component loading, the loaded component is determined to be an OpenCL component. Based on the obtained waveform SAD configuration file, load the corresponding component and call the interface in the waveform SAD configuration file to start the waveform; Based on the loading matching requirements, obtain the corresponding devices that support OpenCL component loading from the SCA platform, including: Obtain the parameters of the loaded device in the SCA platform. The parameters include device type, device loading capacity, device operating status, and loading capacity. Based on the obtained parameters and the loading parameters of the OpenCL component, as well as the SCA standard, the system matches the corresponding device that supports loading OpenCL components from the SCA platform. For devices that support OpenCL component loading, the OpenCL loading device is selected based on the OpenCL component loading parameters, and the host program of the OpenCL component is matched to the CPU device in the SCA platform.

2. The heterogeneous parallel loading and scheduling method for SCA components based on OpenCL according to claim 1, characterized in that: Determine whether the corresponding component belongs to OpenCL based on the PRF configuration file, including: Parse the SPD configuration file corresponding to each component to obtain component information and determine whether the corresponding component belongs to the OpenCL type; Parse the PRF configuration files corresponding to each component to obtain the component's configuration information and parameters; If the component is of type OpenCL, the corresponding OpenCL component loading parameters are obtained according to the relevant configuration parameters. The OpenCL component loading parameters include the OpenCL component kernel file, memory space, running device dependencies, and OpenCL running parameters.

3. The heterogeneous parallel loading and scheduling method for SCA components based on OpenCL according to claim 1, characterized in that: Based on the devices that support OpenCL component loading, the loaded components are identified as OpenCL components, including: Based on the obtained list of correspondences between OpenCL components and OpenCL loading devices, select the OpenCL loading device corresponding to the OpenCL component; Based on the kernel file in the OpenCL component loading parameters obtained from the OpenCL component, the kernel program of the OpenCL component is loaded into the selected OpenCL loading device; Based on the memory space in the OpenCL component's loading parameters, allocate the OpenCL component's memory space on the selected OpenCL loading device. Based on the OpenCL component's loading parameters obtained from the OpenCL component, set the running parameters of the OpenCL component on the selected OpenCL loading device; The host program for loading OpenCL components is loaded onto the CPU device of the SCA platform, and communication is established with the kernel program of the selected OpenCL loading device to complete the loading of OpenCL components.

4. The heterogeneous parallel loading and scheduling method for SCA components based on OpenCL according to claim 3, characterized in that: Based on the kernel file obtained from the OpenCL component's loading parameters, the OpenCL component's kernel program is loaded into the selected OpenCL loading device, including: Based on the kernel file in the loading parameters of the OpenCL component, obtain the source code or binary file of the kernel file; Using the API functions of the OpenCL component runtime, the acquired source code or binary file is compiled and loaded into the selected OpenCL loading device.

5. The heterogeneous parallel loading and scheduling method for SCA components based on OpenCL according to claim 3, characterized in that: Based on the memory space obtained from the OpenCL component's loading parameters, allocate the OpenCL component's memory space on the selected OpenCL loading device, including: Based on the memory space of the OpenCL component, call the API functions of the OpenCL component runtime to allocate a specified amount of memory space on the selected OpenCL loading device.

6. The heterogeneous parallel loading and scheduling method for SCA components based on OpenCL according to any one of claims 2 to 5, characterized in that: Parse the waveform SAD configuration file to obtain the component list, and then retrieve the corresponding components based on the component list, including: Parse the component description information in the waveform SAD configuration file to obtain the component's name, type, and configuration parameter file path; Generate a list of components based on the obtained component names, types, and configuration parameter file paths.

7. A system based on the OpenCL-based SCA component heterogeneous parallel loading and scheduling method according to any one of claims 1 to 6, characterized in that, include: The file parsing module parses the waveform SAD configuration file, obtains the component list, and retrieves the corresponding components based on the component list. The OpenCL parameter extraction module parses the SPD configuration files corresponding to each component, determines whether the corresponding component belongs to OpenCL based on the SPD configuration file, and if so, parses the PRF configuration file to obtain the loading parameters of the corresponding OpenCL component. The platform device manager module retrieves the list of devices loaded in the SCA platform and their corresponding running status, and obtains OpenCL loading information for devices that support OpenCL component loading. The waveform application factory module retrieves a list of waveforms in the platform, as well as a list of components contained in each waveform; The OpenCL device matching module calculates the loading matching requirements of the OpenCL component based on the loading parameters of the OpenCL component, and reads the platform device manager module to obtain the corresponding device that supports OpenCL component loading from the SCA platform according to the loading matching requirements of the OpenCL component. The OpenCL device loading module loads the host-side program and device-side kernel program of the OpenCL component. It loads the host-side program of OpenCL according to the allocated CPU device, and loads the device-side kernel program of OpenCL component according to the obtained device that supports OpenCL component loading.

8. A heterogeneous hardware system based on the OpenCL-based SCA component heterogeneous parallel loading and scheduling method as described in any one of claims 1 to 6, characterized in that, include: The host device runs an OpenCL-based SCA component heterogeneous parallel loading and scheduling system; At least two general-purpose processors are connected to the host device to execute host-side programs and computing tasks of the SCA component; At least one heterogeneous computing device is connected to the host device and executes the kernel program of the OpenCL component; The host device communicates with each CPU and device that supports OpenCL component loading through the API interface of the OpenCL component runtime, and loads the OpenCL component onto the matching heterogeneous computing device for execution; The CPU returns the execution results of the OpenCL component to the host device through the API interface of the OpenCL component runtime; Heterogeneous computing devices receive kernel programs, memory space, and runtime parameters sent by the host device through the API interface of the OpenCL component runtime, load and execute the kernel program of the OpenCL component, and return the execution results to the host device through the API interface of the OpenCL component runtime.

Citation Information

Patent Citations

  • Generically Managing the Configuration of Heterogeneous Software Artifacts

    US20080320467A1

  • Heterogeneous multiprocessor program compilation targeting programmable integrated circuits

    WO2016077393A1