How to run a script

The script execution method addresses performance issues in interpreted languages by generating a request table for bulk offloading to accelerators, reducing overhead and improving speed and efficiency in numerical calculations.

JP7786124B2Active Publication Date: 2025-12-16NEC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2021174740
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-12-16
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

Interpreted languages for numerical calculations on multidimensional arrays suffer from performance degradation due to extra memory loads, memory allocation, and overhead from frequent function calls when using accelerators like GPGPUs, especially with small calculation granularities.

Method used

A script execution method that analyzes a script in an interpreter language, generates a request table with operation requests, and offloads them in bulk to an accelerator, reducing overhead by minimizing function calls and memory transfers.

Benefits of technology

This method significantly reduces communication overhead and improves performance by aggregating multiple computation requests into a single transfer, enhancing execution speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007786124000001
    Figure 0007786124000001
  • Figure 0007786124000002
    Figure 0007786124000002
  • Figure 0007786124000003
    Figure 0007786124000003
Patent Text Reader

Abstract

To solve the problem in which overhead becomes larger when a script in an interpreter language is executed.SOLUTION: A processor 100 of the present invention causes an accelerator 110 having an arithmetic kernel 111 to execute arithmetic processing on array elements based on a script in an interpreter language. The processor 100 includes: a generation unit 101 that analyzes the script and generates a request table that stores information based on a plurality of arithmetic requests included in the script in the execution order of the arithmetic requests; and a request unit 102 that transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a script execution method, a processor, a script execution system, and a program. [Background technology]

[0002] Interpreted languages ​​provide libraries that simplify programming for numerical calculations on multidimensional arrays. For example, Python's NumPy and MATLAB, provided by Mathworks, allow you to specify operations on objects that represent multidimensional array data, and the operations are automatically processed within the library without the user having to define loop structures. This allows for concise and intuitive programming. Because these libraries are based on simple "element-wise" operations on multidimensional array elements, significant speedups can be expected by offloading operations to external accelerators such as GPGPUs (General Purpose Graphics Processing Units) and vector processors.

[0003] The libraries mentioned above have the great advantage of simplifying the coding of numerical calculations, but there are often cases where performance is degraded compared to programs written only in common low-level languages ​​(such as C or Fortran). This is because interpreted languages ​​interpret and execute programs sequentially, one instruction at a time, at runtime. In other words, a library function is called for each operation on a multidimensional array object, a loop is performed on the array elements within the library function, and each operation requires input and output arrays. When using an accelerator, calculation offloading occurs for each operation. This causes the following performance issues: - Extra loads / stores to memory - Extra memory allocation occurs to hold temporary array elements Overhead occurs due to the increase in the number of calculations offloaded to the accelerator [Prior art documents] [Non-patent literature]

[0004] [Non-Patent Document 1] Lund, Johannes, et al. "Just-In-Time Compilation of NumPy Vector Operations.", GSTF Journal on Computing (JoC) 3.3 (2014). [Non-patent document 2] Ravishankar, Mahesh, and Vinod Grover. "Automatic acceleration of Numpy applications on GPUs and multicore CPUs.", arXiv preprint arXiv:1901.03771 (2019). Summary of the Invention [Problem to be solved by the invention]

[0005] Approaches to the above-mentioned issues are proposed in Non-Patent Documents 1 and 2. These documents employ lazy evaluation for NumPy multidimensional array operations. Specifically, when the host detects an instruction that triggers a request for data on the accelerator, the operations that have been delayed and not executed until now are converted into a single function by a just-in-time (JIT) compiler and then executed. This alleviates the performance issues of general-purpose numerical calculation libraries for interpreted languages.

[0006] However, the JIT compilation method has the problem of large overhead due to processes such as generating source code to be given to the JIT compiler, compiling it into a binary, and loading the compiled binary into memory. For example, when the granularity of calculations on the accelerator is not very large, these overheads become significant, and performance may be reduced compared to execution using a non-JIT compilation method. Non-patent literature minimizes these overheads by caching JIT-compiled binary information and reusing it within the program. However, when there are multiple locations in a program where dynamic binary generation using JIT compilation is applied and reusing dynamically generated binaries is not effective, the overhead described above becomes significant.

