Commit graph

6 commits

Author SHA1 Message Date
Ryan Kuester
f91dd916e5
build(codegen): suppress noise in console output (#2742)
build(codegen): suppress noise in console output

Redirect output from the code_generator binary so that when it's
used within the build system, it doesn't print unexpected,
distracting noise to the console. Generally, compiler or
generator commands don't print output unless there's an error.

This reverts "build(codegen): suppress noise in console output
(#2708)", commit d2495773, which attempted to fix the same
problem by adding a --quiet flag. A subsequent upgrade to the
Tensorflow Python package caused new noise that wasn't possible
to suppress with the flag.

BUG=description
2024-11-13 22:46:20 +00:00
Ryan Kuester
d24957732b
build(codegen): suppress noise in console output (#2708)
Add a --quiet option to the code_generator binary so that when it's used
within the build system, it doesn't print unexpected, distracting noise
to the console. Generally, compiler or generator commands don't print
output unless there's an error.

BUG=description
2024-10-01 21:16:45 +00:00
RJ Ascani
c5c3b3e182
codegen: Remove preprocessor (#2355)
The original idea for the codegen preprocessor was to perform init & prepare stages using a simulator and capture the output. This idea is being abandoned in favor of generating the necessary structures from python.

BUG=cleanup
2023-12-19 21:14:31 +00:00
RJ Ascani
77e2cdbdd6
Create codegen_preprocessor (#2219) 2023-09-14 13:08:49 -07:00
RJ Ascani
a0f8970856
Generate op table and subgraph invoke functions (#2176)
As the next step in the codegen experiment, we want to generate the invoke calls for each layer. This is slightly challenging with the existing sources, as kernels only expose a registration function, not their individual Eval functions. In an effort to keep the code churn to a minimum, this PR introduces an inference only registration structure and function. It includes just two function pointers: invoke and reset. For this CL, we've only introduced it for FullyConnected.

In the code generator, this PR creates a new op_table array in the generated source, with an enum for lookup. It also generates an invoke function for each subgraph, that calls each operator's invoke function.

BUG=295174388
2023-08-18 20:38:16 +00:00
RJ Ascani
901d8306e5
Add code generator experiment (#2162)
This PR creates the initial code generator scaffolding for performing inference without an interpreter. Currently, this does nothing other create a header and source file from Mako templates. Mako was chosen as a template engine due to existing dependency.

BUG=b/295076487
2023-08-10 18:48:59 +00:00