code: def test_compile_with_unsupported_variant():
      """Test compilation with unsupported variant."""
      dtype = "int8"
      input_shape = (1, 2, 2, 2)
  
      x = relay.var("x", shape=input_shape, dtype=dtype)
      y = relay.reshape(x, newshape=(1, 1, 1, 8))
      mod = tei.make_ethosn_partition(y)
  
      additional_config_args = {
          "variant": "foo",
          "inline_non_compute_intensive_partitions": False,
      }
  
      inputs = {
          "x": np.random.randint(
              low=np.iinfo(dtype).min,
              high=np.iinfo(dtype).max,
              size=input_shape,
              dtype=dtype,
          )
      }
  
      with pytest.raises(tvm.TVMError, match=r"Unknown NPU type"):
          tei.build_and_run(
              mod,
              inputs,
              1,
              {},
              True,
              additional_config_args=additional_config_args,
          )
  
file_path: tvm/tests/python/contrib/test_ethosn/test_codegen.py
imports: import pytest
  import numpy
  import tvm
  from tvm import relay
  from tvm.testing import requires_ethosn
  from .None import infrastructure
label_desc: Use image node_id 1 for calling a global function with example usage: test_compile_with_unsupported_variant() without return types