[0007] From the above, it is conceivable that non-JIT compilation can be used to execute processing blocks with small calculation granularity faster. As a result, non-JIT compilation often requires offloading calculations, which inevitably leads to the problem that the overhead of function calls cannot be ignored.

[0008] Therefore, an object of the present invention is to provide a script execution method that can solve the above-mentioned problem of large overhead when executing a script written in an interpreter language. [Means for solving the problem]

[0009] A script execution method according to one aspect of the present invention includes: A script execution method in which a host processor causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script in an interpreter language, comprising: the host processor analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are to be executed; the host processor transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table; The structure is as follows.

[0010] Furthermore, a processor according to one aspect of the present invention includes: A processor that causes an accelerator having an operation kernel to execute an operation process on array elements based on a script written in an interpreter language, a generating unit that analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are executed; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; Equipped with The structure is as follows.

[0011] Furthermore, a script execution system according to one aspect of the present invention comprises: A script execution system comprising a host processor and an accelerator having an operation kernel, wherein the host processor causes the accelerator to execute an operation process on an array element based on a script written in an interpreter language, The host processor: a generating unit that analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are executed; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; Equipped with The structure is as follows.

[0012] Furthermore, a program according to one aspect of the present invention includes: A processor that causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script written in an interpreter language, the host processor analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are to be executed; the host processor transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table; Execute the process, The structure is as follows. [Effects of the Invention]

[0013] With the above-described configuration, the present invention can prevent the overhead from increasing when a script written in an interpreter language is executed. [Brief explanation of the drawings]

[0014] [Figure 1] 1 is a block diagram showing a configuration of a script execution system according to a first embodiment of the present invention. [Figure 2] FIG. 2 is a diagram illustrating an example of a script executed by the host processor disclosed in FIG. 1. [Figure 3] 2 is a diagram showing an example of a request table generated by the host processor disclosed in FIG. 1; FIG. [Figure 4] 2 is a diagram illustrating an example of implementation of a kernel control unit included in the accelerator disclosed in FIG. 1. FIG. [Figure 5] FIG. 2 is a diagram illustrating an example of implementation of a calculation kernel included in the accelerator disclosed in FIG. 1. [Figure 6] 2 is a flowchart showing the operation of a host processor and an accelerator that configure the script execution system disclosed in FIG. 1. [Figure 7] 2 is a flowchart showing the operation of the accelerator disclosed in FIG. 1; [Figure 8]10 is a flowchart showing the operation of the script execution system according to the second embodiment of the present invention. [Figure 9] 10 is a flowchart showing the operation of a script execution system according to a third embodiment of the present invention. [Figure 10] FIG. 10 is a block diagram showing the configuration of a processor according to a fourth embodiment of the present invention. [Figure 11] 10 is a flowchart showing the operation of a script execution method according to a fourth embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0015] <Embodiment 1> A first embodiment of the present invention will be described with reference to Figures 1 to 7. Figures 1 to 5 are diagrams for explaining the configuration of a script execution system, and Figures 6 and 7 are diagrams for explaining the operation of the script execution system.

[0016] [composition] As shown in Fig. 1, the script execution system of the present invention includes a host processor 10 and an accelerator 20. The host processor 10 is a device that executes an interpreter language, and is, for example, a device configured with a general-purpose CPU (Central Processing Unit). The accelerator 20 is a device that executes computation requests offloaded from the host processor 10, and is, for example, a GPGPU (General-Purpose Computing on Graphics Processing Units) or a vector processor. The host processor 10 and the accelerator 20 are connected by an interface such as PCI Express.

[0017] In the script execution system of this embodiment, the host processor 10 analyzes an operation request for an array element written in a script written in an interpreter language, and causes an accelerator 20 equipped with an operation kernel 22 to execute the operation process based on the operation request for the array element. As an example, in a processing form equipped with an accelerator, the script execution system can be used as a general-purpose numerical calculation library used in numerical simulations using an interpreter language, AI / BD areas, etc.

