#NEWLINE# def default_cuda_root( ) : #NEWLINE# #INDENT# v = os . getenv ( 'CUDA_ROOT' , '' ) #NEWLINE# if v : #NEWLINE# #INDENT# return s #NEWLINE# #UNINDENT# s = os . getenv ( 'PATH' ) #NEWLINE# if ( not s ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# for dir in s . split ( os . path . pathsep ) : #NEWLINE# #INDENT# if os . path . exists ( os . path . join ( dir , 'nvcc' ) ) : #NEWLINE# #INDENT# return os . path . dirname ( os . path . abspath ( dir ) ) #NEWLINE# #UNINDENT# #UNINDENT# return ''