Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/tvm/target/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,12 @@ def create_llvm_options(cpu_ver, config): # pylint: disable=unused-argument

llvm_options = config["llvm_options"]

# To enable auto-vectorization for v68 target added the below llvm-option by default
if arch_version == 68:
if not llvm_options:
llvm_options = ""
llvm_options += " -force-hvx-float"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this flag impose any new requirements regarding which LLVM versions TVM needs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, are there any potential downsides or other side-effects of using this flag? Asking because with compiler flags, the word "force" sometimes implies that the resulting behavior isn't always a good idea.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will work with any LLVM version that supports v69. It's fine to use it.

# TVM's option parser doesn't allow '=' in values, but '=' can
# appear in LLVM flags. Replace it with '@', since it's unlikely
# that '@' will be used in another context.
Expand Down
2 changes: 1 addition & 1 deletion tests/python/contrib/test_hexagon/topi/test_tanh_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ def test_tanh(


if __name__ == "__main__":
sys.exit(pytest.main(sys.argv))
tvm.testing.main()