We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7da058c commit 58e5fa2Copy full SHA for 58e5fa2
python/paddle/base/core.py
@@ -14,7 +14,6 @@
14
15
import os
16
import platform
17
-import re
18
import site
19
import sys
20
import warnings
@@ -194,18 +193,8 @@ def run_shell_command(cmd):
194
193
return out.decode('utf-8').strip()
195
196
197
-def is_valid_filename(filename):
198
- pattern = re.compile(r'^[a-zA-Z0-9_.-]+$')
199
- if pattern.match(filename):
200
- return True
201
- else:
202
- return False
203
-
204
205
def get_dso_path(core_so, dso_name):
206
if core_so and dso_name:
207
- assert is_valid_filename(core_so), 'core_so must be a file name.'
208
- assert is_valid_filename(dso_name), 'dso_name must be a file name.'
209
return run_shell_command(
210
f"ldd {core_so}|grep {dso_name}|awk '{{print $3}}'"
211
)
0 commit comments