[0018] As shown in Fig. 1, the host processor 10 includes a request analysis unit 11, a request table generation unit 12, and a communication unit 13. The functions of the request analysis unit 11, the request table generation unit 12, and the communication unit 13 can be realized by the arithmetic device, which is the host processor 10, executing a program for realizing each function. The accelerator 20 also includes a kernel control unit 21 and multiple computation kernels 22. The kernel control unit 21 and multiple computation kernels 22 can be realized by the arithmetic device, which constitutes the accelerator 20, executing a program for realizing each function. Each component will be described in detail below.

[0019] The request analysis unit 11 (generation unit) of the host processor 10 analyzes a script written in an interpreter language. Specifically, the request analysis unit 11 performs a lazy evaluation of an operation request for an array element, rather than executing the operation request immediately, in the process of sequentially executing the script written in the interpreter language as shown in FIG. 2. The request analysis unit 11 then records information about the lazy evaluated operation request in memory on the host processor 10. For example, the request analysis unit 11 records the address of the operation kernel 22 to be executed on the accelerator 20 side and information about the array used for input and output, as information about the operation request, in memory.

[0020] The request analysis unit 11 then records the information on the calculation requests in the order in which the calculation requests included in the script are detected, that is, in the order in which the calculation requests are executed. The request analysis unit 11 repeats the process of recording the information on the calculation requests as described above until it detects a processing instruction corresponding to a specific trigger from the script. Here, the specific processing instruction corresponding to the trigger is a processing instruction that transfers an array element present on the accelerator 20 side to the host processor 10, and examples of such a processing instruction include an instruction that displays the array element to standard output and an instruction in which the array element is used in a decision statement for a conditional branch. When the request analysis unit 11 detects a specific processing instruction corresponding to the trigger in the host processor 10, processing is transferred to the request table generation unit 12.

[0021] The request table generator 12 (generator) of the host processor 10 converts the information of the operation request group recorded by the request analyzer 11 as described above, and generates a request table that can be interpreted by the accelerator 20. For example, as shown in FIG. 3, the request table includes "reqpackage", "reqoffset", and "numreq".

[0022] The "reqpackage" included in the request table stores information based on multiple computation requests in the order in which the computation requests are executed. The stored information includes, for each computation request, information identifying a computation kernel that executes computation processing based on the computation request and information identifying array elements that are arguments used in the computation processing based on the computation request. The information identifying the computation kernel is, for example, the address of the computation kernel, and the information identifying the array elements is, for example, the starting address, data type, and array length of the array elements. Note that the computation kernel 22 is pre-loaded into the memory of the accelerator 20 as described below, and the host processor 10 knows the address of the computation kernel 22. Furthermore, it is assumed that all array elements used in the computation requests of the script exist in the memory of the accelerator 20, and the host processor 10 can know their starting addresses, data types, and array lengths.

[0023] "reqoffset" included in the request table holds information indicating the division of the information of each operation request stored in "reqpackage", here, the offset address of each request to identify the switching of operation requests. This is because the number of arguments required for each operation kernel is variable. Also, "numreq" in the request table holds the number of operation requests to be executed stored in "reqpackage".

[0024] The communication unit 13 (request unit) of the host processor 10 transfers the request table generated as described above to the memory of the accelerator 20, and then transmits a calculation start signal to the accelerator 20 to request calculation processing based on the request table. The communication unit 13 then waits until the accelerator 20 completes the calculation, and returns to the processing of the request analysis unit 11 when the calculation is completed.

[0025] When the kernel control unit 21 (control unit) of the accelerator 20 receives a calculation start signal from the host processor 10, it reads the request table transferred from the host processor 10 and stored in the memory of the accelerator 20 as described above, and executes the calculation kernels 22 in order based on the request table. When the calculation process by the calculation kernel 22 based on the request table is completed, the kernel control unit 21 returns the calculation result to the host processor 10.

