code: def test_native_convolution(tmpdir):
      # this test needs native binary convolution library built with halide.
      if not C.contrib.netopt.native_convolve_function_registered:
          pytest.skip()
  
      z = _create_convolution_model()
      binz = qc.convert_to_binary_convolution(z, _filter)
  
      # save and load to transfer the model to CPU device as native binary
      # convolution does not run on GPU yet.
      model_file = str(tmpdir / ("binary_model.cmf"))
      binz.save(model_file)
  
      eval_device = C.cpu()
      model = C.Function.load(model_file, device=eval_device)
  
      # convert to native halide implementation.
      native_binz = qc.convert_to_native_binary_convolution(model)
  
      functions = C.logging.graph.depth_first_search(
          native_binz,
          (
              lambda x: type(x) == C.Function
              and x.op_name == "BinaryConvolveOp"
          ),
          depth=0,
      )
      assert len(functions) == 3
  
      img_data = np.reshape(dat, (1, 1, 28, 28))
  
      res = native_binz.eval(img_data, device=eval_device)
      assert len(res) > 0
  
file_path: CNTK/bindings/python/cntk/contrib/netopt/test/quantization_test.py
imports: import numpy
  import pytest
  import cntk
  import cntk.contrib.netopt.quantization
  from cntk.layers import BatchNormalization
label_desc: Use image node_id 5 for calling a global function with example usage: test_native_convolution(tmpdir) without return types