From c64da88f3fb681e65aca2627121be4c5e7f64432 Mon Sep 17 00:00:00 2001
From: yhliang <429259365@qq.com>
Date: 星期二, 18 四月 2023 18:44:58 +0800
Subject: [PATCH] Merge branch 'dev_lyh' of https://github.com/alibaba-damo-academy/FunASR into dev_lyh
---
funasr/export/models/modules/multihead_att.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/export/models/modules/multihead_att.py b/funasr/export/models/modules/multihead_att.py
index 1983db8..6fce851 100644
--- a/funasr/export/models/modules/multihead_att.py
+++ b/funasr/export/models/modules/multihead_att.py
@@ -75,8 +75,8 @@
return x, cache
-torch_version = float(".".join(torch.__version__.split(".")[:2]))
-if torch_version >= 1.8:
+torch_version = tuple([int(i) for i in torch.__version__.split(".")[:2]])
+if torch_version >= (1, 8):
import torch.fx
torch.fx.wrap('preprocess_for_attn')
--
Gitblit v1.9.1