class_docstr: Class that satisfies the Linker interface by acting as a VM factory.
  
  Parameters
  ----------
  allow_gc
      Force the virtual machine to clean up unnecessary
      references, in order to allow garbage collection on
      intermediate values during computation of a function.
      If None use as default the value of the Theano flag allow_gc.
  use_cloop
      Use the C-based virtual machine if possible
  callback
      A callable object to call after each call to a thunk within
      the virtual machine.  It will be called with four arguments called
      'node', 'thunk', 'storage_map', and 'compute_map'.
  callback_input
      A callable object to call on each input to the graph
      (variables with no owner).  This includes constants and shared
      variables values.  It will be called with two arguments:
      'var', 'value'.
  lazy
      Useful only when use_cloop is False. When lazy is None, use the
      theano flag vm.lazy value. Then if we have a None (default) we auto
      detect if lazy evaluation is needed and use the appropriate
      version. If lazy is True or False, we force the version used
      between Loop/LoopGC and Stack.
  c_thunks
      If None or True, don't change the default. If False,
      don't compile c code for the thunks.
  allow_partial_eval
      If True, enforces usage of Stack or CVM, to allow for partial
      evaluation of functions (calculating a subset of outputs).
class_docstr_tok: ["Class","that","satisfies","the","Linker","interface","by","acting","as","a","VM","factory",".","Parameters","--","--","--","--","--","allow_gc","Force","the","virtual","machine","to","clean","up","unnecessary","references",",","in","order","to","allow","garbage","collection","on","intermediate","values","during","computation","of","a","function",".","If","None","use","as","default","the","value","of","the","Theano","flag","allow_gc",".","use_cloop","Use","the","C-based","virtual","machine","if","possible","callback","A","callable","object","to","call","after","each","call","to","a","thunk","within","the","virtual","machine",".","It","will","be","called","with","four","arguments","called","'node","'",",","'thunk","'",",","'storage_map","'",",","and","'compute_map","'",".","callback_input","A","callable","object","to","call","on","each","input","to","the","graph","(","variables","with","no","owner",")",".","This","includes","constants","and","shared","variables","values",".","It","will","be","called","with","two","arguments",":","'var","'",",","'value","'",".","lazy","Useful","only","when","use_cloop","is","False",".","When","lazy","is","None",",","use","the","theano","flag","vm.lazy","value",".","Then","if","we","have","a","None","(","default",")","we","auto","detect","if","lazy","evaluation","is","needed","and","use","the","appropriate","version",".","If","lazy","is","True","or","False",",","we","force","the","version","used","between","Loop\/LoopGC","and","Stack",".","c_thunks","If","None","or","True",",","do","n't","change","the","default",".","If","False",",","do","n't","compile","c","code","for","the","thunks",".","allow_partial_eval","If","True",",","enforces","usage","of","Stack","or","CVM",",","to","allow","for","partial","evaluation","of","functions","(","calculating","a","subset","of","outputs",")","."]
code: def make_all(
      self,
      profiler=None,
      input_storage=None,
      output_storage=None,
      storage_map=None,
  ):
      fgraph = self.fgraph
      order = self.schedule(fgraph)
  
      input_storage, output_storage, storage_map = link.map_storage(
          fgraph, order, input_storage, output_storage, storage_map
      )
      compute_map = {}
      for k in storage_map:
          compute_map[k] = [k.owner is None]
  
      thunks = []
  
      # Collect Reallocation Info
      compute_map_re = defaultdict(lambda: [0])
      for var in fgraph.inputs:
          compute_map_re[var][0] = 1
  
      if getattr(fgraph.profile, "dependencies", None):
          dependencies = getattr(fgraph.profile, "dependencies")
      else:
          dependencies = self.compute_gc_dependencies(storage_map)
  
      reallocated_info = calculate_reallocate_info(
          order, fgraph, storage_map, compute_map_re, dependencies
      )
      t0 = time.time()
      linker_make_thunk_time = {}
      impl = None
      if self.c_thunks is False:
          impl = "py"
      for node in order:
          try:
              thunk_start = time.time()
              # no-recycling is done at each VM.__call__ So there is
              # no need to cause duplicate c code by passing
              # no_recycling here.
              thunks.append(
                  node.op.make_thunk(
                      node, storage_map, compute_map, [], impl=impl
                  )
              )
              linker_make_thunk_time[node] = time.time() - thunk_start
              if not hasattr(thunks[-1], "lazy"):
                  # We don't want all ops maker to think about lazy Ops.
                  # So if they didn't specify that its lazy or not, it isn't.
                  # If this member isn't present, it will crash later.
                  thunks[-1].lazy = False
          except Exception as e:
              e.args = (
                  "The following error happened while"
                  " compiling the node",
                  node,
                  "\n",
              ) + e.args
              raise
      t1 = time.time()
  
      if self.profile:
          self.profile.linker_node_make_thunks += t1 - t0
          self.profile.linker_make_thunk_time = linker_make_thunk_time
  
      for node, thunk in zip(order, thunks):
          thunk.inputs = [storage_map[v] for v in node.inputs]
          thunk.outputs = [storage_map[v] for v in node.outputs]
  
      lazy = self.lazy
      if lazy is None:
          lazy = config.vm.lazy
      if lazy is None:
          lazy = not all([(not th.lazy) for th in thunks])
      if not (
          lazy
          or (
              (config.profile or config.print_global_stats)
              and config.profile_memory
          )
          or self.use_cloop
          or self.callback
          or self.callback_input
      ):
          for pair in itervalues(reallocated_info):
              storage_map[pair[1]] = storage_map[pair[0]]
  
      computed, last_user = link.gc_helper(order)
      if self.allow_gc:
          post_thunk_clear = []
          for node in order:
              clear_after_this_thunk = []
              for input in node.inputs:
                  if (
                      input in computed
                      and input not in fgraph.outputs
                      and node == last_user[input]
                      and input not in reallocated_info
                  ):
                      clear_after_this_thunk.append(storage_map[input])
              post_thunk_clear.append(clear_after_this_thunk)
      else:
          post_thunk_clear = None
  
      vm = self.make_vm(
          order,
          thunks,
          input_storage,
          output_storage,
          storage_map,
          post_thunk_clear,
          computed,
          compute_map,
          self.updated_vars,
      )
  
      vm.storage_map = storage_map
      vm.compute_map = compute_map
  
      return (
          vm,
          [
              link.Container(input, storage)
              for input, storage in zip(fgraph.inputs, input_storage)
          ],
          [
              link.Container(output, storage, True)
              for output, storage in zip(fgraph.outputs, output_storage)
          ],
          thunks,
          order,
      )
  
imports: from __future__ import absolute_import, print_function, division
  from .None import link
  from collections import defaultdict
  import logging
  import sys
  import time
  import warnings
  import platform
  from theano.configparser import config, _config_var_list
  import theano.gof.cmodule
  from six import iteritems, itervalues
  from six.moves import xrange
label_desc: Use image node_id 6 for calling the VM_Linker obj's underlying member method code with example usage: obj.make_all(profiler, input_storage, output_storage, storage_map) and returns: vm,  unknown,  unknown,  thunks,  order