diff --git a/debug/accuracy_tools/ptdbg_ascend/configure.py b/debug/accuracy_tools/ptdbg_ascend/configure.py index b914b32e9f9ffbe0028dbd05184970c38d388b9d..dc55c839cb63f255b8753e9dfd3d44b43cc8b835 100644 --- a/debug/accuracy_tools/ptdbg_ascend/configure.py +++ b/debug/accuracy_tools/ptdbg_ascend/configure.py @@ -15,7 +15,6 @@ import os import subprocess import sys -_PYTORCH_VERSION_1_8 = "1.8" _PYTORCH_VERSION_1_11 = "1.11" _PYTORCH_VERSION_2_0 = "2.0" _PYTORCH_VERSION_2_1 = "2.1" @@ -50,7 +49,7 @@ def setup_python(env_path): """Get python install path.""" default_python_bin_path = sys.executable ask_python_bin_path = ('Please specify the location of python with valid ' - 'pytorch 1.8/1.11/2.0/2.1 site-packages installed. [Default ' + 'pytorch 1.11/2.0/2.1 site-packages installed. [Default ' 'is %s]\n(You can make this quiet by set env ' '[ADAPTER_TARGET_PYTHON_PATH]): ') % default_python_bin_path custom_python_bin_path = env_path @@ -77,12 +76,11 @@ def setup_python(env_path): python_bin_path, '-c', 'import distutils.sysconfig; import torch; print(torch.__version__ + "|" +' ' "|".join(torch.__path__) + "|" + distutils.sysconfig.get_python_inc())']).split("|") - if (not compile_args[0].startswith(_PYTORCH_VERSION_1_8)) and \ - (not compile_args[0].startswith(_PYTORCH_VERSION_1_11)) and \ + if (not compile_args[0].startswith(_PYTORCH_VERSION_1_11)) and \ (not compile_args[0].startswith(_PYTORCH_VERSION_2_0)) and \ (not compile_args[0].startswith(_PYTORCH_VERSION_2_1)): print('Currently supported Pytorch version is %s/%s, we got %s.' - % (_PYTORCH_VERSION_1_8, _PYTORCH_VERSION_1_11, _PYTORCH_VERSION_2_0, _PYTORCH_VERSION_2_1, compile_args[0])) + % (_PYTORCH_VERSION_1_11, _PYTORCH_VERSION_2_0, _PYTORCH_VERSION_2_1, compile_args[0])) continue except subprocess.CalledProcessError: print('Pytorch is not installed or does not work properly.') diff --git a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/common/utils.py b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/common/utils.py index 21cae3c52a0c3e486a4c28ce08d497865ea4d582..8f64b251a8123eb6a01dbbcf2eac9783415c401d 100644 --- a/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/common/utils.py +++ b/debug/accuracy_tools/ptdbg_ascend/src/python/ptdbg_ascend/common/utils.py @@ -157,7 +157,6 @@ class VersionCheck: """ Class for TorchVersion """ - V1_8 = "1.8" V1_11 = "1.11" V2_0 = "2.0" V2_1 = "2.1" diff --git a/debug/accuracy_tools/ptdbg_ascend/test/ut/test_common_util.py b/debug/accuracy_tools/ptdbg_ascend/test/ut/test_common_util.py index 61cbf29f2135e30389eedea511b1c4431ee2fbe1..324d68a7299b7da94d6dff49b2754f18840d1ca0 100644 --- a/debug/accuracy_tools/ptdbg_ascend/test/ut/test_common_util.py +++ b/debug/accuracy_tools/ptdbg_ascend/test/ut/test_common_util.py @@ -9,13 +9,12 @@ class TestCommonUtilsMethods(unittest.TestCase): def test_VersionCheck(self): V0_1 = "0.1" - V1_8 = "1.8" V1_11 = "1.11" V2_0 = "2.0" V2_1 = "2.1" version_check = common.VersionCheck self.assertFalse(version_check.check_torch_version(V0_1)) - self.assertTrue(version_check.check_torch_version(V1_8) or version_check.check_torch_version(V1_11) or version_check.check_torch_version(V2_0) or version_check.check_torch_version(V2_1)) + self.assertTrue(version_check.check_torch_version(V1_11) or version_check.check_torch_version(V2_0) or version_check.check_torch_version(V2_1)) def test_check_mode_valid(self): mode_check = common.check_mode_valid