code: def compute_conv2d_instructions(
      self, in_H, in_W, in_C, kernel_size=3, stride=1, pad=0
  ):
      if isinstance(kernel_size, Iterable):
          kernel_height = kernel_size[0]
          kernel_width = kernel_size[1]
      else:
          kernel_height = kernel_size
          kernel_width = kernel_size
  
      if isinstance(stride, Iterable):
          stride_height = stride[0]
          stride_width = stride[1]
      else:
          stride_height = stride
          stride_width = stride
  
      # Current limitations
      assert kernel_height == kernel_width
      assert stride_height == stride_width
      assert pad == 0
  
      if kernel_height >= stride_height:
          min_H = (
              math.ceil(kernel_height / stride_height) - 1
          ) * stride_height + kernel_height
      else:
          min_H = (
              math.ceil(stride_height / kernel_height) - 1
          ) * stride_height + kernel_height
  
      if min_H > in_H:
          min_H = in_H
  
      if kernel_width >= stride_width:
          min_W = (
              math.ceil(kernel_width / stride_width) - 1
          ) * stride_width + kernel_width
      else:
          min_W = (
              math.ceil(stride_width / kernel_width) - 1
          ) * stride_width + kernel_width
  
      if min_W > in_W:
          min_W = in_W
  
      min_oH = int((min_H - kernel_height) // stride_height + 1)
      min_oW = int((min_W - kernel_width) // stride_width + 1)
  
      out_H = int((in_H - kernel_height) // stride_height + 1)
      out_W = int((in_W - kernel_width) // stride_width + 1)
      scaled_H = (out_H - 1) * stride_height + kernel_height
      scaled_W = (out_W - 1) * stride_width + kernel_width
  
      if scaled_H < in_H:
          min_H += 1
      if scaled_W < in_W:
          min_W += 1
  
      # Let's hardcode a few common cases:
      if (
          min_H == 1
          and min_W == 1
          and kernel_height == 1
          and kernel_width == 1
          and stride == 1
          and scaled_H == in_H
          and scaled_W == in_W
      ):
          return (1, 1, map(str, [1]))
      if (
          min_H == 5
          and min_W == 5
          and kernel_height == 3
          and kernel_width == 3
          and stride == 1
          and scaled_H == in_H
          and scaled_W == in_W
      ):
          return (
              5,
              5,
              map(
                  str,
                  [
                      1,
                      3,
                      7,
                      6,
                      4,
                      9,
                      27,
                      63,
                      54,
                      36,
                      73,
                      219,
                      511,
                      438,
                      292,
                      72,
                      216,
                      504,
                      432,
                      288,
                      64,
                      192,
                      448,
                      384,
                      256,
                  ],
              ),
          )
      if (
          min_H == 9
          and min_W == 9
          and kernel_height == 5
          and kernel_width == 5
          and stride == 1
          and scaled_H == in_H
          and scaled_W == in_W
      ):
          return (
              9,
              9,
              map(
                  str,
                  [
                      1,
                      3,
                      7,
                      15,
                      31,
                      30,
                      28,
                      24,
                      16,
                      33,
                      99,
                      231,
                      495,
                      1023,
                      990,
                      924,
                      792,
                      528,
                      1057,
                      3171,
                      7399,
                      15855,
                      32767,
                      31710,
                      29596,
                      25368,
                      16912,
                      33825,
                      101475,
                      236775,
                      507375,
                      1048575,
                      1014750,
                      947100,
                      811800,
                      541200,
                      1082401,
                      3247203,
                      7576807,
                      16236015,
                      33554431,
                      32472030,
                      30307228,
                      25977624,
                      17318416,
                      1082400,
                      3247200,
                      7576800,
                      16236000,
                      33554400,
                      32472000,
                      30307200,
                      25977600,
                      17318400,
                      1082368,
                      3247104,
                      7576576,
                      16235520,
                      33553408,
                      32471040,
                      30306304,
                      25976832,
                      17317888,
                      1081344,
                      3244032,
                      7569408,
                      16220160,
                      33521664,
                      32440320,
                      30277632,
                      25952256,
                      17301504,
                      1048576,
                      3145728,
                      7340032,
                      15728640,
                      32505856,
                      31457280,
                      29360128,
                      25165824,
                      16777216,
                  ],
              ),
          )
  
      windows_bin = [
          [0 for _ in range(kernel_height * kernel_width)]
          for _ in range(min_H * min_W)
      ]
  
      for i_oh in range(min_oH):
          for i_ow in range(min_oW):
              for i_fh in range(kernel_height):
                  for i_fw in range(kernel_width):
                      index_data = (
                          i_oh * stride_height + i_fh - pad
                      ) * min_W + (i_ow * stride_width + i_fw - pad)
                      windows_bin[index_data][
                          i_fh * kernel_width + i_fw
                      ] = 1
  
      windows_int = []
  
      for i in range(min_H):
          for j in range(min_W):
              windows_int.append(
                  int(
                      "".join(
                          str(p)
                          for p in reversed(windows_bin[i * min_W + j])
                      ),
                      2,
                  )
              )
  
      return (min_H, min_W, windows_int)
  
imports: import math
  import os
  import re
  from bisect import bisect_left
  from collections.abc import Iterable
  import numpy
  from hls4ml.backends.backend import Backend
  from hls4ml.model.attributes import ChoiceAttribute, ConfigurableAttribute, TypeAttribute
  from hls4ml.model.layers import GRU, LSTM, Activation, BatchNormalization, Conv1D, Conv2D, Dense, Dot, Embedding, GarNet, GarNetStack, GlobalPooling1D, GlobalPooling2D, Pooling1D, Pooling2D, SeparableConv1D, SeparableConv2D, SimpleRNN, Softmax
  from hls4ml.model.optimizer import model_optimizer
  from hls4ml.model.types import ExponentPrecisionType, FixedPrecisionType, IntegerPrecisionType, RoundingMode, SaturationMode, XnorPrecisionType
  from hls4ml.writer import get_writer
label_desc: Use image node_id 18 for calling the FPGABackend obj's underlying member method code with example usage: obj.compute_conv2d_instructions(in_H, in_W, in_C, kernel_size, stride, pad) and returns: min_H,  min_W,  windows_int, int,  int,  map, int,  int,  map, int,  int,  map