AttributeError: 'Module' object has no attribute 'GetFunction'

I have a exported library, and using it in python, my code like this:

mods = tvm.runtime.load_module(lib_path)
    fc1 = mods.GetFunction(f'{prefix}_fc1')

Got error:

AttributeError: 'Module' object has no attribute 'GetFunction'

How to get the Func inside module?

Try mods.get_function(...) instead.

1 Like