You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by kp...@apache.org on 2022/08/18 17:40:11 UTC
[tvm] branch main updated: [HEXAGON] Auto-vectorization (fp16) for v68 (#12397)
This is an automated email from the ASF dual-hosted git repository.
kparzysz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 88928a40f1 [HEXAGON] Auto-vectorization (fp16) for v68 (#12397)
88928a40f1 is described below
commit 88928a40f15d080046dfe26200835670a9d8a925
Author: Aakanksha Verma <89...@users.noreply.github.com>
AuthorDate: Thu Aug 18 23:10:05 2022 +0530
[HEXAGON] Auto-vectorization (fp16) for v68 (#12397)
* Auto-vectorization (fp16) for v68
* use tvm.testing.main in fp16 test of tanh_slice op
---
python/tvm/target/target.py | 6 ++++++
tests/python/contrib/test_hexagon/topi/test_tanh_slice.py | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/python/tvm/target/target.py b/python/tvm/target/target.py
index e53c709627..aee4aa31a7 100644
--- a/python/tvm/target/target.py
+++ b/python/tvm/target/target.py
@@ -724,6 +724,12 @@ def hexagon(cpu_ver="v66", **kwargs):
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"
+
# 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.
diff --git a/tests/python/contrib/test_hexagon/topi/test_tanh_slice.py b/tests/python/contrib/test_hexagon/topi/test_tanh_slice.py
index b1e85971a2..d488d7dd46 100644
--- a/tests/python/contrib/test_hexagon/topi/test_tanh_slice.py
+++ b/tests/python/contrib/test_hexagon/topi/test_tanh_slice.py
@@ -106,4 +106,4 @@ class TestTanhSlice:
if __name__ == "__main__":
- sys.exit(pytest.main(sys.argv))
+ tvm.testing.main()