From aebf223478c7da92bee1cd1faf0966d355835432 Mon Sep 17 00:00:00 2001 From: Zhou Wei <52485244+zhouwei25@users.noreply.github.com> Date: Sun, 28 Feb 2021 21:38:15 +0800 Subject: [PATCH] fix test_check_abi (#31288) --- python/paddle/fluid/tests/custom_op/test_check_abi.py | 2 +- python/paddle/utils/cpp_extension/extension_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/custom_op/test_check_abi.py b/python/paddle/fluid/tests/custom_op/test_check_abi.py index 3ea7c35ee0..1a38b79eb9 100644 --- a/python/paddle/fluid/tests/custom_op/test_check_abi.py +++ b/python/paddle/fluid/tests/custom_op/test_check_abi.py @@ -61,7 +61,7 @@ class TestCheckCompiler(TestABIBase): def test_wrong_compiler_warning(self): # clear environ self.del_environ() - compiler = 'nvcc' # fake wrong compiler + compiler = 'python' # fake wrong compiler with warnings.catch_warnings(record=True) as error: flag = utils.check_abi_compatibility(compiler, verbose=True) # check return False diff --git a/python/paddle/utils/cpp_extension/extension_utils.py b/python/paddle/utils/cpp_extension/extension_utils.py index 475928f243..220742454e 100644 --- a/python/paddle/utils/cpp_extension/extension_utils.py +++ b/python/paddle/utils/cpp_extension/extension_utils.py @@ -930,7 +930,7 @@ def check_abi_compatibility(compiler, verbose=False): return True warnings.warn( ABI_INCOMPATIBILITY_WARNING.format( - user_compiler=compiler, version=version.strip())) + user_compiler=compiler, version='.'.join(version))) return False -- GitLab