See SingleLayerConv_RCIO for an example. The ifThenElse node thinks that things defined inside of its scope are inputs to the kernel. I think it has something to do with binds not looking beyond the first layer?
val ins = func.flatMap(_.nestedInputs)
val binds = lhs.op.map{d => d.binds ++ d.blocks.map(_.result) }.getOrElse(Set.empty).toSeq
val inputs = (lhs.op.map{_.inputs}.getOrElse(Nil) ++ ins).filterNot(_.isMem).distinct diff binds
See SingleLayerConv_RCIO for an example. The ifThenElse node thinks that things defined inside of its scope are inputs to the kernel. I think it has something to do with binds not looking beyond the first layer?