A change that has not yet been included in the prototype was the predicate 
representation on buffer loads/stores in TVMScript programs. This was briefly 
referenced in the RFC: 
https://github.com/apache/tvm-rfcs/pull/104/files#diff-6724c2a24eb34f7094b4ff2e8562f7812e6e22c8197f51792f4b5cdfa811fec4R214.

So far we have explored the following options:
```
1. A[i:i+4, predicate=T.get_active_lane_mask(0, 4)]
```
In python, keyword arguments within subscripts are not supported. Without a 
keyword argument, e.g. `[i:i+4, T.get_active_lane_mask(0, 4)]`, it wouldn't be 
easy to tell (when reading the TVMScript) if the last argument refers to 
another dimension of the buffer or a predicate.

```
2. A[i:i+4](predicate=T.get_active_lane_mask(0, 4))
```
When this approach is used to represent a buffer store (the expression is to 
the left of an assignment), it creates invalid python code: "cannot assign to a 
function call".

```
3. A(predicate=T.get_active_lane_mask(0, 4))[i:i+4]
```
This is the only syntactically valid approach. However, the predicate is now 
associated with the buffer itself, as opposed to the buffer load/store.

I'm curious to hear from folks more familiar with TVMScript if there are any 
other options we've not considered?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm-rfcs/pull/104#issuecomment-1881431496
You are receiving this because you are subscribed to this thread.

Message ID: <apache/tvm-rfcs/pull/104/c1881431...@github.com>

Reply via email to