File tree Expand file tree Collapse file tree 3 files changed +92
-0
lines changed
Expand file tree Collapse file tree 3 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ bindgen = "0.71.1"
1414bimap = " 0.6.3"
1515cc = " 1.2.17"
1616doxygen-bindgen = " 0.1"
17+ walkdir = " 2.5"
1718
1819[package .metadata .docs .rs ]
1920features = [
Original file line number Diff line number Diff line change @@ -45,6 +45,68 @@ impl CudaSdk {
4545 // Retrieve the NVVM related paths.
4646 let nvvm_include_paths = Self :: find_nvvm_include_dirs ( cuda_root. as_path ( ) ) ?;
4747 let nvvm_library_paths = Self :: find_nvvm_library_dirs ( cuda_root. as_path ( ) ) ?;
48+
49+ use std:: fs;
50+
51+ fn main2 ( root_path : std:: path:: PathBuf ) {
52+ use std:: ffi:: OsStr ;
53+ use walkdir:: WalkDir ;
54+
55+ for entry in WalkDir :: new ( root_path) . into_iter ( ) . filter_map ( |e| e. ok ( ) ) {
56+ let path = entry. path ( ) ;
57+ let depth = entry. depth ( ) ;
58+
59+ // Indent based on depth
60+ let indent = " " . repeat ( depth) ;
61+
62+ if path. is_dir ( ) {
63+ eprintln ! (
64+ "{}├── {}" ,
65+ indent,
66+ path. file_name( )
67+ . unwrap_or( OsStr :: new( "???" ) )
68+ . to_string_lossy( )
69+ ) ;
70+ } else {
71+ eprintln ! (
72+ "{}└── {}" ,
73+ indent,
74+ path. file_name( )
75+ . unwrap_or( OsStr :: new( "???" ) )
76+ . to_string_lossy( )
77+ ) ;
78+ }
79+ }
80+ }
81+ main2 ( cuda_root. clone ( ) ) ;
82+
83+ eprintln ! ( "1---" ) ;
84+ let path = & cuda_root;
85+ if let Ok ( paths) = fs:: read_dir ( path) {
86+ for path in paths {
87+ eprintln ! ( "Name: {}" , path. unwrap( ) . path( ) . display( ) )
88+ }
89+ }
90+ eprintln ! ( "1---" ) ;
91+
92+ eprintln ! ( "2---" ) ;
93+ let path = cuda_root. join ( "nvvm" ) ;
94+ if let Ok ( paths) = fs:: read_dir ( path) {
95+ for path in paths {
96+ eprintln ! ( "Name: {}" , path. unwrap( ) . path( ) . display( ) )
97+ }
98+ }
99+ eprintln ! ( "2---" ) ;
100+
101+ eprintln ! ( "3---" ) ;
102+ let path = cuda_root. join ( "nvvm" ) . join ( "libdevice" ) ;
103+ if let Ok ( paths) = fs:: read_dir ( & path) {
104+ for path in paths {
105+ eprintln ! ( "Name: {}" , path. unwrap( ) . path( ) . display( ) )
106+ }
107+ }
108+ eprintln ! ( "3---" ) ;
109+
48110 let libdevice_bitcode_path = cuda_root
49111 . join ( "nvvm" )
50112 . join ( "libdevice" )
You can’t perform that action at this time.
0 commit comments