code: def _qnn_dense_legalize_cuda(attrs, inputs, types):
      if is_target("vulkan"):
          # prefers the dtypes to be same. Mixed type is not yet supported.
          return helper_change_dtypes_to_be_same(
              attrs, inputs, types, relay.qnn.op.dense
          )
      if is_target(["cuda", "rocm"]):
          # CUDA prefers both datatypes to be the int8.
          return helper_change_dtypes_to_int8(
              attrs, inputs, types, relay.qnn.op.dense
          )
      return None
  
imports: import numpy
  from scipy import special
  import tvm
  from tvm import relay
  from tvm._ffi.base import TVMError
  from tvm.relay.qnn.op.canonicalizations import create_integer_lookup_op
  from ....target.x86 import target_has_features
  from ....topi.utils import is_target
  from ..None import op
label_desc: Use image node_id 23 for calling a global function with example usage: _qnn_dense_legalize_cuda(attrs, inputs, types) and returns: None, helper_change_dtypes_to_be_same, helper_change_dtypes_to_int8