From the tvm docs, there are two ways to implement a pass: Using Python Decorator or Use C++. I found most relay passes are implemented by C++, such as fold_constant, etc,. Only one pass named ChangeBatch(https://github.com/apache/tvm/blob/main/python/tvm/relay/transform/transform.py#L1062) is impled using Python Decorator.
So if I want to add a custom relay pass, is it better to implemented it by C++?