-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perftest: Add GPU Touch Flag for Testing GPU Memory Interference with CUDA and OpenCL Support #302
Open
yonatan786
wants to merge
4
commits into
linux-rdma:master
Choose a base branch
from
yonatan786:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Implement support for multiple CUDA memory types including: - CUDA_MEM_DEVICE (0) for device memory (default) - CUDA_MEM_MANAGED (1) for unified managed memory - CUDA_MEM_MALLOC (4) for host memory allocated via malloc Previously, only CUDA_MEM_DEVICE was supported as CUDA memory. This change introduces a new flag (`cuda_mem_type`) to set the memory type with the presented values. Reviewed-by: Gal Shalom <GalShalom@Nvidia.com> Signed-off-by: Yonatan Maman <Ymaman@Nvidia.com>
Introduce the `-gpu_touch` flag to control GPU memory access testing behavior. The flag supports two modes: - `once`: The GPU touches the memory only once during the test process. - `infinite`: The GPU continuously touches the memory throughout the test. This parameter will trigger migration of pages to the GPU, allowing for evaluation of GPU memory access patterns and performance. Reviewed-by: Gal Shalom <GalShalom@Nvidia.com> Signed-off-by: Yonatan Maman <Ymaman@Nvidia.com>
Extend perftest to support OpenCL memory management, including: * Introduce new flags (`use_opencl_flag` and `opencl_platform_id_flag`) and update the parser to handle OpenCL-specific configurations. * Added support for gpu_touch parameter by OpenCL. Reviewed-by: Gal Shalom <GalShalom@Nvidia.com> Signed-off-by: Yonatan Maman <Ymaman@Nvidia.com>
Extend perftest to support GPU touch mode for CUDA memory and enable CUDA kernel launches. Note: CUDA kernels are required for CUDA GPU touch mode functionality. Reviewed-by: Gal Shalom <GalShalom@Nvidia.com> Signed-off-by: Yonatan Maman <Ymaman@Nvidia.com>
sshaulnv
reviewed
Jan 6, 2025
static int init_gpu(struct opencl_memory_ctx *ctx) | ||
{ | ||
cl_platform_id platforms_id[NUM_PLATFORMS]; | ||
cl_device_id devices_id[NUM_PLATFORMS]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to have more than NUM_PLATFORMS/NUM_DEVICES (5) on a server?
sshaulnv
reviewed
Jan 6, 2025
if (opencl_ctx->gpu_touch != GPU_NO_TOUCH) { | ||
opencl_ctx->buffer_ctx = malloc(sizeof(struct buffer_ctx)); | ||
if (!opencl_ctx->buffer_ctx) { | ||
printf("Failed to allocate context for gpu_touch\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about release the allocated addr
?
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.
Enhances perftest with GPU memory testing capabilities, including: