@junrushao1994 If by "meta programming" you mean an ability to call python 
function from script to generate other code, and embed the generated code into 
the calling context, then YES, we absolutely need this! I think it's called 
"splicing" or "unquote" in the literature. 

The lack of such feature is what turned me away from hybrid script. Since there 
is basically no abstraction to compose multiple code to generate bigger code, I 
had to manually duplicate a lot of code. The resulting code is super ugly (just 
look at various shape functions). For example, 
https://github.com/apache/tvm/blob/8e23806d2d522b71979d0a2730b38cc5c3bf6185/python/tvm/relay/op/_transform.py#L1000-L1008
 (this one I wrote)

For examples of kind of programming style we've developed for ir builder, see 
`topi/cuda/sort.py` or `topi/cuda/nms.py`. cc @mbrookhart





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/rfc-tensorir-a-schedulable-ir-for-tvm/7872/60)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/dd7c78090fae7b2639c16f042e9edd905248fe7ef098a74acb9eff11069b39e5).

Reply via email to