Can someone direct me to a page, where I can learn how to make a while loop without tf.while
My reply was related to your final claim.
Yes it was in python and authograph will create the graph for tconditionals and loops as in the linked example.

Are you looking for something like:

  

      github.com
  

  
    tensorflow/tensorflow/blob/master/tensorflow/c/c_api.cc#L2012



      
      
            delete[] params->body_outputs;
          }
          
          
TF_WhileParams EmptyWhileParams() {
            return {0,       nullptr, nullptr, {nullptr, 0},
                    nullptr, nullptr, nullptr, nullptr};
          }
          
          
}  // namespace
          
          
TF_WhileParams TF_NewWhile(TF_Graph* g, TF_Output* inputs, int ninputs,
                                     TF_Status* status) {
          #if defined(IS_MOBILE_PLATFORM) || defined(IS_SLIM_BUILD)
            status->status = tensorflow::errors::Unimplemented(
                "Creating while loops is not supported on mobile. File a bug at "
                "https://github.com/tensorflow/tensorflow/issues if this feature is "
                "important to you");
            return EmptyWhileParams();
          #else
            if (ninputs == 0) {
              status->status =