mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 00:19:58 +01:00
Improvement of the regular expression
This commit is contained in:
parent
8f0f9a8e2b
commit
682f4cf312
|
|
@ -970,7 +970,7 @@ def get_native_cuda_compute_capabilities(environ_cp):
|
|||
if os.path.isfile(device_query_bin) and os.access(device_query_bin, os.X_OK):
|
||||
try:
|
||||
output = run_shell(device_query_bin).split('\n')
|
||||
pattern = re.compile('[0-9]*\\.[0-9]*')
|
||||
pattern = re.compile('\d*\\.\d*')
|
||||
output = [pattern.search(x) for x in output if 'Capability' in x]
|
||||
output = ','.join(x.group() for x in output if x is not None)
|
||||
except subprocess.CalledProcessError:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user