From 97e97dc9d55e71edbc2031e6a509a7cc17abe168 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 5 May 2025 03:30:13 -0400 Subject: Major update for ECRTS'25: fix TPC to GPU mapping and add a "supreme" mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- libsmctrl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libsmctrl.h') diff --git a/libsmctrl.h b/libsmctrl.h index b85c0c7..45d2cd7 100644 --- a/libsmctrl.h +++ b/libsmctrl.h @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 Joshua Bakita + * Copyright 2022-2025 Joshua Bakita * Library to control TPC masks on CUDA launches. Co-opts preexisting debug * logic in the CUDA driver library, and thus requires a build with -lcuda. */ @@ -58,11 +58,13 @@ extern void libsmctrl_set_next_mask(uint64_t mask); // Get number of GPCs for devices number `dev`, and a GPC-indexed array // containing masks of which TPCs are associated with each GPC. // Note that the `nvdebug` module must be loaded to use this function. +// Note that at least one GPU context must be active to use this function. // @param num_enabled_gpcs (out) Location to store number of GPCs in // @param tpcs_for_gpc (out) Pointer to store pointer to output buffer at // @param dev (in) `nvdebug` device ID // @return 0 on success, `errno`-compatible error code on failure extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); +extern int libsmctrl_get_gpc_info_ext(uint32_t* num_enabled_gpcs, uint128_t** tpcs_for_gpc, int dev); // Get total number of TPCs on device number `dev`. Requires `nvdebug`. // @param num_tpcs (out) Location to store number of TPCs at // @param dev (in) `nvdebug` device ID -- cgit v1.2.2