Debug_executor and graph_executor have different result

Description:

Hi all, For the same model and input, debug_executor produced different predicted results from graph_executor, How strange it is?

What causes this? Thanks for any comments in advance!

The reproducible script:

def run(model_path):

    dev = tvm.cpu()
   
    lib = tvm.runtime.load_module(model_path)
    dmod = debugger.debug_executor.create(lib["get_graph_json"](), lib, dev, dump_root="./tvm")
    gmod = graph_executor.create(lib["get_graph_json"](), lib, dev)
    data = np.ones([1,2050]).astype("float32")
    buffer_data = np.ones([94888,]).astype("float32")
    gmod.set_input("inputs",data)
    dmod.set_input("inputs",data)
    gmod.set_input("buffers",buffer_data)
    dmod.set_input("buffers",buffer_data)
    gmod.run()
    dmod.run()
    print("graph out:")
    print(gmod.get_output(0))
    print("debug graph out:")
    print(dmod.get_output(0))

result

DebugExecutor’s “create” loads parameters, while GraphExecutor’s “create” doesn’t. You can try loading the param from lib after create.

thx,it work. but can u tell why? why debug executor will load parameters,but graph executor dont need do this ?