MCPcopy Create free account
hub / github.com/benoitsteiner/tensorflow-opencl / RewriteWithName

Function RewriteWithName

tensorflow/compiler/aot/codegen.cc:158–162  ·  view source on GitHub ↗

Returns code rewritten by replacing all rewrite pairs, with an extra rewrite for the name. Note that the rewriting strategy is roughly O(N*M), where N is the size of the code and M is the number of rewrites. It's fine for now since N and M are pretty small. TODO(toddw): If this becomes a problem, we should be able to change the algorithm to O(N) by using a state machine, e.g. regexps or a real

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

GenArgMethodsFunction · 0.85
GenResultMethodsFunction · 0.85

Calls 2

ReplaceAllPairsFunction · 0.85
StringReplaceFunction · 0.50

Tested by

no test coverage detected