Making changes to TF-LITE layers

I am trying to modify the layers used in the TF Lite backend but I’m not sure how to recompile just the file(s) I modified without recompiling the entire codebase. To install from source, I followed the instructions here], but this is my first time using Bazel to build something (I’ve only used make or Cmake before). Also the instructions ask to install TF once it is built. So my three related questions are:

  1. When I make changes to a layer in a C file (e.g., tensorflow/lite/kernels/internal/reference/fully_connected.h), how do I recompile just this file? When I run the bazel build option again, it seems to be recompiling all of TF again. (I did see that the official instructions are to make a new OP and register it etc, which I do want to do, but for now modifying an existing kernel seemed like a simpler place to start. Then I can try out my custom op separately before adding a new OP in TF for that. )
  2. Is there a way to run TF without installing it each time, since I will be making a lot of changes?
  3. I am so used to being able to print stuff for debug but I don’t seem to be able to do that within this layer. Is there a way within TF to print something as a debug message?

Thank you!

1 Like

Hi, I am trying to do something similar. Were you able to find a working solution?