entelechy bench自动生成
在一个或多个后端上测量场景的帧耗时。
bench <scene.esn>Step the scene for –frames frames –repeat times on each backend and print the least of the runs, a millisecond a frame. The frames overlap the device as a window’s do: the next is made while the device runs this one. The first frame of all is thrown away: it compiles and allocates. –nodes measures every node as well, native operations included, as a window’s frame-data line does: on a device by its own clock beside the call on the frame’s thread, nothing waiting for either. Where the device keeps no clock it waits after each node, what measuring a node costs before it does anything taken off every line, and the sum says how the parts come to more than the whole, since a node runs alone there and a frame overlaps them. –json writes the measurement, and –compare reads one back and prints what changed since, which is how a change is shown to cost nothing.
参数(flags)
Section titled “参数(flags)”| flag | 取值 | 可重复 | 说明 |
|---|---|---|---|
--frames |
<n> |
否 | Frames a run steps. |
--repeat |
<n> |
否 | Runs on each backend. |
--rate |
<fps> |
否 | Frames a second. |
--backend |
cpu|gpu|jit|all |
是 | A backend to measure on; all is every backend this build has. |
--nodes |
`` | 否 | Measures every node as well. |
--window |
<w>x<h>[@<scale>] |
否 | The window a scene sized by window() fills, in pixels, with its scale factor. |
--json |
<file> |
否 | Writes the measurement to a file. |
--compare |
<file> |
否 | Prints what changed since a measurement written by –json. |
--library |
<dir|file> |
否 | Kernels the scene uses beside its own. |
--input |
<name>=<path> |
是 | Reads the scene’s input from the path given, a file or a directory as the input reads; an external the scene leaves to its caller bound to a picture file. |
--output |
<name>=<path> |
是 | Writes the scene’s output to the path given, a file or a directory as the output writes. |
--param |
<name>=<literal> |
是 | Sets a graph parameter. |
--no-fusion |
`` | 否 | Runs pointwise producers apart from their consumers. |
--allow |
file.read|file.write|file.delete=<dir>|clipboard.read|clipboard.write |
是 | Lets the scene read files from, write its outputs into, or remove and rename files in, a directory; or read and write the system’s clipboard. |
--grant |
<capability,...> |
否 | The only capabilities a Kernel may be given. |
--memory |
<MB> |
否 | Mebibytes of Fields the Host may hold at once (2048 by default). |
--work |
<M> |
否 | Million loop iterations one run of a Kernel may take (4000 by default). |
--small |
<operations> |
否 | Operations a run may take, by its elements and its Kernel’s typical work, and go to the processor rather than the device (400000 by default; 0 keeps every run on the device). |

