aboutsummaryrefslogtreecommitdiffstats
path: root/libsmctrl_test_mask_shared.cu
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2025-05-05 03:30:13 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2025-05-09 06:03:11 -0400
commit97e97dc9d55e71edbc2031e6a509a7cc17abe168 (patch)
tree645476af274ed5716204c27057cd6c8c1f4dfca2 /libsmctrl_test_mask_shared.cu
parentc250928930cb5c95bffc878913301f9a5d4efcb7 (diff)
Major update for ECRTS'25: fix TPC to GPU mapping and add a "supreme" mask
These updates are featured in the paper: J. Bakita and J. H. Anderson, “Hardware Compute Partitioning on NVIDIA GPUs for Composable Systems”, Proceedings of the 37th Euromicro Conference on Real-Time Systems (ECRTS), to appear, Jul 2025. They: 1. Fix reported GPC to TPC mappings (requires nvdebug update). 2. Add support for a "supreme" mask, which overrides all others and can be set on a per-process basis via an environment variable, and optionally modified at runtime via the nvtaskset utility. 3. Add test for the supreme mask.
Diffstat (limited to 'libsmctrl_test_mask_shared.cu')
-rw-r--r--libsmctrl_test_mask_shared.cu7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsmctrl_test_mask_shared.cu b/libsmctrl_test_mask_shared.cu
index e4ddde7..3b7ebcd 100644
--- a/libsmctrl_test_mask_shared.cu
+++ b/libsmctrl_test_mask_shared.cu
@@ -1,9 +1,10 @@
1// Copyright 2023 Joshua Bakita 1// Copyright 2023-2025 Joshua Bakita
2#include <error.h> 2#include <error.h>
3#include <errno.h> 3#include <errno.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <stdbool.h> 5#include <stdbool.h>
6#include <cuda_runtime.h> 6#include <cuda_runtime.h>
7#include <unistd.h> // For getpid()
7 8
8#include "libsmctrl.h" 9#include "libsmctrl.h"
9#include "testbench.h" 10#include "testbench.h"
@@ -81,6 +82,10 @@ int test_constrained_size_and_location(enum partitioning_type part_type) {
81 82
82 // Apply partitioning to enable only the first TPC of each 32-bit block 83 // Apply partitioning to enable only the first TPC of each 32-bit block
83 switch (part_type) { 84 switch (part_type) {
85 case PARTITION_SUPREME:
86 printf("%s: Please set mask to '0x%016lx%016lx' for PID %d using the control deamon and press any key to continue...\n", program_invocation_name, (uint64_t)(mask >> 64), (uint64_t)mask, getpid());
87 fgetc(stdin);
88 break;
84 case PARTITION_GLOBAL: 89 case PARTITION_GLOBAL:
85 libsmctrl_set_global_mask(mask); 90 libsmctrl_set_global_mask(mask);
86 break; 91 break;