[0026] Here, the calculation kernel 22 executed by the accelerator 20 is a function implemented in a language such as C, C++, or Fortran. FIG. 4 shows an example of the kernel control unit 21 implemented in C, and FIG. 5 shows an example of the calculation kernel for addition and multiplication implemented in C. It is desirable that the types of arguments and return values ​​of the calculation kernel be unified so that the kernel control unit 21 can access the kernel in a general-purpose manner using a function pointer. In the examples shown in FIGS. 4 and 5, the return value uses the void type, but it may also be unified to receive an integer error indicator. However, since variable-length arguments must be passed to the function pointer, the arguments must be received as a void pointer type and argument conversion must be performed within the function.

[0027] [Operation] Next, the operation of the above-mentioned script execution system, that is, the operation of the host processor 10 and accelerator 20, will be explained with reference to the flowcharts of Figures 6 and 7. Here, we consider a case where the script shown in Figure 2 is executed by the host processor 10, and will explain in detail based on the script and the contents of the request table shown in Figure 3.

[0028] First, "x, y, z, tmp, res" in the script shown in FIG. 2 are objects that hold various information (such as the starting address, data type, and length of the array) related to a multidimensional array present in the memory of the accelerator 20. When the request analysis unit 11 of the host processor 10 detects "tmp=x+y" on the first line of the script, it records an operation request to add "x" and "y" and write the result to "tmp" (step S1 in FIG. 6). Next, when the request analysis unit 11 detects "res=tmp*z" on the second line of the script, it records an operation request to multiply "tmp" and "z" and write the result to "res" (step S1 in FIG. 6). Next, when the request analysis unit 11 detects a specific processing instruction on the third line of the script that corresponds to a trigger, such as displaying array elements to standard output (Yes in step S2 in FIG. 6), the processing is transferred to the request table generation unit 12.

[0029] Next, the request table generator 12 of the host processor 10 creates a request table as shown in FIG. 3 in the memory of the host processor 10 based on the information recorded by the request analyzer 11 (step S3 in FIG. 6). The "reqpackage" in the request table stores, for each operation request to be executed, the address of the operation kernel, the starting address of the array elements, which are arguments required for the operation kernel, the data type, the array length, etc. In the example of FIG. 3, the information of the operation request "tmp=x+y" in the first line of the script stores the address of the addition kernel, the addresses of arrays x, y, and tmp, and the array length. Subsequently, the information of the operation request "res=tmp*z" in the second line of the script stores the address of the multiplication kernel, the addresses of arrays tmp, z, and res, and the array length. Furthermore, the "reqoffset" included in the request table stores the offset address of each operation request to identify switching of the operation request. In the example of Figure 3, the offset address "0" of the calculation request in the first line of the script and the offset address "36" of the calculation request in the second line of the script are stored. Also, the number of calculation requests to be executed is stored in "numreq" of the request table. In the example of Figure 3, the number of calculation requests "2" is stored.

[0030] Next, the communication unit 13 of the host processor 10 transfers the generated request table to the memory of the accelerator 20 (step S4 in FIG. 6), and transmits a calculation start signal to the accelerator 20 (step S5 in FIG. 6). Thereafter, the processor 10 waits until the accelerator 20 completes the calculation (step S6 in FIG. 6).

[0031] The kernel control unit 21 of the accelerator 20, which has received a calculation start signal from the host processor 10, reads the request table transferred from the host processor 10 and stored in the memory of the accelerator 20, and executes the calculation kernels in order, the number of which corresponds to the number of calculation requests included in the request table (step S10 in FIG. 6). Specifically, as shown in FIG. 7, the kernel control unit 21 extracts a calculation kernel from the request table (step S11), executes the calculation kernel 22 (step S12), and continues this processing until the calculation requests are completed (step S13).

[0032] Then, the host processor 10 repeats the above-mentioned process until the end of the script (step S7 in FIG. 6).

