WO2022239334A1 - プログラム実行装置、解析方法、実行方法 - Google Patents

プログラム実行装置、解析方法、実行方法 Download PDF

Info

Publication number
WO2022239334A1
WO2022239334A1 PCT/JP2022/004769 JP2022004769W WO2022239334A1 WO 2022239334 A1 WO2022239334 A1 WO 2022239334A1 JP 2022004769 W JP2022004769 W JP 2022004769W WO 2022239334 A1 WO2022239334 A1 WO 2022239334A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution
program
parameter
parameters
execution pattern
Prior art date
Application number
PCT/JP2022/004769
Other languages
English (en)
French (fr)
Inventor
裕司 大石
一 芹沢
Original Assignee
日立Astemo株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Publication of WO2022239334A1 publication Critical patent/WO2022239334A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W60/00Drive control systems specially adapted for autonomous road vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to a program execution device, analysis method, and execution method.
  • Patent Literature 1 discloses a storage unit that stores a program having as components a task including one execution condition and processing under the execution condition, are obtained, and the tasks are arranged in order of the difference between the longest processing time and the shortest processing time for each task of the processing time, and a predetermined number of the tasks from the task with the largest difference are set as the change tasks, and the change an analysis target extracting unit that determines a task other than a task as a fixed task and stores the determined result in the storage unit; and for the variable task, calculates the processing time of the variable task for each execution condition, For the fixed task, the processing time of the fixed task under the execution condition that maximizes the processing time of the task is calculated as the processing time of the parallelization schedule of the parallel processing unit having a plurality of processing units.
  • a parallelization scheduling device is disclosed that includes a scheduling unit that performs calculation and an output unit that outputs the parallelization schedule with the shortest
  • a program execution device is a program execution device for executing tasks included in a program in parallel, comprising: an acquisition unit for acquiring run-time parameters, which are parameters for executing the program; an execution pattern information storage unit that stores execution pattern information, which is a list of combinations of execution patterns that are patterns for executing the task, corresponding to runtime parameters; an execution unit that selects the execution pattern corresponding to the runtime parameter and executes the program according to the selected execution pattern.
  • the analysis method according to the second aspect of the present invention comprises analyzing a program to divide it into a plurality of tasks with dependencies clarified, and reading parameter information including a plurality of parameter sets that are combinations of key parameters and dependent parameters.
  • An execution method is an execution method executed by a program execution device that executes tasks included in a program in parallel, the execution method comprising acquiring run-time parameters, which are parameters for executing the program. Reading execution pattern information, which is a list of combinations of execution patterns that are patterns for executing the task, corresponding to the runtime parameters; and referring to the execution pattern information and corresponding to the obtained runtime parameters. selecting the execution pattern to execute and executing the program according to the selected execution pattern.
  • a program execution pattern can be selected according to parameters during program execution.
  • Functional configuration diagram of a program execution system in the first embodiment A diagram showing the hardware configuration of the analysis device and the execution device A diagram showing an example of parameter information in the first embodiment A diagram explaining an assumed example of a parameter set Diagram showing an example of execution cost information Diagram showing an example of execution pattern information Flowchart showing processing by analysis device A visual representation of the macrotask graph Diagram showing an example of temporary source code Flowchart detailing the grouping process A flowchart detailing the embedding process Source code showing an example of processing in step S120 Source code showing a first example of processing in step S121 Source code showing a second example of processing in step S121 4 is a flowchart showing program execution processing by the execution unit of the execution device 3; Diagram showing an operation example of the image processing program Functional configuration diagram of a program execution system in the second embodiment Conceptual diagram showing radar detection range A diagram showing an example of parameter information in the second embodiment Functional configuration diagram of a program execution system in the third embodiment Schematic of anterior image Diagram showing measurement range of radar and front camera A diagram showing an example of parameter information in the third embodiment
  • FIG. 1 An image processing program is a processing target of this system.
  • an example of the source code of the program is described in C language grammar, but any programming language may be used.
  • FIG. 1 is a functional configuration diagram of a program execution system S1 that executes an image processing program.
  • a program execution system S1 includes an analysis device 2 and an execution device 3 .
  • the execution device 3 is mounted on the own vehicle 1, and a camera 81 is also mounted on the own vehicle 1 in addition to the execution device 3. - ⁇
  • the camera 81 outputs an image obtained by photographing (hereinafter referred to as a “camera image”) to the execution device 3 .
  • the camera 81 can photograph the entire surroundings of the own vehicle 1, that is, 360 degrees.
  • the analysis device 2 includes a task division section 21 , an execution pattern generation section 22 , a compiler 26 , a pre-communication section 28 and a pre-storage section 29 .
  • the execution device 3 includes an input unit 33 , an environment information acquisition unit 34 , an execution unit 35 , an execution communication unit 38 and an execution storage unit 39 .
  • the pre-storage unit 29 stores parameter information 41, execution cost information 42, execution pattern information 43, source code 44, and image processing program 45. However, the parameter information 41 and the source code 44 are stored in the prestorage unit 29 before the analysis device 2 executes the processing described later.
  • the execution cost information 42 and the execution pattern information 43 are generated by the execution pattern generator 22 and the image processing program 45 is generated by the compiler 26 .
  • the source code 44 is source code of a program for recognizing an object from the camera image output by the camera 81 .
  • An image processing program 45 is stored in the execution storage unit 39 .
  • the image processing program 45 stored in the prestorage unit 29 and the execution storage unit 39 is the same, and the image processing program 45 created by the analysis device 2 is copied to the execution device 3 .
  • the preliminary communication unit 28 and the execution communication unit 38 may be used, or a portable auxiliary storage device (not shown) may be used.
  • the image processing program 45 includes parameter information 41 .
  • the task dividing unit 21 analyzes the source code 44 and creates a macrotask graph. Since the processing of the execution pattern generation unit 22 is diversified, it will be described in detail later.
  • the compiler 26 compiles the source code 44 and a source code (to be described later) to generate an image processing program 45 .
  • the preliminary communication unit 28 is a communication module that communicates with the execution device 3 by wire or wirelessly.
  • the prestorage unit 29 is a nonvolatile storage device.
  • the input unit 33 receives an input operation from the user who uses the execution device 3 .
  • the input unit is, for example, a button or a touch panel, and in the present embodiment, an instruction to specify the operation mode of own vehicle 1 is given.
  • the operation mode of the own vehicle 1 includes, for example, a high-speed driving mode for driving on a highway, an automatic parking mode for parking at a predetermined parking position, and the like.
  • the environment information acquisition unit 34 is an interface that acquires an image captured by the camera 81 .
  • the execution unit 35 has two arithmetic cores and executes the image processing program 45 .
  • the execution communication unit 38 is a communication module that communicates with the analysis device 2 by wire or wirelessly.
  • the execution storage unit 39 is a non-volatile storage device.
  • FIG. 2 is a diagram showing the hardware configuration of the analysis device 2 and the execution device 3.
  • the hardware representing the analysis device 2 and the execution device 3 is named "arithmetic device" for convenience.
  • the arithmetic unit 9 includes a CPU 91 as a central processing unit, a ROM 92 as a read-only storage device, a RAM 93 as a readable/writable storage device, a communication device 94 and an auxiliary storage device 95 .
  • the CPU 91 expands the program stored in the ROM 92 to the RAM 93 and executes it to perform the calculations described later.
  • these operations are realized by FPGA (Field Programmable Gate Array), which is a rewritable logic circuit, and ASIC (Application Specific Integrated Circuit), which is an application-specific integrated circuit, instead of the combination of CPU 91, ROM 92, and RAM 93.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • the arithmetic unit 9 may be implemented by a combination of different configurations, for example, a combination of the CPU 91, the ROM 92, the RAM 93, and an FPGA instead of the combination of the CPU 91, the ROM 92, and the RAM 93.
  • the communication device 94 is a communication module that performs wireless or wired communication.
  • a communication device 94 implements the prior communication unit 28 and the execution communication unit 38 .
  • Auxiliary storage device 95 is a non-volatile storage device such as a hard disk drive or flash memory.
  • Auxiliary storage device 95 implements pre-storage unit 29 and execution storage unit 39 .
  • FIG. 3 is a diagram showing an example of the parameter information 41.
  • the parameter information 41 consists of a plurality of records, each record containing a set name, key parameters and dependent parameters. Each record of the parameter information 41 is hereinafter also referred to as a "parameter set”. Therefore, since the parameter information 41 has a plurality of parameter set information, it can also be called “parameter set information”.
  • a set name is an identifier that identifies each record of the parameter information 41 .
  • Key parameters are combinations of parameters and parameter values that serve as guidelines for selecting parameter sets.
  • Dependent parameters are combinations of parameters and parameter values used to calculate the cost of performing a computation. In the following description, key parameters are sometimes called "execution parameters”.
  • the key parameter is "Mode”. It also shows that "Set1" on the first line is selected when this key parameter is "high_speed”, and “Set2" on the second line is selected when this key parameter is "auto_park”. As for the dependent parameters, N is “2” and V is “50” in “Set1”, and N is “8” and V is “5" in “Set2”. These parameter information 41 are created in advance assuming the situation. A specific example will be described.
  • FIG. 4 is a diagram explaining an assumed example of a parameter set, specifically showing recognition targets using camera images during high-speed driving and automatic parking.
  • FIG. 4(a) shows high-speed driving
  • FIG. 4(b) shows automatic parking.
  • a camera for capturing an image to be subjected to recognition processing is mounted on the own vehicle 1 .
  • a preceding vehicle 2a exists in front of the vehicle 1 traveling at high speed
  • a left lane marking line 3a exists to the left of the vehicle 1
  • a right lane marking line 3b exists to the right of the vehicle 1.
  • the speed "V" is "50".
  • the closest positions of the left and right lane markings can be recognized from the photographed image. That is, in this case, the number N of recognition objects is "2" of the codes 4a and 4b.
  • the own vehicle 1 is trying to park in the parking frame, and there are a forward vehicle 2c and a backward vehicle 2b around it. Since the host vehicle is traveling at a low speed, for example, "5" kilometers per hour, the speed "V" is "5".
  • the number of objects to be recognized is "8" in total of the four corners of the parking frame where the vehicle 1 is parked and the approximate center of the long side (4d to 4i), the edge 4j of the front vehicle 2c, and the edge 4c of the rear vehicle 2b. becomes “N". In this way, the parameter set has subordinate parameters set in advance assuming each situation.
  • FIG. 5 is a diagram showing an example of the execution cost information 42.
  • the execution cost information 42 indicates execution costs for each task and each parameter set. In the example shown in FIG. 5, the larger the value of the execution cost, the higher the cost and the longer the execution time.
  • FIG. 6 is a diagram showing an example of the execution pattern information 43.
  • the execution pattern information 43 indicates a task execution pattern for each parameter set.
  • the execution pattern is the assignment of tasks to each core and the execution order of the tasks.
  • the parameter set "Set1" causes core 1 to execute tasks in the order "1, 2, 6, 9, 8, 10" and core 2 to execute tasks in the order "3, 5, 4, 7". It is shown that Note that, as shown in FIG. 6, the execution pattern information 43 also includes execution patterns in other cases that are not described in the parameter information 41 .
  • step S100 the task dividing unit 21 of the analysis device 2 reads the source code 44 and acquires a macrotask graph that extracts parallelism between tasks.
  • FIG. 8 is a diagram visually showing the macrotask graph.
  • the example shown in FIG. 8 shows the correlation of each task indicated by numbers 1 to 10, and indicates that tasks 2 and 3 can be executed in parallel after task 1. In FIG. It also shows that the last task 10 can be executed when all of tasks 7, 8 and 9 are completed.
  • the execution pattern generation unit 22 reads the parameter information 41.
  • the processing up to S102E is repeated for all parameter sets described in the parameter information 41.
  • step S103 the execution pattern generation unit 22 generates temporary source code using the parameter set to be processed.
  • the value of the dependent parameter is also used here.
  • FIG. 9 is a diagram showing an example of temporary source code.
  • Temporary source code is source code used in combination with source code 44, and values are set for variables.
  • the example shown in FIG. 9A is the case of using "Set1"
  • the example shown in FIG. 9B is the case of using "Set2". In either case, the values of key and dependent parameters are set as variables.
  • the execution pattern generation unit 22 calculates the cost of each task for the parameter set to be processed using the source code 44 and the temporary source code created in step S103, and adds the cost to the execution cost information 42.
  • the execution pattern generation unit 22 integrates the temporary source code into the source code 44, compiles and links, reads and executes the generated binary file, and measures the execution time.
  • the execution pattern generation unit 22 may prepare dummy data to be processed as necessary, and the execution time may be measured only once or may be an average value of a plurality of times.
  • the execution pattern generator 22 uses the macrotask graph created in step S100 and the execution cost information 42 created in step S104 to create an execution pattern for the parameter set to be processed. Specifically, the execution pattern generator 22 determines the cores to execute the tasks and the order of execution so that the execution time of the program is minimized.
  • the execution pattern generator 22 may allocate each task to a core so as to minimize the total waiting time for waiting for completion of dependent tasks, or randomly allocate each task to a core for execution. You may find the combination that minimizes the time.
  • the execution pattern generation unit 22 changes the parameter set to be processed when there is a parameter set not to be processed, returns to step S103, and sets all parameter sets to be processed. goes to step S106.
  • step S106 the execution pattern generation unit 22 writes each of the execution patterns created in step S105 executed multiple times into the pre-storage unit 29 as the execution pattern information 43.
  • step S107 the execution pattern generation unit 22 groups the execution pattern information 43, and in the following step S108, embedding processing is performed, and the processing shown in FIG. 7 ends. Details of step S107 will be described with reference to FIG. 10, and details of step S108 will be described with reference to FIG.
  • FIG. 10 is a flowchart showing details of the grouping process shown in step S107 of FIG.
  • step S110 the execution pattern information 43 is searched for a parameter set that has the same execution pattern.
  • step S111 the execution pattern generation unit 22 repeats the processing up to step S111E for each combination of parameter sets searched in step S110. Specifically, the execution pattern generation unit 22 sequentially processes the same retrieved parameter sets, and performs the process of step S112.
  • FIG. 11 is a flowchart showing details of the embedding process shown in step S108 of FIG.
  • the execution pattern generation unit 22 generates source code that functions the processing of each core in each pattern.
  • FIG. 12 is a source code showing an example of processing in step S120.
  • the function "pattern1_core1” executes tasks 1, 2, 6, 9, 8, and 10 in order
  • the function "pattern1_core2” executes tasks 3, 5, 4, and 7 in order. is shown. Note that in FIG. 12, the processing of each task is indicated by the name of the task for convenience of drawing.
  • FIG. 13 is a source code showing a first example of processing in step S121
  • FIG. 14 is a source code showing a second example of processing in step S121.
  • a source code may be generated that obtains an integer value based on the value of a key parameter using control by a switch statement and selects a function to be executed using that integer value as an index.
  • a source code may be generated that specifies the value of a key parameter using an if statement and selects a function to be executed.
  • the image processing program 45 is built using the source code 44 and the source code generated in steps S120 and S121. That is, a set of source codes is compiled, a library is linked to the generated object file as required to generate the image processing program 45, and the processing shown in FIG. 11 is completed. That is, since the image processing program 45 is generated using not only the source code 44 but also the source code generated using the execution pattern information 43, it is assumed that the image processing program 45 includes the execution pattern information 43. can be regarded as
  • FIG. 15 is a flowchart showing program execution processing by the execution unit 35 of the execution device 3.
  • step S ⁇ b>200 the execution unit 35 acquires execution pattern information 43 .
  • the image processing program 45 includes the execution pattern information 43
  • this step is executed by the execution unit 35 reading the image processing program 45.
  • step S201 the execution unit 35 acquires runtime parameters. Specifically, the value of the key parameter in the execution pattern information 43 read in step S200 is obtained.
  • the user's specification of the operation mode of the own vehicle, which is input to the input unit 33, is read.
  • the execution unit 35 selects a runtime pattern based on the value of the key parameter. For example, in the example of FIG. 14, an execution pattern is selected by selecting a function by branching an If statement based on the value of the key parameter assigned to the variable "Mode.”
  • the execution unit 35 executes the task of object recognition processing with the execution pattern selected in step S202, and ends the processing shown in FIG.
  • FIG. 16 is a diagram showing an operation example of the image processing program 45 by the execution device 3.
  • the upper part of FIG. 16 shows the case of high-speed driving, and the lower part of FIG. 16 shows the case of automatic parking.
  • the upper section shows the case where the execution pattern is fixed, and the lower section shows the case where the execution pattern is used depending on the situation.
  • the upper part corresponds to the case where the contrivance in the present embodiment is not applied, and the lower part corresponds to the case in which the contrivance in the present embodiment is applied.
  • the horizontal axis of each graph is time.
  • the execution time of each task in each operation mode in the analysis device 2 is merely a prediction using presupposed dependent parameters. Therefore, it cannot be denied that there may be a difference from the actual processing time, and some waiting time may occur. However, there is a possibility that the program execution time will be shorter if the execution pattern is switched assuming a situation corresponding to the key parameter than if the fixed execution pattern is used as shown in the upper part and the lower part of FIG. is very high, and the effect of shortening the processing time can be obtained.
  • the execution device 3 executes tasks included in the image processing program 45 in parallel.
  • the execution device 3 has an input unit 33 that functions as an acquisition unit that acquires the operation mode of the host vehicle 1, which is a runtime parameter, and a list of combinations of execution patterns that are patterns for executing tasks that correspond to the runtime parameters.
  • the execution unit 35 includes multiple cores that execute programs.
  • the execution pattern is the allocation of tasks to cores and the execution order of tasks. Therefore, it is possible to change the assignment of tasks to cores and the order in which tasks are executed according to the situation at the time of execution.
  • the execution device 3 is mounted on the own vehicle 1 .
  • a run-time parameter is the operating mode of the vehicle.
  • the input unit 33 determines runtime parameters based on an input operation by the user of the own vehicle 1 . Therefore, the program task execution pattern can be changed according to the operation mode of the vehicle specified by the user.
  • the analysis method executed by the analysis device 2 includes, as shown in step S100 in FIG. 7, analyzing the source code of the image processing program 45 and dividing it into a plurality of tasks whose dependencies are clarified; As shown in step S101 in FIG. 7, reading parameter information including a plurality of parameter sets that are combinations of key parameters and dependent parameters, and executing each task for each parameter set as shown in step S104 Calculating the cost, and calculating the task execution pattern for each parameter set based on the dependencies and the execution cost, as shown in step S105.
  • Key parameters and dependent parameters are variables contained in the source code of image processing program 45 .
  • the analysis method executed by the analysis device 2 integrates the information of the execution pattern for each calculated parameter set with the source code of the program, compiles it, and can be executed. Including generating files.
  • the analysis method executed by the analysis device 2 includes information on the execution pattern for each calculated parameter set, program source code, and information on key parameters. and compiling to generate an executable file. Therefore, the image processing program 45, which is an executable file, contains all the necessary information and is integrated with the source code so that it can be processed efficiently.
  • a key parameter is a parameter for determining a situation when executing a program.
  • a dependent parameter is a representative parameter value that is measured in the context determined by the key parameter.
  • the execution pattern information 43 is taken in as the source code of the image processing program 45, so to speak, hard coded.
  • the program whose execution pattern is to be changed and the execution pattern information 43 may be separately provided to the execution device 3, or only the key parameter information may be provided separately from the image processing program 45.
  • the analysis device 2 when the program whose execution pattern is to be changed and the execution pattern information 43 are separately provided to the execution device 3, the following configuration is possible.
  • the analysis device 2 generates an image processing program 45 in which tasks to be executed by each core and their order can be freely changed according to arguments at the time of execution.
  • the analysis device 2 then sends the image processing program 45 and the execution pattern information 43 to the execution device 3 .
  • the execution device 3 determines an execution pattern by referring to the execution pattern information 43 and key parameter values, and executes the image processing program 45 with the tasks to be assigned to each core in the determined execution pattern and their order as arguments.
  • the analysis device 2 generates an image processing program 45 that includes execution pattern information in advance and switches the execution pattern according to an argument, and transmits the image processing program 45 together with key parameter information that is not included in the image processing program 45 to the execution device 3 .
  • the execution device When executing the image processing program 45 , the execution device first determines arguments to be given to the image processing program 45 using key parameter information, and executes the image processing program 45 with the determined arguments.
  • the execution pattern information 43 can be transmitted to the execution device 3 in various forms and used for switching execution patterns.
  • the execution device 3 has two arithmetic cores.
  • the execution device 3 may have three or more arithmetic cores, and the arithmetic performance of the arithmetic cores may be asymmetrical.
  • the CPU is shown as the hardware for executing the image processing program 45, but the image processing program 45 may be executed using a coprocessor, accelerator, FPGA, or the like.
  • the execution pattern includes both the allocation of tasks to cores and the execution order of tasks.
  • the execution pattern may be either the allocation of tasks to cores or the execution order of tasks.
  • the execution pattern may only dictate the assignment of tasks to cores, and the order of task execution may be determined at run time.
  • FIG. 17 to 19 A second embodiment of the program execution device will be described with reference to FIGS. 17 to 19.
  • FIG. 17 the same components as those in the first embodiment are assigned the same reference numerals, and differences are mainly described. Points that are not particularly described are the same as those in the first embodiment.
  • This embodiment differs from the first embodiment mainly in that the present invention is applied to a program for processing radar output.
  • FIG. 17 is a functional configuration diagram of the program execution system S2.
  • the host vehicle 1 is equipped with a rain sensor 82 and a radar 83 in addition to the execution device 3 .
  • Rain sensor 82 and radar 83 output sensing information to execution device 3 .
  • the rain sensor 82 is a sensor that detects rain, and outputs the probability of rain or the amount of rain as a numerical value.
  • the rainfall sensor 82 outputs a smaller numerical value as the rainfall is more certain or as the amount of rainfall increases.
  • Radar 83 is, for example, a millimeter wave radar, and detects the presence or absence of an obstacle in a predetermined angular range in front of own vehicle 1 .
  • the radar 83 also has a self-diagnostic function, and when it determines that it is out of order, it outputs that fact.
  • the radar processing program 45A is stored in the pre-storage unit 29 and the execution storage unit 39.
  • the radar processing program 45A is a program for processing the output of the radar 83.
  • FIG. Also, the source code 44A stored in the prestorage unit 29 is the source code of a program for detecting obstacles from the output of the radar 83.
  • FIG. Source code 44A also includes multiple filter algorithms.
  • FIG. 18 is a conceptual diagram showing the detection range of the radar 83.
  • the radar can detect obstacles over a long distance in fine weather.
  • the radar is attenuated by the rain, and the distance at which obstacles can be detected is theoretically shortened.
  • noise increases in rainy weather, it is necessary to use a more complicated filter algorithm than in sunny weather.
  • the algorithm of radar processing program 45A is changed according to the presence or absence of rainfall and the presence or absence of failure of radar 83 .
  • FIG. 19 is a diagram showing an example of parameter information 41A in this embodiment.
  • the key parameters also called run-time parameters, are the output of the rain sensor 82 and whether the radar 83 is faulty or not. For example, if the radar 83 is out of order regardless of the output of the rainfall sensor 82, it corresponds to "Set3". When the radar 83 is not out of order, if the output of the rainfall sensor 82 is greater than "10", it corresponds to "Set 1", and if it is less than "10", it corresponds to "Set 2".
  • the execution pattern generator 22 calculates the execution cost of each task using the source code 44A and dependent parameters of each parameter set shown in FIG. Generate information 43A. Further, the execution pattern generator 22 generates source code as described in the first embodiment with reference to FIG. 11, and causes the compiler 26 to build the radar processing program 45A. The details of each process are the same as those in the first embodiment, so description thereof will be omitted.
  • the radar processing program 45A processes radar output.
  • a key parameter is the probability of rainfall, or the degree of rainfall. Therefore, the task execution pattern of the radar processing program 45A can be changed according to the rainfall situation.
  • a key parameter is a parameter that determines the situation when the program is executed.
  • a dependent parameter is the value of the parameter used in the program in the context determined by the key parameter.
  • FIG. 20 to 23 A third embodiment of the program execution device will be described with reference to FIGS. 20 to 23.
  • FIG. In the following description, the same components as those in the first embodiment are assigned the same reference numerals, and differences are mainly described. Points that are not particularly described are the same as those in the first embodiment.
  • This embodiment differs from the first embodiment mainly in that the present invention is applied to a sensor fusion program.
  • FIG. 20 is a functional configuration diagram of the program execution system S3.
  • the own vehicle 1 is equipped with a radar 83 , an ambient light sensor 84 and a front camera 85 in addition to the execution device 3 .
  • Radar 83 , ambient light sensor 84 , and front camera 85 output sensing information to execution device 3 .
  • Radar 83 is as described in the second embodiment.
  • the ambient light sensor 84 measures the brightness around the vehicle 1 .
  • the front camera 85 transmits an image obtained by photographing the front of the vehicle 1 (hereinafter referred to as a “front image”) to the execution device 3 .
  • FIG. 21 is a schematic diagram of a forward image.
  • the upper part of FIG. 21 shows the daytime front image D, which is the front image obtained during the daytime, and the lower part of FIG. 21 shows the nighttime front image N, which is the front image obtained at night.
  • the daytime front image D and the nighttime front image N are taken at the same position and in the same situation with the surrounding vehicles, and only the brightness of the surroundings is different.
  • FIG. 22 is a diagram showing the measurement ranges of the radar 83 and the front camera 85.
  • FIG. 22(a) shows the measurement range during the daytime
  • FIG. 22(b) shows the measurement range during the nighttime.
  • the viewing angle of the forward camera 85 is wider than that of the radar 83 .
  • the measurement range of the front camera 85 is wider during the day than during the night. This is shown in FIG. 22 as 50a and 50b.
  • the measurement range of the radar 83 is wider at night than during the day. This is shown in FIG. 22 as 51a and 51b.
  • FIG. 23 is a diagram showing an example of parameter information 41B in this embodiment.
  • the key parameter is the value of brightness Li.
  • the output of the environmental image sensor 84 may be used, or the average value of the brightness of the forward image may be used.
  • the brightness Li is greater than the threshold "10"
  • daytime corresponds to "Set1”
  • the brightness Li is less than or equal to the threshold "10"
  • nighttime corresponds to "Set2”.
  • the dependent parameters in the parameter information 41B are the parameter Ca and the parameter Ra in sensor fusion.
  • the parameter Ca is a parameter that determines the distance of the subject included in the front image, which is the measurement result of the front camera 85, to be used for sensor fusion.
  • the parameter Ra is a parameter that determines up to what distance information in the measurement data of the radar 83 is to be used for sensor fusion. The values of these parameters are used by the sensor fusion program 45B according to the values of the key parameters.
  • the sensor fusion program 45B processes an image captured by the camera.
  • the run-time parameter is the ambient brightness when the camera acquires the captured image. Therefore, the task execution pattern of the sensor fusion program 45B can be changed according to the ambient brightness.
  • Ambient brightness is the brightness of the captured image or the output of the ambient light sensor 84 . Therefore, the ambient light sensor 84 can be used to determine the brightness with high accuracy without processing load, and the brightness can also be determined without using the ambient light sensor 84 .
  • the configuration of the functional blocks is merely an example. Some functional configurations shown as separate functional blocks may be configured integrally, or a configuration represented by one functional block diagram may be divided into two or more functions. Further, a configuration may be adopted in which part of the functions of each functional block is provided in another functional block.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Devices For Executing Special Programs (AREA)
  • Control Of Driving Devices And Active Controlling Of Vehicle (AREA)
  • Stored Programmes (AREA)

Abstract

プログラム実行装置は、プログラムに含まれるタスクを並列実行するプログラム実行装置であって、プログラムを実行する際のパラメータである実行時パラメータを取得する取得部と、実行時パラメータに対応する、タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報を記憶する実行パターン情報記憶部と、実行パターン情報を参照し、取得部が取得した実行時パラメータに対応する実行パターンを選択し、選択した実行パターンにしたがってプログラムを実行する実行部と、を備える。

Description

プログラム実行装置、解析方法、実行方法
 本発明は、プログラム実行装置、解析方法、および実行方法に関する。
 演算部を複数備える演算装置は、プログラムを構成するタスクを並列に実行することでプログラムの実行時間を短縮できる。特許文献1には、1の実行条件及び前記実行条件下での処理を含むタスクを構成要素とするプログラムを記憶する記憶部と、前記プログラム中の前記タスクの前記実行条件の全ての条件下での処理時間を求めて前記処理時間の前記タスクごとの最長処理時間と最短処理時間との差の順に前記タスクを並べ、最も前記差が大きいタスクから所定数の前記タスクを変化タスクとし、前記変化タスク以外を固定タスクとして判別して前記記憶部に前記判別した結果を記憶する解析対象抽出部と、前記変化タスクに対しては、全ての実行条件ごとに当該変化タスクの処理時間を計算し、前記固定タスクに対しては、当該タスクの処理時間が最長となる実行条件での当該固定タスクの処理時間として計算して複数の演算処理装置を有する並列演算処理装置の並列化スケジュールの処理時間の計算を行うスケジューリング部と、前記並列化スケジュールの中で、最長処理時間が最短の前記並列化スケジュールを出力する出力部を備えた並列化スケジューリング装置が開示されている。
