From d052c2df34ab41ba285f70965663e5a0832f6ac9 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Thu, 19 Dec 2024 14:20:38 -0500 Subject: Bugfix stream-mask override, support old CUDA, and start Hopper support Use a different callback to intercept the TMD/QMD later in the launch pipeline. Major improvements: - Fix bug with next mask not overriding stream mask on CUDA 11.0+ - Add CUDA 6.5-10.2 support for next- and global-granularity partitioning masks on x86_64 and aarch64 Jetson - Remove libdl dependency - Partially support TMD/QMD Version 4 (Hopper) Minor improvements: - Check for sufficient CUDA version before before attempting to apply a next-granularity partitioning mask - Only check for sufficient CUDA version on the first call to `libsmctrl_set_next_mask()` or `libsmctrl_set_global_mask()`, rather than checking every time (lowers overheads) - Check that TMD version is sufficient before modifying it - Improve documentation Issues: - Partitioning mask bits have a different meaning in TMD/QMD Version 4 and require floorsweeping and remapping information to properly construct. This information will be forthcoming in future releases of libsmctrl and nvdebug. --- libsmctrl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libsmctrl.h') diff --git a/libsmctrl.h b/libsmctrl.h index 6285de6..b85c0c7 100644 --- a/libsmctrl.h +++ b/libsmctrl.h @@ -1,5 +1,5 @@ /** - * Copyright 2024 Joshua Bakita + * Copyright 2022-2024 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. */ @@ -15,7 +15,7 @@ typedef unsigned __int128 uint128_t; // Set global default TPC mask for all kernels, incl. CUDA-internal ones // @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) -// Supported: CUDA 10.2, and CUDA 11.0 - CUDA 12.1 +// Supported: CUDA 6.5 - CUDA 12.6 extern void libsmctrl_set_global_mask(uint64_t mask); // Set default TPC mask for all kernels launched via `stream` // (overrides global mask) @@ -27,7 +27,7 @@ extern void libsmctrl_set_stream_mask_ext(void* stream, uint128_t mask); // Set TPC mask for the next kernel launch from the caller's CPU thread // (overrides global and per-stream masks, applies only to next launch). // @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) -// Supported: CUDA 11.0 - CUDA 12.1 +// Supported: CUDA 6.5 - CUDA 12.6 extern void libsmctrl_set_next_mask(uint64_t mask); /** -- cgit v1.2.2