Artificial neural network emulation of hotspots
Methods, devices, and systems for emulating a compute kernel with an ANN. The compute kernel is executed on a processor, and it is determined whether the compute kernel is a hotspot kernel. If the compute kernel is a hotspot kernel, the compute kernel is emulated with an ANN, and the ANN is substituted for the compute kernel.
1. A method for emulating a compute kernel with an artificial neural network (ANN), the method comprising:
executing the compute kernel on a processor;
determining whether the compute kernel is a hotspot kernel; and
if the compute kernel is a hotspot kernel:
emulating the compute kernel with an ANN, and
substituting the ANN for the compute kernel.
2. The method of claim 1 , wherein determining whether the compute kernel is a hotspot kernel comprises comparing a compute resource utilization of the compute kernel with a threshold.
3. The method of claim 1 , wherein determining whether the compute kernel is a hotspot kernel comprises comparing a compute resource utilization of the compute kernel with a compute resource utilization of a different compute kernel.
4. The method of claim 1 , wherein emulating the compute kernel with an ANN comprises offline-training the ANN prior to executing the compute kernel.
5. The method of claim 4 , wherein offline-training the ANN comprises:
inputting, to the ANN, training data typical of inputs to the compute kernel,
comparing outputs from the ANN to known correct outputs corresponding to the training data; and
adjusting the ANN based on differences between the outputs from the ANN and the known correct outputs.
6. The method of claim 1 , wherein emulating the compute kernel with an ANN comprises online-training the ANN based on execution of the compute kernel.
7. The method of claim 6 , wherein offline-training the ANN comprises:
inputting, to the ANN, inputs which were input to the compute kernel,
comparing outputs from the ANN to known correct outputs corresponding to the inputs which were input to the compute kernel; and
adjusting the ANN based on differences between the outputs from the ANN and the known correct outputs.
8. The method of claim 1 , wherein emulating the compute kernel with an ANN comprises offline-training the ANN prior to executing the compute kernel, and refining the ANN using online-training based on execution of the compute kernel.
9. The method of claim 1 , wherein substituting the ANN for the compute kernel comprises executing the ANN on the processor.
10. The method of claim 1 , wherein substituting the ANN for the compute kernel comprises executing the ANN on a different processor in communication with the processor.
11. A computing device configured to emulate a compute kernel with an artificial neural network (ANN), the computing device comprising:
a processor configured to execute the compute kernel and to determine whether the compute kernel is a hotspot kernel;
the processor further configured to, if the compute kernel is a hotspot kernel:
emulate the compute kernel with an ANN, and
substitute the ANN for the compute kernel.
12. The computing device of claim 11 , wherein determining whether the compute kernel is a hotspot kernel comprises comparing a compute resource utilization of the compute kernel with a threshold.
13. The computing device of claim 11 , wherein determining whether the compute kernel is a hotspot kernel comprises comparing a compute resource utilization of the compute kernel with a compute resource utilization of a different compute kernel.
14. The computing device of claim 11 , wherein emulating the compute kernel with an ANN comprises offline-training the ANN prior to executing the compute kernel.
15. The computing device of claim 14 , wherein offline-training the ANN comprises:
inputting, to the ANN, training data typical of inputs to the compute kernel,
comparing outputs from the ANN to known correct outputs corresponding to the training data; and
adjusting the ANN based on differences between the outputs from the ANN and the known correct outputs.
16. The computing device of claim 11 , wherein emulating the compute kernel with an ANN comprises online-training the ANN based on execution of the compute kernel.
17. The computing device of claim 16 , wherein the processor is further configured to offline-train the ANN, the processor further configured to
input, to the ANN, inputs which were input to the compute kernel,
compare outputs from the ANN to known correct outputs corresponding to the inputs which were input to the compute kernel; and
adjust the ANN based on differences between the outputs from the ANN and the known correct outputs.
18. The computing device of claim 11 , wherein emulating the compute kernel with an ANN comprises offline-training the ANN prior to executing the compute kernel, and refining the ANN using online-training based on execution of the compute kernel.
19. The computing device of claim 11 , wherein substituting the ANN for the compute kernel comprises executing the ANN on the processor.
20. The computing device of claim 11 , wherein substituting the ANN for the compute kernel comprises executing the ANN on a different processor in communication with the processor.