Cached Key/Function in Lower process

I noticed these terms “CCachedKey”, “CCachedFunc” in lowering process in /src/relay/backend/compile_engine.cc.

  1. Why is there a ‘cache’?
  2. What’s its relationship to the lowering process?

Thanks.

Perhaps it is for compiling efficiency ?

In a NN Graph, there might exist many same structure relay functions (after relay Graph-Level Opt)。

So during lowering process, when meets a already lowered relay function, no need to lower again