e3c8979e8d
- cmd/fn/doctor.go - cmd/fn/main.go - cpp/apps/primitives_gallery/playground/tables/CMakeLists.txt - cpp/apps/primitives_gallery/playground/tables/data_table.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.h - cpp/apps/primitives_gallery/playground/tables/self_test.cpp - cpp/apps/primitives_gallery/playground/tables/tql.cpp - cpp/apps/primitives_gallery/playground/tables/viz.cpp - cpp/apps/primitives_gallery/playground/tables/viz.h - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.2 KiB
2.2 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cuda_toolkit_check | function | bash | infra | 1.0.0 | impure | cuda_toolkit_check() -> void | Detecta componentes CUDA instalados en el sistema y emite pares key=value a stdout: nvcc (version o missing), nvidia_smi (present/missing), driver_version, cuda_libs (path o missing) y overall (ok|partial|missing). Exit code 0 siempre — funcion informativa, no fatal. |
|
false | error_go_core |
|
Cinco pares key=value en stdout: nvcc, nvidia_smi, driver_version, cuda_libs, overall. overall=ok si los tres componentes principales estan presentes; partial si algunos; missing si ninguno. | false | bash/functions/infra/cuda_toolkit_check.sh |
Ejemplo
source bash/functions/infra/cuda_toolkit_check.sh
cuda_toolkit_check
Salida en maquina con CUDA completo:
nvcc=12.4
nvidia_smi=present
driver_version=550.54.15
cuda_libs=/usr/local/cuda
overall=ok
Salida en maquina sin CUDA:
nvcc=missing
nvidia_smi=missing
driver_version=missing
cuda_libs=missing
overall=missing
Invocar directamente:
bash bash/functions/infra/cuda_toolkit_check.sh
Parsear desde otro script:
eval "$(cuda_toolkit_check)"
echo "CUDA overall: $overall"
if [[ "$overall" == "ok" ]]; then
echo "CUDA completo: nvcc=$nvcc driver=$driver_version libs=$cuda_libs"
fi
Notas
- Idempotente: no instala, no modifica nada, solo consulta.
- Exit code 0 siempre — ausencia de CUDA es informacion, no fallo.
- Busca
libcuda.soen/usr/local/cuda*,/opt/cuda*y vialdconfig -p. driver_versionrefleja el driver NVIDIA del kernel, reportado por nvidia-smi.nvccreporta la version del compilador CUDA toolkit (puede diferir de la version soportada por el driver).- Para obtener la version CUDA maxima soportada por el driver, usar
get_gpu_info_go_infra(campo CudaVersion del struct GpuInfo).