Skip to content

Conversation

@Lunderberg
Copy link
Contributor

I put this together following TVM PR#8528, which resolved an issue with array access in the Vulkan runtime, but led to/exposed some inconsistencies in the TIR semantics for buffer indices. Vulkan/SPIR-V require all arrays to be typed, and doesn't allow type casts that would be permissible in C code, such as casting between float32* and float32x2*. As a result, any vectorized load/store operations must act on an array whose elements are vectorized types.

Currently, many places in IR (e.g. Load::Load checking the number of output lanes) and codegen (e.g. CodeGenC's LoadNode loop over output lanes rather than element/index lanes) implicitly assume that all array elements have lanes == 1.

I couldn't find any documentation on intended semantics for these multi-lane array indices, and so I wanted to propose, discuss, and document the intended semantics.

@Lunderberg
Copy link
Contributor Author

@Lunderberg Lunderberg closed this Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant