Find CUDA files.
(self, recursive: bool = False)
| 155 | self._run_optimization(selected_file, selected_kernels, options) |
| 156 | |
| 157 | def _find_cuda_files(self, recursive: bool = False) -> List[Path]: |
| 158 | """Find CUDA files.""" |
| 159 | pattern = "**/*.cu" if recursive else "*.cu" |
| 160 | cu_files = list(self.current_dir.glob(pattern)) |
| 161 | |
| 162 | pattern = "**/*.cuh" if recursive else "*.cuh" |
| 163 | cuh_files = list(self.current_dir.glob(pattern)) |
| 164 | |
| 165 | return sorted(cu_files + cuh_files, key=lambda x: x.stat().st_mtime, reverse=True) |
| 166 | |
| 167 | def _select_file(self, files: List[Path]) -> Optional[Path]: |
| 168 | """Select file with arrow keys.""" |