diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2025-05-05 03:30:13 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2025-05-09 06:03:11 -0400 |
| commit | 97e97dc9d55e71edbc2031e6a509a7cc17abe168 (patch) | |
| tree | 645476af274ed5716204c27057cd6c8c1f4dfca2 /libsmctrl.h | |
| parent | c250928930cb5c95bffc878913301f9a5d4efcb7 (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.h')
| -rw-r--r-- | libsmctrl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsmctrl.h b/libsmctrl.h index b85c0c7..45d2cd7 100644 --- a/libsmctrl.h +++ b/libsmctrl.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * Copyright 2022-2024 Joshua Bakita | 2 | * Copyright 2022-2025 Joshua Bakita |
| 3 | * Library to control TPC masks on CUDA launches. Co-opts preexisting debug | 3 | * Library to control TPC masks on CUDA launches. Co-opts preexisting debug |
| 4 | * logic in the CUDA driver library, and thus requires a build with -lcuda. | 4 | * logic in the CUDA driver library, and thus requires a build with -lcuda. |
| 5 | */ | 5 | */ |
| @@ -58,11 +58,13 @@ extern void libsmctrl_set_next_mask(uint64_t mask); | |||
| 58 | // Get number of GPCs for devices number `dev`, and a GPC-indexed array | 58 | // Get number of GPCs for devices number `dev`, and a GPC-indexed array |
| 59 | // containing masks of which TPCs are associated with each GPC. | 59 | // containing masks of which TPCs are associated with each GPC. |
| 60 | // Note that the `nvdebug` module must be loaded to use this function. | 60 | // Note that the `nvdebug` module must be loaded to use this function. |
| 61 | // Note that at least one GPU context must be active to use this function. | ||
| 61 | // @param num_enabled_gpcs (out) Location to store number of GPCs in | 62 | // @param num_enabled_gpcs (out) Location to store number of GPCs in |
| 62 | // @param tpcs_for_gpc (out) Pointer to store pointer to output buffer at | 63 | // @param tpcs_for_gpc (out) Pointer to store pointer to output buffer at |
| 63 | // @param dev (in) `nvdebug` device ID | 64 | // @param dev (in) `nvdebug` device ID |
| 64 | // @return 0 on success, `errno`-compatible error code on failure | 65 | // @return 0 on success, `errno`-compatible error code on failure |
| 65 | extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); | 66 | extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); |
| 67 | extern int libsmctrl_get_gpc_info_ext(uint32_t* num_enabled_gpcs, uint128_t** tpcs_for_gpc, int dev); | ||
| 66 | // Get total number of TPCs on device number `dev`. Requires `nvdebug`. | 68 | // Get total number of TPCs on device number `dev`. Requires `nvdebug`. |
| 67 | // @param num_tpcs (out) Location to store number of TPCs at | 69 | // @param num_tpcs (out) Location to store number of TPCs at |
| 68 | // @param dev (in) `nvdebug` device ID | 70 | // @param dev (in) `nvdebug` device ID |
