def METHOD_NAME(inp, mod, params=None, opts=None):
    """Compile Relay module and hardware library
    Paramters
    ---------
    inp : Data
        The input data.
    mod : Module
        The relay module.
    params : Parameters
        The model Parameters.
    opts : Dict
        The compiler
    Returns
    -------
    out : Data
        The output data.
    """
    with tvm.transform.PassContext(opt_level=3, config={"relay.ext.verilator.options": opts}):
        lib = relay.vm.compile(mod, target="llvm", params=params)
    code, lib = lib.save()
    exe = runtime.vm.Executable.load_exec(code, lib)
    vm = runtime.vm.VirtualMachine(exe, tvm.cpu())
    out = vm.run(**inp)
    return out