日本国特開2010-262471号公報
 特許文献1に記載されている発明では、プログラムの実行時の条件が考慮されておらず画一的にプログラムが実行される。
 本発明の第1の態様によるプログラム実行装置は、プログラムに含まれるタスクを並列実行するプログラム実行装置であって、前記プログラムを実行する際のパラメータである実行時パラメータを取得する取得部と、前記実行時パラメータに対応する、前記タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報を記憶する実行パターン情報記憶部と、前記実行パターン情報を参照し、前記取得部が取得した前記実行時パラメータに対応する前記実行パターンを選択し、選択した前記実行パターンにしたがって前記プログラムを実行する実行部と、を備える。
 本発明の第2の態様による解析方法は、プログラムを解析して依存関係を明らかにした複数のタスクに分割することと、キーパラメータと従属パラメータの組合せであるパラメータセットを複数含むパラメータ情報を読み込むことと、前記パラメータセットごとに、前記タスクのそれぞれの実行コストを算出することと、前記依存関係および前記実行コストに基づき、前記パラメータセットごとに前記タスクの実行パターンを算出することと、を含み、前記キーパラメータおよび前記従属パラメータは、前記プログラムに含まれる変数である。
 本発明の第3の態様による実行方法は、プログラムに含まれるタスクを並列実行するプログラム実行装置が実行する実行方法であって、前記プログラムを実行する際のパラメータである実行時パラメータを取得することと、前記実行時パラメータに対応する、前記タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報を読み取ることと、前記実行パターン情報を参照し、取得した前記実行時パラメータに対応する前記実行パターンを選択し、選択した前記実行パターンにしたがって前記プログラムを実行すること、とを含む。
 本発明によれば、プログラム実行時のパラメータに応じてプログラムの実行パターンを選択できる。
第1の実施の形態におけるプログラム実行システムの機能構成図 解析装置および実行装置のハードウエア構成を示す図 第1の実施の形態におけるパラメータ情報の一例を示す図 パラメータセットの想定例を説明する図 実行コスト情報の一例を示す図 実行パターン情報の一例を示す図 解析装置による処理を示すフローチャート マクロタスクグラフを視覚的に示す図 一時ソースコードの一例を示す図 グループ化処理の詳細を示すフローチャート 埋め込み処理の詳細を示すフローチャート ステップS120における処理の一例を示すソースコード ステップS121における処理の第1の例を示すソースコード ステップS121における処理の第2の例を示すソースコード 実行装置3の実行部によるプログラム実行処理を示すフローチャート 画像処理プログラムの動作例を示す図 第2の実施の形態におけるプログラム実行システムの機能構成図 レーダーの検出範囲を示す概念図 第2の実施の形態におけるパラメータ情報の一例を示す図 第3の実施の形態におけるプログラム実行システムの機能構成図 前方画像の概略図 レーダーおよび前方カメラの測定範囲を示す図 第3の実施の形態におけるパラメータ情報の一例を示す図
―第1の実施の形態―
 以下、図1~図16を参照して、プログラム実行装置の第1の実施の形態を説明する。本実施の形態では、画像処理プログラムが本システムの処理対象となる。なお本実施の形態では、プログラムのソースコードの例をC言語の文法で記載するが、どのようなプログラム言語を用いてもよい。
 図1は、画像処理プログラムを実行する、プログラム実行システムS1の機能構成図である。プログラム実行システムS1には、解析装置2と、実行装置3と、が含まれる。実行装置3は自車両1に搭載され、自車両1には実行装置3の他にカメラ81も搭載される。カメラ81は、撮影して得られた画像(以下、「カメラ画像」と呼ぶ)を実行装置3に出力する。カメラ81は、自車両1の全周囲、すなわち360度を撮影できる。解析装置2は、タスク分割部21と、実行パターン生成部22と、コンパイラ26と、事前通信部28と、事前記憶部29とを備える。実行装置3は、入力部33と、環境情報取得部34と、実行部35と、実行通信部38と、実行記憶部39とを備える。
 事前記憶部29には、パラメータ情報41と、実行コスト情報42と、実行パターン情報43と、ソースコード44と、画像処理プログラム45とが格納される。ただし解析装置2が後述する処理を実行する前に、事前記憶部29に格納されているのは、パラメータ情報41、およびソースコード44である。実行コスト情報42および実行パターン情報43は実行パターン生成部22により生成され、画像処理プログラム45はコンパイラ26により作成される。またソースコード44は、カメラ81が出力するカメラ画像から物体を認識するプログラムのソースコードである。
 実行記憶部39には、画像処理プログラム45が格納される。事前記憶部29と実行記憶部39に格納される画像処理プログラム45は同一であり、解析装置2によって作成された画像処理プログラム45が実行装置3にコピーされる。このコピーには、事前通信部28および実行通信部38が用いられてもよいし、不図示の持ち運び可能な補助記憶装置を用いられてもよい。なお詳しくは後述するが、画像処理プログラム45にはパラメータ情報41が含まれている。
 タスク分割部21は、ソースコード44を解析してマクロタスクグラフを作成する。実行パターン生成部22の処理は多岐にわたるので後に詳述する。コンパイラ26は、ソースコード44および後述するソースコードをコンパイルして画像処理プログラム45を生成する。事前通信部28は有線または無線により実行装置3と通信する通信モジュールである。事前記憶部29は、不揮発性の記憶装置である。
 入力部33は、実行装置3を使用するユーザからの入力操作を受け付ける。入力部はたとえばボタンやタッチパネルであり、本実施の形態では自車両1の動作モードを指定する指示が指示される。自車両1の動作モードとは、たとえば高速道路を走行する高速走行モードや、所定の駐車位置に駐車する自動駐車モードなどである。環境情報取得部34は、カメラ81が撮影して得られた画像を取得するインタフェースである。実行部35は、2つの演算コアを有し、画像処理プログラム45を実行する。実行通信部38は、有線または無線により解析装置2と通信する通信モジュールである。実行記憶部39は、不揮発性の記憶装置である。
 図2は、解析装置2および実行装置3のハードウエア構成を示す図であり、図2では解析装置2および実行装置3を代表するハードウエアを便宜的に「演算装置」と名付けている。演算装置9は、中央演算装置であるCPU91、読み出し専用の記憶装置であるROM92、および読み書き可能な記憶装置であるRAM93、通信装置94、および補助記憶装置95を備える。
 CPU91がROM92に格納されるプログラムをRAM93に展開して実行することで後述する演算を行う。ただしこれらの演算は、CPU91、ROM92、およびRAM93の組み合わせの代わりに書き換え可能な論理回路であるFPGA(Field Programmable Gate Array)や特定用途向け集積回路であるASIC(Application Specific Integrated Circuit)により実現されてもよい。また演算装置9は、CPU91、ROM92、およびRAM93の組み合わせの代わりに、異なる構成の組み合わせ、たとえばCPU91、ROM92、RAM93とFPGAの組み合わせにより実現されてもよい。
 通信装置94は、無線または有線により通信を行う通信モジュールである。通信装置94は、事前通信部28および実行通信部38を実現する。補助記憶装置95は不揮発性の記憶装置、たとえばハードディスクドライブやフラッシュメモリである。補助記憶装置95は、事前記憶部29および実行記憶部39を実現する。
 図3は、パラメータ情報41の一例を示す図である。パラメータ情報41は複数のレコードから構成され、各レコードはセット名、キーパラメータ、および従属パラメータを含む。以下では、パラメータ情報41の各レコードを「パラメータセット」とも呼ぶ。そのためパラメータ情報41は、パラメータセットの情報を複数有するので、「パラメータセット情報」とも呼べる。セット名は、パラメータ情報41の各レコードを識別する識別子である。キーパラメータは、パラメータセットを選択する指針となるパラメータとパラメータ値の組合せである。従属パラメータは、計算を実行するコストの算出に用いられるパラメータとパラメータ値の組合せである。なお以下では、キーパラメータを「実行時パラメータ」と呼ぶことがある。
 図3に示す例では、キーパラメータは「Mode」であることが示されている。また、このキーパラメータが「high_speed」の場合には1行目の「Set1」が選択され、「auto_park」の場合は2行目の「Set2」が選択されることが示されている。また、従属パラメータは「Set1」ではNが「2」、Vが「50」であり、「Set2」ではNが「8」、Vが「5」である。これらパラメータ情報41は、状況を想定して事前に作成される。具体例を説明する。
 図4は、パラメータセットの想定例を説明する図であり、具体的には高速走行時と自動駐車時におけるカメラ映像を使った認識対象を示している。図4(a)は、高速走行時を示し、図4(b)は自動駐車時を示す。いずれの例でも認識処理を行う対象となる画像を撮影するカメラは、自車両1に搭載されている。まず高速走行時の例を説明する。
 図4(a)では自車両1が高速で走行する前方に先行車両2aが存在し、自車両1の左に左側方区画線3aが、自車両1の右に右側方区画線3bが存在する。自車両1は高速に、たとえば時速「50」キロメートルで走行しているので速度「V」は「50」である。また、この状況では撮影画像から左右の区画線の最接近位置が認識できればよい。すなわちこの場合は、認識対象数Nが符号4aおよび4bの「2」個である。
 図4(b)では自車両1が駐車枠に駐車を試みており、周囲には前方車両2cおよび後方車両2bが存在する。自車両は低速で、たとえば時速「5」キロメートルで走行しているので速度「V」は「5」である。また、自車両1が駐車する駐車枠の4隅と長辺の略中央(4d~4i)、前方車両2cの端部4j、および後方車両2bの端部4cの合計「8」が認識対象数「N」となる。このようにパラメータセットは、それぞれの状況を想定して従属パラメータがあらかじめ設定されている。
 図5は、実行コスト情報42の一例を示す図である。実行コスト情報42には、タスクごと、およびパラメータセットごとの実行コストが示されている。図5に示す例では、実行コストは数値が大きいほどコストが高く、実行に長い時間を要することを意味する。
 図6は、実行パターン情報43の一例を示す図である。実行パターン情報43には、パラメータセットごとのタスクの実行パターンが示されている。実行パターンとは、タスクの各コアへの割り振り、およびタスクの実行順序である。たとえばパラメータセット「Set1」は、コア1に「1,2,6,9,8,10」の順番にタスクを実行させ、コア2に「3,5,4,7」の順番にタスクを実行させることが示されている。なお図6に示すように、パラメータ情報41には記載がない、その他のケースにおける実行パターンも実行パターン情報43には含まれる。
 図7、図10、図11は、解析装置2による処理を示すフローチャートである。以下に説明する各ステップの実行主体は、ステップS100およびステップS122を除いて実行パターン生成部22である。ステップS100では解析装置2のタスク分割部21は、ソースコード44を読み込んでタスク間の並列性を抽出したマクロタスクグラフを取得する。
 図8はマクロタスクグラフを視覚的に示す図である。図8に示す例では、1~10の数字で示す各タスクの相関が示されており、タスク1の次にタスク2と3が並列実行できることが示されている。また、最後に示すタスク10はタスク7,8,9の全てが完了している場合に実行できることが示されている。
 続くステップS101では実行パターン生成部22は、パラメータ情報41を読み込む。続くステップS102では、パラメータ情報41に記載されている全てのパラメータセットを対象にS102Eまでの処理を繰り返す。具体的には実行パターン生成部22は、パラメータ情報41に記載されている全てのパラメータセットを順番に処理対象とし、ステップS103~S106の処理を行う。
 ステップS103では実行パターン生成部22は、処理対象のパラメータセットを用いて一時ソースコードを生成する。ここでは従属パラメータの値も用いられる。図9は、一時ソースコードの一例を示す図である。一時ソースコードは、ソースコード44と組み合わせて用いられるソースコードであり、変数に値が設定される。図9(a)に示す例は、「Set1」を用いる場合であり、図9(b)に示す例は、「Set2」を用いる場合である。いずれの場合も、キーパラメータおよび従属パラメータの値が変数として設定される。
 続くステップS104では実行パターン生成部22は、ソースコード44およびステップS103において作成した一時ソースコードを用いて、処理対象のパラメータセットに対する各タスクのコストを算出し、実行コスト情報42に追記する。たとえば実行パターン生成部22は、一時ソースコードをソースコード44に統合してコンパイルおよびリンクを行い、生成したバイナリファイルを読み込んで実行し実行時間を計測する。実行パターン生成部22は必要に応じて処理対象のダミーデータを用意してもよく、実行時間の計測は1回だけでもよいし、複数回の平均値でもよい。
 続くステップS105では実行パターン生成部22は、ステップS100において作成したマクロタスクグラフと、ステップS104において作成した実行コスト情報42とを用いて、処理対象のパラメータセットに対する実行パターンを作成する。具体的には実行パターン生成部22は、プログラムの実行時間が最短となるように、タスクを実行するコアおよび実行順番を決定する。
 たとえば実行パターン生成部22は、依存関係にあるタスクの終了を待つための待ち時間の合計が最小になるように各タスクをコアへ割り当ててもよいし、ランダムに各タスクをコアに割り当てて実行時間が最小になる組合せを見つけてもよい。ステップS105の実行が完了すると実行パターン生成部22は、処理対象としていないパラメータセットが存在する場合は、処理対象のパラメータセットを変更してステップS103に戻り、全てのパラメータセットを処理対象とした場合はステップS106に進む。
 ステップS106では実行パターン生成部22は、複数回実行したステップS105において作成したそれぞれの実行パターンを、実行パターン情報43として事前記憶部29に書き込む。続くステップS107では実行パターン生成部22は、実行パターン情報43のグループ化を行い、さらに続くステップS108では埋込処理を行い、図7に示す処理を終了する。ステップS107の詳細は図10を参照し、ステップS108の詳細は図11を参照して説明する。
 図10は、図7のステップS107に示したグループ化処理の詳細を示すフローチャートである。図10ではまずステップS110において、実行パターン情報43から同一の実行パターンとなるパラメータセットを検索する。続くステップS111では実行パターン生成部22は、ステップS110において検索されたパラメータセットの組合せのそれぞれを対象にS111Eまでの処理を繰り返す。具体的には実行パターン生成部22は、検索された同一のパラメータセットを順番に処理対象とし、ステップS112の処理を行う。
 ステップS112では実行パターン生成部22は、パラメータセットの集合和を新たなパラメータセットとして実行パターンをまとめる。たとえば図6に示す例において「Set1」と「Set2」におけるタスクのコアへの割り振り、および実行順序が同一であると仮定すると、キーパラメータを「Mode==high_speed OR Mode==auto_park」に変更し、2つのレコードを統合する。以上が図10に示す処理の説明である。
 図11は、図7のステップS108に示した埋め込み処理の詳細を示すフローチャートである。まずステップS120では実行パターン生成部22は、各パターンにおける各コアの処理を関数化するソースコードを生成する。図12は、ステップS120における処理の一例を示すソースコードである。図12に示す例では、「pattern1_core1」という関数ではタスク1,2,6,9,8,10を順番に実行し、「pattern1_core2」という関数ではタスク3,5,4,7を順番に実行することが示されている。なお図12では、作図の都合により各タスクの処理をタスクの名称で表している。
 続くステップS121では、動作パターンごとに実行する関数を設定するソースコードを生成する。図13はステップS121における処理の第1の例を示すソースコードであり、図14はステップS121における処理の第2の例を示すソースコードである。たとえば図13に記載されているように、switch文による制御を用いてキーパラメータの値に基づき整数値を取得し、その整数値をインデックスとして実行する関数を選択するソースコードを生成してもよい。また、図14に記載されているように、if文によりキーパラメータの値を特定して実行する関数を選択するソースコードを生成してもよい。図11に戻って説明を続ける。
 続くステップS122では、ソースコード44およびステップS120およびS121において生成したソースコードを用いて画像処理プログラム45のビルドを行う。すなわち、ソースコード一式に対してコンパイルを行い、生成されたオブジェクトファイルに必要に応じてライブラリをリンクして画像処理プログラム45を生成して、図11に示す処理を終了する。すなわち画像処理プログラム45は、ソースコード44だけでなく、実行パターン情報43を用いて生成したソースコードも使って生成されているので、画像処理プログラム45には実行パターン情報43が含まれているとみなすことができる。
 図15は、実行装置3の実行部35によるプログラム実行処理を示すフローチャートである。ステップS200では実行部35は、実行パターン情報43を取得する。ただし画像処理プログラム45には、実行パターン情報43が含まれているとみなすことができるので、実行部35が画像処理プログラム45を読み込むことで本ステップが実行されたとみなすことができる。続くステップS201では実行部35は、実行時パラメータを取得する。具体的には、ステップS200において読み込んだ実行パターン情報43におけるキーパラメータの値を取得する。本実施の形態では、入力部33に入力されるユーザによる自車両の動作モードの指定を読み込む。
 続くステップS202では実行部35は、キーパラメータの値に基づき実行時パターンを選択する。たとえば図14の例では、変数「Mode」に代入されているキーパラメータの値に基づき、If文の分岐により関数を選択することで実行パターンを選択する。続くステップS203では実行部35は、ステップS202において選択した実行パターンで、物体認識処理のタスクを実行して図15に示す処理を終了する。
