MCPcopy Create free account
hub / github.com/RightNow-AI/rightnow-cli / show_compiler_status

Function show_compiler_status

rightnow_cli/ui/setup_wizard.py:255–320  ·  view source on GitHub ↗

Show current compiler configuration status. Args: config_manager: Configuration manager instance

(config_manager: ConfigManager)

Source from the content-addressed store, hash-verified

253
254
255def show_compiler_status(config_manager: ConfigManager):
256 """
257 Show current compiler configuration status.
258
259 Args:
260 config_manager: Configuration manager instance
261 """
262 console.print("\n[nvidia]COMPILER CONFIGURATION[/nvidia]\n")
263
264 # Load config
265 config = config_manager.get()
266
267 # Get configured paths
268 compiler_paths = {}
269 if config.cuda.compiler_paths:
270 if config.cuda.compiler_paths.nvcc:
271 compiler_paths['nvcc'] = config.cuda.compiler_paths.nvcc
272 if config.cuda.compiler_paths.cl:
273 compiler_paths['cl'] = config.cuda.compiler_paths.cl
274 if config.cuda.compiler_paths.ncu:
275 compiler_paths['ncu'] = config.cuda.compiler_paths.ncu
276 if config.cuda.compiler_paths.nsys:
277 compiler_paths['nsys'] = config.cuda.compiler_paths.nsys
278
279 # Detect with configured paths
280 detector = ToolchainDetector(compiler_paths)
281 tools = detector.get_all_tools()
282
283 # Show status
284 table = Table(box=box.ROUNDED, border_style="nvidia")
285 table.add_column("Tool", style="bold", width=18)
286 table.add_column("Status", width=12)
287 table.add_column("Path", style="dim")
288 table.add_column("Source", width=12)
289
290 for name, info in tools.items():
291 if name == 'nvprof':
292 continue
293
294 display_name = {
295 'nvcc': 'NVCC',
296 'cpp_compiler': 'C++ Compiler',
297 'ncu': 'NCU',
298 'nsys': 'NSYS'
299 }.get(name, name.upper())
300
301 if info.available:
302 status = "[green]✓ Found[/green]"
303 path_display = info.path or "N/A"
304
305 # Determine source
306 config_key = {'nvcc': 'nvcc', 'cpp_compiler': 'cl', 'ncu': 'ncu', 'nsys': 'nsys'}.get(name)
307 if config_key and config_key in compiler_paths and compiler_paths[config_key] == info.path:
308 source = "[cyan]Config[/cyan]"
309 else:
310 source = "[dim]Auto[/dim]"
311 else:
312 status = "[red]✗ Missing[/red]"

Callers 1

handle_commandFunction · 0.85

Calls 3

get_all_toolsMethod · 0.95
ToolchainDetectorClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected