def METHOD_NAME(target_dir):
    """Compiles resnet18 with TVM"""
    # Download the pretrained model in MxNet's format.
    block = get_model("resnet18_v1", pretrained=True)
    shape_dict = {"data": (1, 3, 224, 224)}
    mod, params = relay.frontend.from_mxnet(block, shape_dict)
    # Add softmax to do classification in last layer.
    func = mod["main"]
    func = relay.Function(
        func.params, relay.nn.softmax(func.body), None, func.type_params, func.attrs
    )
    target = "llvm"
    with tvm.transform.PassContext(opt_level=3):
        graph, lib, params = relay.METHOD_NAME(func, target, params=params)
    # save the model artifacts
    deploy_lib = osp.join(target_dir, "deploy_lib.o")
    lib.save(deploy_lib)
    cc.create_shared(osp.join(target_dir, "deploy_lib.so"), [osp.join(target_dir, "deploy_lib.o")])
    with open(osp.join(target_dir, "deploy_graph.json"), "w") as fo:
        fo.write(graph)
    with open(osp.join(target_dir, "deploy_param.params"), "wb") as fo:
        fo.write(runtime.save_param_dict(params))