(動作例)
 図16は、実行装置3による画像処理プログラム45の動作例を示す図である。図16の上部は高速走行の場合を示し、図16の下部は自動駐車の場合を示す。それぞれの場合において、実行パターンが固定のケースを上断に示し、実行パターンを状況により使い分けたケースを下断に示す。換言すると、本実施の形態における工夫を適用しない場合が上断であり、本実施の形態における工夫を適用する場合が下段である。いずれのグラフも横軸は時間である。
 図16の上部および下部の上段は、実行パターンが同一なので、タスクのコアへの割り振り、およびタスクの実行順序は同一である。図16の上部および下部の下段は、動作モードにより実行パターンを切り替えているので、タスクのコアへの割り振り、およびタスクの実行順序が異なる。いずれの場合も、本発明を適用することによって処理時間を短縮できることが示されている。
 なお、キーパラメータである動作モードに応じて実行パターンを切り替えてはいるが、解析装置2における各動作モードにおける各タスクの実行時間は、あらかじめ想定した従属パラメータを用いた予測にすぎない。そのため、実際の処理時間とは相違がある可能性は否定できず、いくらかの待ち時間が生じる可能性はある。しかし、図16の上部および下部の上段に示すように固定された実行パターンを用いる場合よりも、キーパラメータに応じた状況を想定して実行パターンを切り替えた方がプログラムの実行時間が短くなる蓋然性は非常に高く、処理時間を短縮する効果は得られる。
 上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)実行装置3は、画像処理プログラム45に含まれるタスクを並列実行する。実行装置3は、実行時パラメータである自車両1の動作モードを取得する取得部として機能する入力部33と、実行時パラメータに対応する、タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報43を含む画像処理プログラム45を記憶する実行記憶部39と、実行パターン情報にしたがって、入力部33が取得した実行時パラメータに対応する実行パターンを選択し、選択した実行パターンにしたがってプログラムを実行する実行部35と、を備える。そのため、画像処理プログラム45を実行する際の実行時パラメータに応じてプログラムの実行パターンを選択できる。