[0033] As described above, the script execution system of this embodiment can reduce communication overhead by collecting multiple computation requests from the host processor 10 into one and offloading them all at once to the accelerator 20. In other words, without the method of the present invention, multiple computation requests would be issued to the accelerator 20, resulting in communication overhead each time a request is offloaded, but the present invention can solve this problem.

[0034] Furthermore, unlike the present invention, in a processing mode in which operations are offloaded to an accelerator when an operation kernel is detected in the host processor, detecting n operation requests inevitably generates overhead for activating n operation kernels. In contrast, in the present invention, this is reduced to one transfer of the request table and one offload for activating one operation kernel. Therefore, if the following relationship holds, it can be said that the present invention operates at high speed. "Total overhead of (n-1)) offloads > Total time for creating and transferring request tables" The above relationship is considered to hold when n is large.

[0035] <Embodiment 2> Next, a second embodiment of the present invention will be described with reference to Fig. 8. Fig. 8 is a diagram for explaining the processing operation of a script execution system in the second embodiment. The script execution system in this embodiment has almost the same configuration as that described in the first embodiment above, so only the configuration and operation that differ from the first embodiment will be described in detail below.

[0036] As explained above, the present invention can reduce communication overhead when the number of computation kernels 22 executed by the accelerator 20 is large. However, when the number of computation kernels is extremely large (for example, more than 10,000), a significant amount of idle time may occur before the computation request first detected by the host processor 10 is actually executed by the accelerator 20, potentially reducing the availability of the accelerator 20. To solve this problem, in this embodiment, a threshold is set for the number of computation requests recorded by the request analysis unit 11, and when the threshold is exceeded, computations are asynchronously offloaded to the accelerator 20 without waiting for a trigger.

