Deepcopy of expr


#1

Is it possible to do a deep copy of Relay expression in C++?


#2

atm we don’t have a util to do so but can be implemented via a Functor. However, given that most of the nodes are immutable, it is not necessary to do a deep copy


#3

I was having some issues with CallNode attrs which is mutable.


#4

As far as i understand the attrs of CallNode should not be mutable, so perhaps we can double check what was going on in our logic and fix that instead


#5

Very possible. I will look at it again. I was hacking around and was not using right SW practices :slight_smile: