iree icon indicating copy to clipboard operation
iree copied to clipboard

Importing an unavailable exported_name from TF doesn't error

Open phoenix-meadowlark opened this issue 4 years ago • 2 comments

Asking to compile an exported name that doesn't exist in a saved module / module should throw an error, but currently doesn't. This can be confusing when tf.functions are created, but silently fail to save or load during saved model creation/loading.

class AddModule(tf.Module):

  def add(self, a, b):
    return a + b

# Returns an empty module because 'add' is not a tf.function
asm = iree.compiler.tf.compile_module(
    AddModule(), import_only=True, exported_names=["add"])
print(asm.decode("utf-8"))
"module"() ( {
  "module_terminator"() : () -> () loc(#loc)
}) : () -> () loc(#loc)
#loc = loc(unknown)

phoenix-meadowlark avatar Apr 02 '21 18:04 phoenix-meadowlark

Routing to @jpienaar and @rsuderman to asses and add priority if needed.

allieculp avatar Jul 06 '22 17:07 allieculp

@not-jenni Can you add priority to this while on frontend rotation?

allieculp avatar Jul 18 '22 16:07 allieculp

Ho there! This bug hasn't been updated in a long time. Good intentions and all, but we're moving this to the backlog. Feel free to bring it back if you think there's a reasonable chance it'll get worked on in the next 6mo!

aaron-schneider avatar Apr 17 '23 23:04 aaron-schneider

Going to call this obsolete, as the TensorFlow export APIs have changed a few times and the TensorFlow frontend is a lower priority.

ScottTodd avatar Dec 15 '23 22:12 ScottTodd