Skip to content

Commit 88928a4

Browse files
authored
[HEXAGON] Auto-vectorization (fp16) for v68 (#12397)
* Auto-vectorization (fp16) for v68 * use tvm.testing.main in fp16 test of tanh_slice op
1 parent a96bda4 commit 88928a4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

python/tvm/target/target.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,12 @@ def create_llvm_options(cpu_ver, config): # pylint: disable=unused-argument
724724

725725
llvm_options = config["llvm_options"]
726726

727+
# To enable auto-vectorization for v68 target added the below llvm-option by default
728+
if arch_version == 68:
729+
if not llvm_options:
730+
llvm_options = ""
731+
llvm_options += " -force-hvx-float"
732+
727733
# TVM's option parser doesn't allow '=' in values, but '=' can
728734
# appear in LLVM flags. Replace it with '@', since it's unlikely
729735
# that '@' will be used in another context.

tests/python/contrib/test_hexagon/topi/test_tanh_slice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ def test_tanh(
106106

107107

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

0 commit comments

Comments
 (0)