feat(system_monitor): add NVIDIA GPU monitoring support for Windows and Linux#63
Open
ParthMozarkar wants to merge 3 commits intomofa-org:mainfrom
Open
feat(system_monitor): add NVIDIA GPU monitoring support for Windows and Linux#63ParthMozarkar wants to merge 3 commits intomofa-org:mainfrom
ParthMozarkar wants to merge 3 commits intomofa-org:mainfrom
Conversation
This commit adds a new AI-powered UI generation tool to MoFA Studio. It includes: - New mofa-ui-generator app crate. - Integration into the MoFA Studio shell with a dedicated sidebar tab. - Preview and Code views for generated UI. - Standardized MofaApp trait implementation.
…x (NVIDIA) Integrate nvml-wrapper crate for NVIDIA GPU monitoring on Windows and Linux. Features: - GPU utilization monitoring (0-100%) - VRAM usage monitoring (used/total) - Multi-GPU detection with averaged utilization - Graceful fallback for non-NVIDIA systems (NVML init failure is handled) - Static OnceLock for NVML instance (initialized once, reused) Implementation: - Added nvidia_gpu module (cfg-gated for linux/windows) - Created NvidiaGpuStats struct mirroring MacOSGpuStats - Implemented query_nvidia_gpu_stats() using nvml-wrapper - Integrated with existing system monitor background loop - Added nvml-wrapper 0.10 as target-specific dependency - Fixed mofa-dora-bridge default-features to avoid MLX on Windows Closes mofa-org#48
Author
|
could any check wiith this ?? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #48
This PR adds GPU monitoring support for Windows and Linux systems with NVIDIA GPUs using NVML (NVIDIA Management Library) via the
nvml-wrappercrate.The implementation integrates with the existing system monitoring infrastructure and provides real-time GPU utilization and VRAM usage metrics while maintaining safe fallbacks for unsupported systems.
Features
GPU Utilization Monitoring
Reports GPU load percentage (0–100%).
VRAM Usage Monitoring
Tracks memory usage (used / total VRAM).
Multi-GPU Support
Automatically detects multiple NVIDIA GPUs and reports averaged utilization across all detected devices.
Graceful Fallback Handling
If NVML initialization fails (for example on systems without NVIDIA GPUs), GPU monitoring is safely disabled without crashing the application.
Implementation Details
nvidia_gpumodule insystem_monitor.rs, cfg-gated for Linux and Windows.NvidiaGpuStatsstruct mirroring the existingMacOSGpuStatspattern.query_gpu_stats()function using thenvml-wrappercrate.OnceLockso it initializes once and is reused across polling cycles.Dependencies
Added a target-specific dependency:
nvml-wrapper = "0.10"
Enabled only for:
cfg(any(target_os = "linux", target_os = "windows"))
Additional Fix
mofa-dora-bridgedependency configuration inmofa-uiby disablingdefault-features.This PR extends the system monitor with GPU telemetry support for Windows and Linux while keeping the architecture consistent with the existing macOS GPU monitoring implementation.