(2)実行部35は、プログラムを実行するコアを複数備える。実行パターンとは、コアへのタスクの割り振り、およびタスクの実行順番である。そのため、実行時の状況にあわせてコアへのタスクの割り振りとタスクの実行順番を変更できる。
(3)実行装置3は自車両1に搭載される。実行時パラメータは車両の動作モードである。入力部33は、自車両1のユーザによる入力操作に基づき実行時パラメータを決定する。そのため、ユーザが指定する車両の動作モードに応じてプログラムのタスクの実行パターンを変更できる。
(4)解析装置2が実行する解析方法は、図7のステップS100に示したように、画像処理プログラム45のソースコードを解析して依存関係を明らかにした複数のタスクに分割することと、図7のステップS101に示したように、キーパラメータと従属パラメータの組合せであるパラメータセットを複数含むパラメータ情報を読み込むことと、ステップS104に示したように、パラメータセットごとに、タスクのそれぞれの実行コストを算出することと、ステップS105に示したように、依存関係および実行コストに基づき、パラメータセットごとにタスクの実行パターンを算出することと、を含む。キーパラメータおよび従属パラメータは、画像処理プログラム45のソースコードに含まれる変数である。
(5)解析装置2が実行する解析方法は、図11のステップS120、S122に示したように、算出したパラメータセットごとの実行パターンの情報をプログラムのソースコードと統合してコンパイルし、実行可能ファイルを生成することを含む。
(6)解析装置2が実行する解析方法は、図11のステップS120、S121、S122に示したように、算出したパラメータセットごとの実行パターンの情報と、プログラムのソースコードと、キーパラメータの情報と、を統合してコンパイルし、実行可能ファイルを生成することを含む。そのため、実行可能ファイルである画像処理プログラム45に必要な情報がすべて含まれており、ソースコードに統合されているので効率よく処理できる。
(7)キーパラメータはプログラムを実行する際の状況を判別するパラメータである。従属パラメータは、キーパラメータにより判別される状況において測定される代表的なパラメータの値である。
(変形例1)
 上述した第1の実施の形態では、実行パターン情報43は画像処理プログラム45のソースコードとして取り込まれ、いわばハードコーディングされた。しかし、実行パターンを変化させる対象のプログラムと実行パターン情報43とが個別に実行装置3に提供されてもよいし、キーパラメータの情報だけが画像処理プログラム45とは個別に提供されてもよい。
 たとえば、実行パターンを変化させる対象のプログラムと実行パターン情報43とが個別に実行装置3に提供される場合には、次のような構成とすることができる。まず解析装置2は、実行時の引数により各コアで実行するタスクおよび順番を自由に変更できる画像処理プログラム45を生成する。そして解析装置2は、この画像処理プログラム45と、実行パターン情報43とを実行装置3に送付する。実行装置3は、実行パターン情報43およびキーパラメータの値を参照して実行パターンを決定し、決定した実行パターンにおける各コアに割り振るタスクとその順番を引数として画像処理プログラム45を実行する。
 たとえばキーパラメータの情報だけが画像処理プログラム45とは個別に提供される場合には、次のような構成とすることができる。まず解析装置2は、実行パターンの情報を予め含めて引数に応じて実行パターンを切り替える画像処理プログラム45を生成し、画像処理プログラム45に含まれないキーパラメータの情報とともに実行装置3に送信する。実行装置は、画像処理プログラム45を実行する際には、まずキーパラメータの情報を用いて画像処理プログラム45に与える引数を決定し、決定した引数を与えて画像処理プログラム45を実行する。
 本変形例によれば、多様な形態で実行パターン情報43を実行装置3に伝達し、実行パターンの切り替えに利用することができる。
(変形例2)
 上述した第1の実施の形態では、実行装置3は2つの演算コアを有した。しかし実行装置3は3以上の演算コアを有してもよいし、演算コアの演算性能は非対称でもよい。また、図2に示したハードウエア構成例では、画像処理プログラム45を実行するハードウエアとしてCPUを示したが、コプロセッサ、アクセラレータ、FPGAなどを用いて画像処理プログラム45を実行してもよい。
(変形例3)
 上述した第1の実施の形態では、実行パターンは、コアへのタスクの割り振り、およびタスクの実行順番の両方を含んだ。しかし実行パターンは、コアへのタスクの割り振り、およびタスクの実行順番のいずれか一方でもよい。たとえば、実行パターンはコアへのタスクの割り振りだけを規定し、タスクの実行順番は実行時に決定させてもよい。
―第2の実施の形態―
 図17~図19を参照して、プログラム実行装置の第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、レーダーの出力を処理するプログラムに本発明を適用する点で第1の実施の形態と異なる。
 図17は、プログラム実行システムS2の機能構成図である。自車両1には、実行装置3の他に、降雨センサー82およびレーダー83が搭載される。降雨センサー82およびレーダー83は、センシング情報を実行装置3に出力する。降雨センサー82は、雨を検出するセンサーであり、降雨の確からしさ、または降雨量を数値で出力する。降雨センサー82は、降雨がより確かであるほど、または降雨量が多いほど小さい数値を出力する。レーダー83は、たとえばミリ波レーダーであり、自車両1の前方における所定の角度範囲における障害物の有無を検出する。またレーダー83は自己診断機能が備わっており、故障していると判断する場合はその旨を出力する。
 事前記憶部29および実行記憶部39には、画像処理プログラム45の代わりにレーダー処理プログラム45Aが格納される。レーダー処理プログラム45Aは、レーダー83の出力を処理するプログラムである。また、事前記憶部29に格納されるソースコード44Aは、レーダー83の出力から障害物を検出するプログラムのソースコードである。またソースコード44Aには、複数のフィルタアルゴリズムが含まれる。
 図18は、レーダー83の検出範囲を示す概念図である。図18(a)に示すように、晴天時にはレーダーは遠い距離まで障害物を検出できる。しかし、図18(b)に示すように、雨天時には雨によりレーダーが減衰して障害物を検出できる距離が原理的に短くなる。また雨天時にはノイズが増加するため、晴天時に比べて複雑なフィルタアルゴリズムを使用する必要がある。
 そのため本実施の形態では、降雨時にはレーダーにより検出される障害物の距離が短くなり、検出される障害物の数も減少することを想定する。さらに本実施の形態では、降雨の有無およびレーダー83の故障の有無に応じてレーダー処理プログラム45Aのアルゴリズムを変更する。
 図19は、本実施の形態におけるパラメータ情報41Aの一例を示す図である。図19に示すように、実行時パラメータとも呼ばれるキーパラメータは、降雨センサー82の出力、およびレーダー83の故障の有無である。たとえば、降雨センサー82の出力に関わらずレーダー83が故障している場合には「Set3」に該当する。またレーダー83が故障していない場合には、降雨センサー82の出力が「10」より大きければ「Set1」に該当し、「10」以下であれば「Set2」に該当する。
 本実施の形態では実行パターン生成部22は、ソースコード44Aと、図19に示す各パラメータセットの従属パラメータとを用いて各タスクの実行コストを算出して実行コスト情報42Aを生成し、実行パターン情報43Aを生成する。さらに実行パターン生成部22は、第1の実施の形態で図11を参照して説明したようにソースコードを生成し、コンパイラ26にレーダー処理プログラム45Aをビルドさせる。各処理の詳細は第1の実施の形態と同様なので説明を省略する。
 上述した第2の実施の形態によれば、次の作用効果が得られる。
(8)レーダー処理プログラム45Aはレーダーの出力を処理する。キーパラメータは、降雨の確からしさ、または降雨の程度である。そのため、降雨の状況に応じてレーダー処理プログラム45Aのタスクの実行パターンを変更できる。
(9)キーパラメータはプログラムを実行する際の状況を判別するパラメータである。従属パラメータは、キーパラメータにより判別される状況においてプログラムにおいて使用されるパラメータの値である。
―第3の実施の形態―
 図20~図23を参照して、プログラム実行装置の第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、センサフュージョンプログラムに本発明を適用する点で、第1の実施の形態と異なる。
 図20は、プログラム実行システムS3の機能構成図である。自車両1には、実行装置3の他に、レーダー83、環境光センサー84、および前方カメラ85が搭載される。レーダー83、環境光センサー84、および前方カメラ85は、センシング情報を実行装置3に出力する。レーダー83は、第2の実施の形態において説明したとおりである。環境光センサー84は、自車両1の周辺の明るさを測定する。前方カメラ85は、自車両1の前方を撮影して得られた画像(以下、「前方画像」と呼ぶ)を実行装置3に送信する。
 図21は、前方画像の概略図である。図21の上部は昼間に得られる前方画像である昼間前方画像Dを示し、図21の下部は夜間に得られる前方画像である夜間前方画像Nを示す。昼間前方画像Dおよび夜間前方画像Nは、同じ位置で周囲の車両の位置も同一の状況で撮影しており、周囲の明るさのみが異なる。
 夜間前方画像Nでは近い距離にある車両N31、N32および樹木N35しか確認できない。その一方で昼間前方画像Dでは、より遠方に存在する車両D33、D34、樹木D36、および信号機D37も確認できる。すなわち昼間前方画像Dと夜間前方画像Nとを比較すると、昼間前方画像Dは明るいため撮影される物体が多く撮影される。
 図22は、レーダー83および前方カメラ85の測定範囲を示す図である。図22(a)は昼間の測定範囲を示し、図22(b)は夜間の測定範囲を示す。本実施例では、レーダー83よりも前方カメラ85の視野角が広い。図21において示したように、前方カメラ85の測定範囲は、夜間に比べて昼間の方が広い。このことが図22では符号50aと符号50bとして示されている。レーダー83の測定範囲は、昼間よりも夜間の方が広い。このことが図22では符号51aと符号51bとして示されている。
 図23は、本実施の形態におけるパラメータ情報41Bの一例を示す図である。図23に示すように、キーパラメータは、明るさLiの値である。明るさLiは、環境稿センサー84の出力を用いてもよいし、前方画像の輝度の平均値などを用いてもよい。明るさLiが閾値「10」より大きい、たとえば昼間には「Set1」に該当し、明るさLiが閾値「10」以下である、たとえば夜間には「Set2」に該当する。
 パラメータ情報41Bにおける従属パラメータは、センサフュージョンにおけるパラメータCaおよびパラメータRaである。パラメータCaは、前方カメラ85の測定結果である前方画像に含まれる被写体のうち、どの距離の被写体までをセンサフュージョンに利用するかを決定するパラメータである。パラメータRaは、レーダー83の測定データのうち、どの距離の情報までをセンサフュージョンに利用するかを決定するパラメータである。これらのパラメータの値は、キーパラメータの値に応じてセンサフュージョンプログラム45Bで利用される。
 上述した第3の実施の形態によれば、次の作用効果が得られる。
(10)センサフュージョンプログラム45Bは、カメラが撮影して得られる撮影画像を処理する。実行時パラメータは、カメラが撮影画像を取得した際の周囲の明るさである。そのため、周囲の明るさに応じてセンサフュージョンプログラム45Bのタスクの実行パターンを変更できる。
(11)周囲の明るさは、撮影画像の輝度、または環境光センサー84の出力である。そのため、環境光センサー84を用いて高精度に処理負荷なく明るさを判断することもできるし、環境光センサー84を用いることなく明るさを判断することもできる。
 上述した各実施の形態および変形例において、機能ブロックの構成は一例に過ぎない。別々の機能ブロックとして示したいくつかの機能構成を一体に構成してもよいし、1つの機能ブロック図で表した構成を2以上の機能に分割してもよい。また各機能ブロックが有する機能の一部を他の機能ブロックが備える構成としてもよい。
 上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
