code: def test_inter_process_cache():
      # When an op with c_code, but no version. If we have 2 apply node
      # in the graph with different inputs variable(so they don't get
      # merged) but the inputs variable have the same type, do we reuse
      # the same module? Even if they would generate different c_code?
      # Currently this test show that we generate the c_code only once.
      #
      # This is to know if the c_code can add information specific to the
      # node.inputs[*].owner like the name of the variable.
  
      x, y = theano.tensor.dvectors("xy")
      f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
      f(np.arange(60), np.arange(60))
      if (
          theano.config.mode == "FAST_COMPILE"
          or theano.config.cxx == ""
      ):
          assert MyOp.nb_called == 0
      else:
          assert MyOp.nb_called == 1
  
      # What if we compile a new function with new variables?
      x, y = theano.tensor.dvectors("xy")
      f = theano.function([x, y], [MyOp()(x), MyOp()(y)])
      f(np.arange(60), np.arange(60))
      if (
          theano.config.mode == "FAST_COMPILE"
          or theano.config.cxx == ""
      ):
          assert MyOp.nb_called == 0
      else:
          assert MyOp.nb_called == 1
  
file_path: Theano/theano/gof/tests/test_cmodule.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.gof.cmodule import GCC_compiler
label_desc: Use image node_id 1 for calling a global function with example usage: test_inter_process_cache() without return types