TVM: End-to-end automatic deep learning compiler (PPT on 244 pages)

Chen Tianqi gave a report on TVM, TVM: An End to End Automated Deep Learning Compiler.

File: n459.com/file/25127180-479068743

The following are irrelevant:

-------------------------------------------Dividing line----- ----------------------------------------

1. Key requirements:
Coordinate system and canvas grid:

Scaling: involves function scaling and drawing range on the canvas;
scale unit changes: recalculation required for unit conversion;
function expression input:
input expression input specification verification, whether compound rules;
input expression conversion programming language The process of
programming language calculation results are converted to mathematical expressions;
template management:
template switching data status management;
template saving, deleting, and changing;
drawing function images;
displaying function attributes and properties;
function and point relationship
point processing

Two, architecture design

Third, the domain model
https://www.processon.com/view/link/5b4ed94be4b025cf491ae8ef

4. Technical difficulties and solutions

1. Formula expression input verification
Formula expression input ==> LaTex expression (with the help of a third-party class library mathquill)
converts latex expression into an expression that can be recognized by the program, and the
final expression can get the final calculation result, which is This constant can be obtained by matching according to the nature of the function
. 2. Conversion
from formula to data layer . Convert to the expression recognized
by math.js through latexToJs ; https://github.com/fangsmile/LatexToJs through math.js Then convert the expression into a constant, and bring the constant into the determined function type to generate a new latex expression;
3. The conversion from the data layer to the formula and the display of related properties
enter the Latex expression => formula expression input (with the help of a third-party class Library mathquill)
4. For the realization of function graph drawing
1) Because functions do not have the function of user-defined domain, the domain of most functions is (-∞, +∞). But when drawing, when calculating the drawing point range according to the function formula, a clear starting point and ending point are required to ensure drawing performance.

Calculate the x range of the visible area of ​​the current canvas as the default domain, calculate the value y of each function, and get a series of point coordinates to be drawn

2) Calculate the function value y every time you draw, or calculate it and save it to the attribute points. The current design is saved in points, so as long as it is not the change function itself, most of the points do not need to be recalculated.

Draw the recalculated scene:

When the canvas is moved, the visible range of the canvas changes on the x-axis, and the new domain range on the x-axis needs to be added.
When the canvas is reduced, the visible range of the canvas changes on the x-axis, and the new domain range on the x-axis needs to be added.
To change the function expression, you need to recalculate the y corresponding to all x values.
3) When drawing, you don’t need to connect every point in points to form a function graph. It needs to combine the visible range x domain and the canvas zoom value scale. Optimize drawing

Guess you like

Origin blog.csdn.net/gumenghua_com1/article/details/112600999