[Question] Target configuration

Hi everyone,

Currently, I’m working on implementing a pipeline executor with the ethosn target. To guide my work, I’m referring to the TVM Documentation - Using Pipeline Executor in Relay.

In my code, I declare the ethosn target using the following snippet:
target_host = "llvm -device=arm_cpu -mtriple=aarch64-linux-gnu -mcpu=cortex-a55 -mattr=+neon"
ethosn = tvm.target.Target(
        "kind": "ethosn",
        "use_3xtf32": True,
        "split_k_slices": [1],
        "profile_all_alignments": False,
        "find_first_valid": True,
        "use_multiprocessing": True,
        "use_fast_math": False,
        "tmp_dir": "./tmp",

def ethosn_build(mod, target, params=None, target_host=None, mod_name="default"):
    target = [target, ethosn]
    lib = relay.build_module.build(
        mod, target=target, params=params, target_host=target_host, mod_name=mod_name
    return lib

I’ve attempted to modify the “kind” attribute with both “ethosn” and “ethos-n”, but both attempts resulted in the following error message:

ValueError: Target kind “ethos-n” is not defined. Target creation from config dict failed: {“use_fast_math”: (bool)0, “tmp_dir”: “./tmp”, “profile_all_alignments”: (bool)0, “find_first_valid”: (bool)1, “use_multiprocessing”: (bool)1, “use_3xtf32”: (bool)1, “kind”: “ethosn”, “split_k_slices”: [1]}

Upon tracing the tvm.target.Target code and attempting to list all available target names using tvm.target.Target.list_kinds(), I noticed that both “cutlass” and “ethosn” are missing from the list.

Do I need to register the target before using it? How can I solve this problem?

Thank you for your assistance.

There is effectively no ethos-n target registered.

You can refer to the ethos-n test scripts to see how to build for ethos-n.