[0037] Specifically, in this embodiment, the request analysis unit 11 of the host processor 10 is added with a process for determining whether the number of calculation requests detected from the script exceeds a preset threshold (step S2' in FIG. 8). Furthermore, in this embodiment, the communication unit 13 of the host processor 10 is added with a process for determining whether to synchronize with the accelerator 20 (step S6' in FIG. 8). In the process for determining whether the number of calculation requests detected from the script exceeds the threshold (step S2' in FIG. 8), the request analysis unit 11 analyzes the script and checks the number of calculation requests recorded. If the number exceeds the threshold (Yes in step S2'), the request analysis unit 11 proceeds to the request table generation process (step S3) without waiting for the trigger detection (skip step S2). In other words, in this embodiment, if the threshold number of calculation requests are detected from the script before the trigger is detected, a request table for the threshold number of calculation requests is created. If the trigger is detected (Yes in step S2) before the number of calculation requests exceeds the threshold (No in step S2'), the process is exactly the same as in the first embodiment described above.

[0038] The process of determining whether or not synchronization with the accelerator 20 is established by the communication unit 13 (step S6' in FIG. 8) is performed according to the following rules. If the request analysis unit 11 detects a trigger (Yes in step S2 of FIG. 8), and a computation offload to the accelerator 20 occurs, the host processor 10 waits until the accelerator 20 completes execution, and then synchronizes (Yes in step S6′ of FIG. 8). If the request analysis unit 11 does not detect a trigger and the number of calculation requests exceeds the threshold (Yes in step S2' in FIG. 8), resulting in calculation offload to the accelerator 20, the process proceeds to the next request analysis step without waiting for the accelerator 20 to complete execution (No in step S6' in FIG. 8). After this, the host processor 10 and the accelerator 20 operate asynchronously until a trigger is detected.

[0039] In this embodiment, the threshold value for the number of computation requests described above is preferably freely changeable at runtime, since the appropriate value may vary depending on the type of accelerator 20 being targeted and the type of computation kernel 22 being executed. Since the present invention assumes implementation in library format, this can be achieved by reading an environment variable at runtime and setting that value as the threshold, or by providing an API for threshold setting. If no value is specified, a default value set in advance on the library side is reflected.

[0040] <Embodiment 3> Next, a third embodiment of the present invention will be described with reference to Fig. 9. Fig. 9 is a diagram for explaining the processing operation of a script execution system in the third embodiment. The script execution system in this embodiment has a configuration almost similar to that described in the second embodiment above, and therefore, only the configuration and operation that differ from the second embodiment will be described in detail below.

[0041] In this embodiment, the request analysis unit 11 is provided with a function for dynamically deciding whether to adopt the execution method of the present invention or the JIT compilation method described above when offloading computation to the accelerator 20. Specifically, when the request analysis unit 11 analyzes and records a computation request included in a script, it checks the number of elements of the array with the largest number of elements among the arrays to be used in the computation request, and determines whether this number of elements exceeds a specific threshold as a branching condition (step S20 in FIG. 9). If the largest number of elements exceeds the specific threshold (Yes in step S20 in FIG. 9), the request analysis unit 11 applies the JIT compilation method (step S21 in FIG. 9), and does not create a request table using the request table generation unit 12. This is because the overhead caused by JIT compilation is absorbed into the computation time as the granularity of the computation increases.

[0042] On the other hand, if the maximum number of elements does not exceed a specific threshold (No in step S20 of FIG. 9), the granularity of the calculation becomes small and the overhead due to JIT compilation cannot be ignored. Therefore, as described above, the request table is generated by the request table generation unit 12 (step S3 of FIG. 9), and the calculation requests are packaged and offloaded in a batch as described above. In other words, in this embodiment, a request table is created only if the maximum number of elements in the array elements used in the calculation requests included in the script is equal to or less than the threshold. Here, since it is desirable that the threshold for the branching condition can be freely set, as in embodiment 2, an environment variable or a setting API is similarly provided. Note that the explanation of the dynamic binary generation method using the JIT compilation method is left to prior art documents.

[0043] <Embodiment 4> Next, a fourth embodiment of the present invention will be described with reference to Fig. 10 and Fig. 11. Fig. 10 is a block diagram showing the configuration of a processor in the fourth embodiment, and Fig. 11 is a flowchart showing the operation of the processor. Note that this embodiment shows an outline of the configuration of the host processor 10 and the script execution method described in the above embodiments.

[0044] 10, the processor 100 in this embodiment can execute a program to construct and equip a generating unit 101 and a requesting unit 102. The program may be stored in a memory equipped in the processor 100, or may be supplied to the processor via a communication network, for example.

[0045] Then, the processor 100 executes the script execution method shown in the flowchart of FIG. 11 by using the functions of the generating unit 101 and the requesting unit 102 that are constructed by the program as described above.

[0046] As shown in FIG. 11, the processor 100 As a script execution method in which a processor 100 causes an accelerator 110 having an operation kernel 111 to execute an operation process on array elements based on a script in an interpreter language, The script is analyzed, and a request table is generated in which information based on a plurality of operation requests included in the script is stored in the order in which the operation requests are executed (step S101); The generated request table is transmitted to the accelerator 110, and a request is made to the accelerator 110 to perform a calculation process based on the request table (step S102). The following process is executed.

[0047] With the present invention configured as described above, a request table that aggregates multiple operation requests included in a script written in an interpreter language from the host processor 10 is offloaded in bulk to the accelerator 20, and operation processing based on the request table is executed by the accelerator 20. This makes it possible to reduce the overhead associated with operation processing of the script.

[0048] The above-described program can be stored in various types of non-transitory computer-readable media and supplied to a computer (processor). Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic storage media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical storage media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, and RAMs (Random Access Memory)). The program may also be supplied to a computer by various types of transitory computer-readable media. Examples of transitory computer-readable media include electrical signals, optical signals, and electromagnetic waves. The transitory computer-readable media can supply the program to a computer via a wired communication path such as an electric wire or optical fiber, or via a wireless communication path.

[0049] Although the present invention has been described above with reference to the above-described embodiments, the present invention is not limited to the above-described embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. Furthermore, at least one or more functions of the above-described generating unit and requesting unit may be executed by an information processing device installed and connected anywhere on a network, i.e., may be executed by so-called cloud computing.

[0050] <Additional Notes> A part or all of the above-described embodiments can also be described as follows: Below, an outline of the configurations of the script execution method, processor, script execution system, and program of the present invention will be described. However, the present invention is not limited to the following configurations. (Appendix 1) A script execution method in which a host processor causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script in an interpreter language, comprising: the host processor analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are to be executed; the host processor transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table; How to run the script. (Appendix 2) 2. The script execution method according to claim 1, further comprising: the host processor generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined specific processing command is detected from the script; How to run the script. (Appendix 3) 3. The script execution method according to claim 2, further comprising: the host processor generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a processing instruction for raising the array elements present in the accelerator to the host processor is detected from the script; How to run the script. (Appendix 4) 4. A script execution method according to any one of Supplementary Note 1 to 3, the host processor generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a preset number of the operation requests are detected from the script; How to run the script. (Appendix 5) 5. A script execution method according to any one of Supplementary Note 1 to 4, the host processor generates the request table including information indicating a division of information based on each operation request in the request table for each operation request; How to run the script. (Appendix 6) 6. A script execution method according to any one of Supplementary Notes 1 to 5, the host processor generates the request table including information representing the number of the operation requests in the request table; How to run the script. (Appendix 7) 7. A script execution method according to any one of Supplementary Notes 1 to 6, comprising: the host processor stores information based on the operation request in the request table and generates the request table only when the number of array elements used in the operation request included in the script is equal to or less than a preset threshold value; How to run the script. (Appendix 7.1) 8. A script execution method according to any one of Supplementary Notes 1 to 7, comprising: the host processor generates the request table including information specifying the computation kernel that executes computation processing based on the computation request; How to run the script. (Appendix 7.2) 8. A script execution method according to any one of Supplementary Notes 1 to 7, comprising: the host processor generates the request table including information specifying array elements to be used in the operation processing based on the operation request; How to run the script. (Appendix 7.3) 8. A script execution method according to any one of Supplementary Notes 1 to 7, comprising: the accelerator activates the computing kernels to execute computing processes based on the request table in the order stored in the request table; How to run the script. (Appendix 8) A processor that causes an accelerator having an operation kernel to execute an operation process on array elements based on a script written in an interpreter language, a generating unit that analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are executed; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; A processor with (Appendix 8.1) 9. The processor of claim 8, the generating unit generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined specific processing command is detected from the script. Processor. (Appendix 8.2) 8.1. The processor of claim 1, the generation unit generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a processing instruction for raising the array elements present in the accelerator to the processor is detected from the script. Processor. (Appendix 8.3) 1. A processor according to any one of clauses 8 to 8.2, comprising: the generation unit generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a preset number of the operation requests are detected from the script. Processor. (Appendix 8.4) 8. A processor according to any one of Clauses 8 to 8.3, comprising: the generation unit generates the request table including information indicating a division of information based on each of the operation requests in the request table. Processor. (Appendix 8.5) 8. A processor according to any one of Clauses 8 to 8.4, comprising: the generation unit generates the request table including information indicating the number of the operation requests in the request table. Processor. (Appendix 8.6) 1. A processor according to any one of clauses 8 to 8.5, comprising: the generation unit stores information based on the operation request in the request table and generates the request table only when the number of array elements used in the operation request included in the script is equal to or less than a preset threshold. Processor. (Appendix 8.7) 8. A processor according to any one of Clauses 8 to 8.6, comprising: the generation unit generates the request table including information for identifying the computation kernel that executes computation processing based on the computation request. Processor. (Appendix 8.8) 8. A processor according to any one of Clauses 8 to 8.7, comprising: the generation unit generates the request table including information for identifying array elements used in the arithmetic processing based on the arithmetic request. Processor. (Appendix 9) A script execution system comprising a host processor and an accelerator having an operation kernel, wherein the host processor causes the accelerator to execute an operation process on an array element based on a script written in an interpreter language, The host processor: a generating unit that analyzes the script and generates a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are executed; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; Equipped with Script execution system. (Appendix 9.1) 10. The script execution system according to claim 9, the accelerator includes a control unit that activates the computing kernels to execute computing processes based on the request table in the order stored in the request table; Script execution system. (Appendix 10) A processor that causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script written in an interpreter language, Analyzing the script, and generating a request table that stores information based on a plurality of operation requests included in the script in the order in which the operation requests are executed; transmitting the generated request table to the accelerator and requesting the accelerator to perform a calculation process based on the request table; A program for executing a process. [Explanation of symbols]

[0051] 10 Host Processor 11 Request Analysis Unit 12 Request table generation unit 13 Communications Department 20 Accelerators 21 Kernel control section 22 Arithmetic Kernel 100 processors 101 Generation part 102 Request part 110 Accelerator 111 Arithmetic Kernel

Claims

1. A script execution method in which a host processor causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script in an interpreter language, comprising: When the host processor analyzes the script and generates a request table storing information based on a plurality of operation requests included in the script in the order of execution of the operation requests, the host processor generates the request table storing information based on the operation requests included in the script in the order of execution of the operation requests until a predetermined specific processing command is detected from the script, the host processor transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table; How to run the script.

2. A script execution method in which a host processor causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script in an interpreter language, comprising: When the host processor analyzes the script and generates a request table storing information based on a plurality of operation requests included in the script in the order of execution of the operation requests, the host processor generates the request table storing information based on the operation requests included in the script in the order of execution of the operation requests until a predetermined number of the operation requests are detected from the script, the host processor transmits the generated request table to the accelerator and requests the accelerator to perform arithmetic processing based on the request table; How to run the script.

3. 3. The script execution method according to claim 1, further comprising: the host processor generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a processing instruction for raising the array elements present in the accelerator to the host processor is detected from the script; How to run the script.

4. 4. A script execution method according to claim 1, further comprising: the host processor generates the request table including information indicating a division of information based on each operation request in the request table for each operation request; How to run the script.

5. 5. A script execution method according to claim 1, further comprising: the host processor generates the request table including information representing the number of the operation requests in the request table; How to run the script.

6. 6. A script execution method according to claim 1, further comprising: the host processor stores information based on the operation request in the request table and generates the request table only when the number of array elements used in the operation request included in the script is equal to or less than a preset threshold value; How to run the script.

7. A processor that causes an accelerator having an operation kernel to execute an operation process on array elements based on a script written in an interpreter language, a generating unit that analyzes the script, and when generating a request table in which information based on a plurality of operation requests included in the script is stored in the execution order of the operation requests, generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined specific processing command is detected from the script; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; A processor with

8. A processor that causes an accelerator having an operation kernel to execute an operation process on array elements based on a script written in an interpreter language, a generating unit that analyzes the script, and when generating a request table in which information based on a plurality of operation requests included in the script is stored in the execution order of the operation requests, generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined number of the operation requests are detected from the script; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; A processor with

9. A script execution system comprising a host processor and an accelerator having an operation kernel, wherein the host processor causes the accelerator to execute an operation process on an array element based on a script written in an interpreter language, The host processor: a generating unit that analyzes the script, and when generating a request table in which information based on a plurality of operation requests included in the script is stored in the execution order of the operation requests, generates the request table in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined specific processing command is detected from the script; a request unit that transmits the generated request table to the accelerator and requests the accelerator to perform a calculation process based on the request table; Equipped with Script execution system.

10. A processor that causes an accelerator having an arithmetic kernel to execute arithmetic processing on array elements based on a script written in an interpreter language, When analyzing the script and generating a request table in which information based on a plurality of operation requests included in the script is stored in the execution order of the operation requests, the request table is generated in which information based on the operation requests included in the script is stored in the execution order of the operation requests until a predetermined specific processing command is detected from the script, transmitting the generated request table to the accelerator and requesting the accelerator to perform a calculation process based on the request table; A program for executing a process.

Citation Information

Patent Citations

  • Inverse matrix calculation device and inverse matrix calculation processing method

    JP2020091691A

  • Method and device for matrix multiplication optimization using vector registers

    US20210286860A1