[RFC] Name for non-negative variable

As in this PR we introduce a new variable to tvm to represent variables which >= 0, this helps bound inference for floordiv/floormod/etc. We plan to encourage users to use this new type of variable in tvm.placeholder, tvm.compute etc.

This is a call for the name of the variable, we have choices,

  • TIndexVar (T stands for Tensor)
  • TensorIndexVar
  • ShapeVar (however in Relay, it means multi-dim tuple)
  • NonNegVar (could be too limited as we might embed bound in the future)
  • BoundedVar (could be too general though)

Please share your thoughts, and welcome new name proposal.

@tqchen @haichen @zhiics @yongwww @ziheng @comaniac @wweic @janimesh

In terms of the functionality, TensorIndexVar is definitely the clearest one but it’s too long. Maybe TensorIdxVar or NDIdxVar?

Maybe even just IdxVar, if tensor index is the only use case in TVM for indexing.

1 Like

I would say IndexVar or TensorIndexVar. It seems we have BoundVar somewhere in the code.

1 Like

Note that the term index could also leads to potential confusions (e.g. whether negative index is allowed in certain cases, of course we do not atm).

NonNeg seems to gives the clearest intention, while shape also indicates the thing is positive. Another alternative could be SizeVar(related to size_t in c)

1 Like

SizeVar or NonNegVar looks good to me. SizeVar probably is better.

SizeVar and NonNegVar looks good. Also how about RangeVar?

SizeVar sounds good to me

Thanks everyone, seems we can go with SizeVar. I’ll update the pull request accordingly.