code: def _hswish(fp32_piggy_back=False):
      def _impl_fp32(inputs):
          # refer to src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp
          # They fallback to fp32
          def relu6(x):
              return _op.tensor.clip(x, 0.0, 6.0)
  
          def hardsigmoid(x):
              dtype = "float32"
              return relu6(
                  x + _expr.const(3.0, dtype=dtype)
              ) / _expr.const(6.0, dtype=dtype)
  
          output_scale = _expr.const(inputs[1])
          output_zero_point = _expr.const(inputs[2])
          input_scale = _expr.const(inputs[3])
          input_zero_point = _expr.const(inputs[4])
  
          dequant = relay.qnn.op.dequantize(
              inputs[0], input_scale, input_zero_point, axis=1
          )
          dequantized_hswish = dequant * hardsigmoid(dequant)
          return relay.qnn.op.quantize(
              dequantized_hswish,
              output_scale,
              output_zero_point,
              out_dtype="uint8",
          )
  
      def _impl_int8(inputs):
          output_scale = _expr.const(inputs[1])
          output_zero_point = _expr.const(inputs[2])
          input_scale = _expr.const(inputs[3])
          input_zero_point = _expr.const(inputs[4])
          return relay.qnn.op.hardswish(
              inputs[0],
              input_scale,
              input_zero_point,
              output_scale,
              output_zero_point,
          )
  
      def _impl(inputs, _):
          assert (
              len(inputs) == 5
          ), "Input quant params not found in op inputs"
          if fp32_piggy_back:
              return _impl_fp32(inputs)
          return _impl_int8(inputs)
  
      return _impl
  
imports: import numpy
  import tvm
  from tvm import relay
  from tvm.relay import expr
  from tvm.relay import op
  from tvm.relay.frontend.common import infer_shape
  from .common import logger
  from .pytorch_utils import is_version_greater_than
label_desc: Use image node_id 33 for calling a global function with example usage: _hswish(fp32_piggy_back) and returns: _impl, relay, relay, _impl_int8, _op, unknown, _impl_fp32