Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM] Auto-convert shuffle with single index to "extract element" #6006

Merged
merged 2 commits into from
Jul 8, 2020
Merged

[LLVM] Auto-convert shuffle with single index to "extract element" #6006

merged 2 commits into from
Jul 8, 2020

Conversation

kparzysz-quic
Copy link
Contributor

Data types with a single lane are treated as scalars in TVM. On the other hand, in LLVM there is a difference between a scalar type and a vector type with a single lane. Because of that, a shuffle with a single index is equivalent to extracting an element in TIR, but not in the generated LLVM IR. This patch changes the LLVM codegen for shuffle to auto-convert single-lane vectors to scalars.

Krzysztof Parzyszek added 2 commits July 7, 2020 11:42
Data types with a single lane are treated as scalars in TVM. On the
other hand, in LLVM there is a difference between a scalar type and
a vector type with a single lane. Because of that, a shuffle with
a single index is equivalent to extracting an element in TIR, but
not in the generated LLVM IR. This patch changes the LLVM codegen
for shuffle to auto-convert single-lane vectors to scalars.
@tqchen tqchen merged commit 1cd56da into apache:master Jul 8, 2020
@kparzysz-quic kparzysz-quic deleted the shuff-scalar branch July 8, 2020 11:45
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jul 14, 2020
…pache#6006)

* [LLVM] Auto-convert shuffle with single index to "extract element"

Data types with a single lane are treated as scalars in TVM. On the
other hand, in LLVM there is a difference between a scalar type and
a vector type with a single lane. Because of that, a shuffle with
a single index is equivalent to extracting an element in TIR, but
not in the generated LLVM IR. This patch changes the LLVM codegen
for shuffle to auto-convert single-lane vectors to scalars.

* Try another build
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jul 14, 2020
…pache#6006)

* [LLVM] Auto-convert shuffle with single index to "extract element"

Data types with a single lane are treated as scalars in TVM. On the
other hand, in LLVM there is a difference between a scalar type and
a vector type with a single lane. Because of that, a shuffle with
a single index is equivalent to extracting an element in TIR, but
not in the generated LLVM IR. This patch changes the LLVM codegen
for shuffle to auto-convert single-lane vectors to scalars.

* Try another build
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.

2 participants