add ctl_stats to remaining providers - #1444
Merged
Merged
Conversation
bratpiorka
approved these changes
Jul 17, 2025
| #include <umf/memory_provider_ops.h> | ||
| #include <umf/providers/provider_file_memory.h> | ||
|
|
||
| #include "provider_ctl_stats_type.h" |
Contributor
There was a problem hiding this comment.
please remove this include
There was a problem hiding this comment.
Pull Request Overview
This PR adds control statistics (ctl_stats) support to the remaining memory providers in the UMF (Unified Memory Framework) library. The implementation enables tracking of allocated memory, peak memory usage, and provides a reset mechanism for peak memory statistics across all provider types.
- Extends ctl_stats functionality to CUDA, Level Zero, file memory, devdax memory, OS memory, and fixed memory providers
- Adds comprehensive test coverage for ctl_stats functionality across all provider types
- Implements consistent memory tracking and peak memory reset operations for all providers
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/provider/provider_cuda.c | Adds ctl_stats implementation with memory tracking in alloc/free operations |
| src/provider/provider_level_zero.c | Implements helper functions to enable/disable stats tracking and adds ctl_stats support |
| src/provider/provider_file_memory.c | Integrates ctl_stats tracking into coarse allocation/deallocation operations |
| src/provider/provider_devdax_memory.c | Adds ctl_stats support with memory tracking in devdax provider operations |
| test/provider_os_memory.cpp | Adds comprehensive ctl_stats test coverage for OS memory provider |
| test/provider_fixed_memory.cpp | Implements ctl_stats test suite for fixed memory provider |
| test/provider_file_memory.cpp | Adds ctl_stats testing for file memory provider |
| test/provider_devdax_memory.cpp | Implements ctl_stats test coverage for devdax memory provider |
| test/providers/provider_cuda.cpp | Adds comprehensive ctl_stats test suite for CUDA provider |
| test/providers/provider_level_zero.cpp | Implements ctl_stats testing for Level Zero provider |
bratpiorka
approved these changes
Jul 18, 2025
KFilipek
approved these changes
Jul 18, 2025
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.
Description
Checklist