code: def test_conv_graph(self):
      X = np.array(
          [
              [
                  [
                      [
                          0.0,
                          1.0,
                          2.0,
                          3.0,
                          4.0,
                      ],  # (1, 1, 5, 5) input tensor
                      [5.0, 6.0, 7.0, 8.0, 9.0],
                      [10.0, 11.0, 12.0, 13.0, 14.0],
                      [15.0, 16.0, 17.0, 18.0, 19.0],
                      [20.0, 21.0, 22.0, 23.0, 24.0],
                  ]
              ]
          ]
      ).astype(np.float32)
      W = np.array(
          [
              [
                  [
                      [
                          1.0,
                          1.0,
                          1.0,
                      ],  # (1, 1, 3, 3) tensor for convolution weights
                      [1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0],
                  ]
              ]
          ]
      ).astype(np.float32)
      Y_without_padding = np.array(
          [
              [
                  [
                      [54.0, 63.0, 72.0],  # (1, 1, 3, 3) output tensor
                      [99.0, 108.0, 117.0],
                      [144.0, 153.0, 162.0],
                  ]
              ]
          ]
      ).astype(np.float32)
      graph_def = make_graph(
          [
              make_node(
                  "Conv",
                  inputs=["X", "W"],
                  outputs=["Y"],
                  kernel_shape=[3, 3],
                  # Default values for other attributes: strides=[1, 1], dilations=[1, 1], groups=1
                  pads=[0, 0, 0, 0],
              )
          ],
          name="test",
          inputs=[
              make_tensor_value_info(
                  "X", onnx.TensorProto.FLOAT, [1, 1, 5, 5]
              ),
              make_tensor_value_info(
                  "W", onnx.TensorProto.FLOAT, [1, 1, 3, 3]
              ),
          ],
          outputs=[
              make_tensor_value_info(
                  "Y", onnx.TensorProto.FLOAT, [1, 1, 3, 3]
              )
          ],
      )
      model_def = make_model(graph_def, producer_name="conv-test")
      # We intentional rewrite the input/output name so test that the
      # input/output binding of c2 op is positional
      op = core.CreateOperator(
          "Onnxifi",
          ["X0"],
          ["Y0"],
          onnx_model=model_def.SerializeToString(),
          initializers=["W", "W0"],
          input_names=["X"],
          output_names=["Y"],
          output_shape_hint_0=[ONNXIFI_DATATYPE_FLOAT32, 1, 1, 3, 3],
      )
      workspace.FeedBlob("X0", X)
      workspace.FeedBlob("W0", W)
      workspace.RunOperatorOnce(op)
      Y = workspace.FetchBlob("Y0")
      np.testing.assert_almost_equal(Y, Y_without_padding)
  
imports: import numpy
  import time
  import unittest
  import onnx
  import onnx.defs
  from onnx.backend.base import namedtupledict
  from onnx.helper import make_node, make_graph, make_tensor_value_info, make_model
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, workspace
  from caffe2.python.models.download import ModelDownloader
  from caffe2.python.onnx.onnxifi import onnxifi_caffe2_net
  from caffe2.python.onnx.tests.test_utils import TestCase
label_desc: Use image node_id 2 for calling the OnnxifiTest obj's underlying member method code with example usage: obj.test_conv_graph() without return types