parameters: (environ_cp)
return_statement: return output
docstring: Get native cuda compute capabilities.
  
    Args:
      environ_cp: copy of the os.environ.
  
    Returns:
      string of native cuda compute capabilities, separated by comma.
docstring_summary: Get native cuda compute capabilities.
docstring_tokens: Get native cuda compute capabilities .
function: def get_native_cuda_compute_capabilities(environ_cp):
    """Get native cuda compute capabilities.
  
    Args:
      environ_cp: copy of the os.environ.
  
    Returns:
      string of native cuda compute capabilities, separated by comma.
    """
    device_query_bin = os.path.join(
        environ_cp.get('CUDA_TOOLKIT_PATH'), 'extras/demo_suite/deviceQuery')
    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]*')
        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:
        output = ''
    else:
      output = ''
    return output
function_tokens: def get_native_cuda_compute_capabilities ( environ_cp ) : device_query_bin = os . path . join ( environ_cp . get ( 'CUDA_TOOLKIT_PATH' ) , 'extras/demo_suite/deviceQuery' ) 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]*' ) 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 : output = '' else : output = '' return output