1 自車両
2 解析装置
3 実行装置
21 タスク分割部
22 実行パターン生成部
26 コンパイラ
28 事前通信部
29 憶部
33 入力部
34 環境情報取得部
35 実行部
38 実行通信部
39 実行記憶部
41、41A、41B パラメータ情報
42 実行コスト情報
43 実行パターン情報
44 ソースコード
45 画像処理プログラム
81 カメラ
94 通信装置
95 補助記憶部
220 実行パターン情報

Claims (13)

  1.  プログラムに含まれるタスクを並列実行するプログラム実行装置であって、
     前記プログラムを実行する際のパラメータである実行時パラメータを取得する取得部と、
     前記実行時パラメータに対応する、前記タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報を記憶する実行パターン情報記憶部と、
     前記実行パターン情報を参照し、前記取得部が取得した前記実行時パラメータに対応する前記実行パターンを選択し、選択した前記実行パターンにしたがって前記プログラムを実行する実行部と、を備えるプログラム実行装置。
  2.  請求項1に記載のプログラム実行装置において、
     前記実行部は、前記プログラムを実行するコアを複数備え、
     前記実行パターンとは、前記コアへの前記タスクの割り振り、および前記タスクの実行順番である、プログラム実行装置。
  3.  請求項1に記載のプログラム実行装置において、
     前記プログラム実行装置は車両に搭載され、
     前記実行時パラメータは前記車両の動作モードであり、
     前記取得部は、前記車両のユーザによる入力操作に基づき前記実行時パラメータを決定する、プログラム実行装置。
  4.  請求項1に記載のプログラム実行装置において、
     前記プログラムはレーダーの出力を処理し、
     前記実行時パラメータは、降雨の確からしさ、降雨の程度、または周囲の明るさである、プログラム実行装置。
  5.  請求項1に記載のプログラム実行装置において、
     前記プログラムは、カメラが撮影して得られる撮影画像を処理し、
     前記実行時パラメータは、前記カメラが前記撮影画像を取得した際の周囲の明るさである、プログラム実行装置。
  6.  請求項5に記載のプログラム実行装置において、
     前記周囲の明るさは、前記撮影画像の輝度、または環境光センサーの出力である、プログラム実行装置。
  7.  プログラムを解析して依存関係を明らかにした複数のタスクに分割することと、
     キーパラメータと従属パラメータの組合せであるパラメータセットを複数含むパラメータ情報を読み込むことと、
     前記パラメータセットごとに、前記タスクのそれぞれの実行コストを算出することと、
     前記依存関係および前記実行コストに基づき、前記パラメータセットごとに前記タスクの実行パターンを算出することと、を含み、
     前記キーパラメータおよび前記従属パラメータは、前記プログラムに含まれる変数である、解析方法。
  8.  請求項7に記載の解析方法において、
     算出した前記パラメータセットごとの前記実行パターンの情報を前記プログラムのソースコードと統合してコンパイルし、実行可能ファイルを生成することをさらに含む、解析方法。
  9.  請求項7に記載の解析方法において、
     算出した前記パラメータセットごとの前記実行パターンの情報と、前記プログラムのソースコードと、前記キーパラメータの情報と、を統合してコンパイルし、実行可能ファイルを生成することをさらに含む、解析方法。
  10.  請求項7に記載の解析方法において、
     前記キーパラメータは前記プログラムを実行する際の状況を判別するパラメータであり、
     前記従属パラメータは、前記キーパラメータにより判別される状況において測定される代表的なパラメータの値である、解析方法。
  11.  請求項7に記載の解析方法において、
     前記キーパラメータは前記プログラムを実行する際の状況を判別するパラメータであり、
     前記従属パラメータは、前記キーパラメータにより判別される状況において前記プログラムにおいて使用されるパラメータの値である、解析方法。
  12.  請求項7に記載の解析方法において、
     前記プログラムの実行時間が最短になるように前記実行パターンが算出される、解析方法。
  13.  プログラムに含まれるタスクを並列実行するプログラム実行装置が実行する実行方法であって、
     前記プログラムを実行する際のパラメータである実行時パラメータを取得することと、
     前記実行時パラメータに対応する、前記タスクを実行するパターンである実行パターンの組み合わせの一覧である実行パターン情報を読み取ることと、
     前記実行パターン情報を参照し、取得した前記実行時パラメータに対応する前記実行パターンを選択し、選択した前記実行パターンにしたがって前記プログラムを実行すること、とを含む実行方法。
PCT/JP2022/004769 2021-05-14 2022-02-07 プログラム実行装置、解析方法、実行方法 WO2022239334A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-082635 2021-05-14
JP2021082635A JP2022175874A (ja) 2021-05-14 2021-05-14 プログラム実行装置、解析方法、実行方法

Publications (1)

Publication Number Publication Date
WO2022239334A1 true WO2022239334A1 (ja) 2022-11-17

Family

ID=84029074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/004769 WO2022239334A1 (ja) 2021-05-14 2022-02-07 プログラム実行装置、解析方法、実行方法

Country Status (2)

Country Link
JP (1) JP2022175874A (ja)
WO (1) WO2022239334A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013199180A (ja) * 2012-03-23 2013-10-03 Autonetworks Technologies Ltd 車載制御装置
WO2013157244A1 (ja) * 2012-04-18 2013-10-24 日本電気株式会社 タスク配置装置、タスク配置方法、および、コンピュータ・プログラム
JP2016192154A (ja) * 2015-03-31 2016-11-10 株式会社デンソー 並列化コンパイル方法、並列化コンパイラ、及び車載装置
WO2018074187A1 (ja) * 2016-10-19 2018-04-26 日立オートモティブシステムズ株式会社 車両制御装置
WO2020035975A1 (ja) * 2018-08-17 2020-02-20 三菱電機株式会社 数値制御装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013199180A (ja) * 2012-03-23 2013-10-03 Autonetworks Technologies Ltd 車載制御装置
WO2013157244A1 (ja) * 2012-04-18 2013-10-24 日本電気株式会社 タスク配置装置、タスク配置方法、および、コンピュータ・プログラム
JP2016192154A (ja) * 2015-03-31 2016-11-10 株式会社デンソー 並列化コンパイル方法、並列化コンパイラ、及び車載装置
WO2018074187A1 (ja) * 2016-10-19 2018-04-26 日立オートモティブシステムズ株式会社 車両制御装置
WO2020035975A1 (ja) * 2018-08-17 2020-02-20 三菱電機株式会社 数値制御装置

Also Published As

Publication number Publication date
JP2022175874A (ja) 2022-11-25

Similar Documents

Publication Publication Date Title
JP5611819B2 (ja) 交通にとって重要な情報を認識する方法及び装置
JP6916552B2 (ja) 走行途中に発生する走行シナリオを検出して、運転者の走行習慣を評価するための情報の提供する方法及び装置
CN110929431B (zh) 一种车辆行驶决策模型的训练方法及装置
US20090268946A1 (en) Vehicle clear path detection
US20210390353A1 (en) Object recognition device, object recognition method, and object recognition program
US10430680B2 (en) Image processing algorithm
US10803307B2 (en) Vehicle control apparatus, vehicle, vehicle control method, and storage medium
US11756308B2 (en) Neural network device and method using a neural network for sensor fusion
CN112823358A (zh) 递归多保真度行为预测
WO2022239334A1 (ja) プログラム実行装置、解析方法、実行方法
CN114781635A (zh) 模型部署方法、装置、设备和介质
CN113853049A (zh) 机器人辅助灯光控制方法、机器人及系统
JP7119839B2 (ja) 物体検出装置、物体検出方法及び車両制御装置
Nieto et al. Optimising computer vision based ADAS: vehicle detection case study
US20230386219A1 (en) Reliability determination device and reliability determination method
CN113743356A (zh) 数据的采集方法、装置和电子设备
CN112179359B (zh) 一种地图匹配方法、装置、电子设备和存储介质
EP3985643A1 (en) Outside environment recognition device
US20200226432A1 (en) Method for classifying a capture taken by a sensor
CN116304992A (zh) 传感器时差确定方法、装置、计算机设备和存储介质
CN116311114A (zh) 一种可行驶区域生成方法、装置、电子设备及存储介质
CN113614809B (zh) 车辆控制用运算装置、车辆控制装置及车辆控制用运算方法
KR20230079999A (ko) 교통 수신호 인식 시스템 및 방법
CN112824199A (zh) 车辆及其控制方法
CN112926476A (zh) 车辆识别方法、装置及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22807041

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22807041

Country of ref document: EP

Kind code of ref document: A1