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 3ea7c35ee0d39531fc32ccc04ad495b6ba1da26c..1a38b79eb90ebc3c9afa31b8fbb78aa0b2a776ee 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 475928f2437d0ad4272580f5ce68b60c5cac1c67..220742454e46cde801e603119680e9e0f0e8968a 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