CPC G06F 8/453 (2013.01) [G06F 8/4441 (2013.01); G06F 8/452 (2013.01); G06F 9/3836 (2013.01); G06F 9/4552 (2013.01); G06F 15/163 (2013.01)] | 18 Claims |
1. A hardware acceleration method comprising:
obtaining source code;
obtaining, according to the source code, first executable code matching a first processor and running in the first processor;
receiving, from the first processor, first execution information for executing the first executable code, wherein the first execution information comprises a first execution parameter of the first executable code in the first processor, and wherein the first execution parameter is an execution duration of the first executable code in the first processor;
determining that the source code corresponding to the first executable code matches a second processor when the first execution parameter exceeds a first threshold, wherein the first threshold is based on an estimation of a second execution parameter of the source code in the second processor, and wherein the second execution parameter is an estimated execution duration of the source code in the second processor or the second execution parameter is an estimated quantity of execution times of the source code in the second processor;
obtaining, according to the source code and when the source code matches the second processor, second executable code matching the second processor;
determining, according to second execution information of executing the second executable code, that a matching degree between the second processor and the source code corresponding to the second executable code is lower than an expected value;
unloading the second executable code from the second processor; and
sending, to the first processor, third executable code corresponding to the source code.
|