aboutsummaryrefslogtreecommitdiffstats
path: root/libsmctrl.h
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2024-12-19 14:20:38 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2024-12-19 14:48:21 -0500
commitd052c2df34ab41ba285f70965663e5a0832f6ac9 (patch)
tree0a761be3f62910275da8a2cad546a8902073b1e9 /libsmctrl.h
parentaa63a02efa5fc8701f0c3418704bbbc2051c1042 (diff)
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.
Diffstat (limited to 'libsmctrl.h')
-rw-r--r--libsmctrl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsmctrl.h b/libsmctrl.h
index 6285de6..b85c0c7 100644
--- a/libsmctrl.h
+++ b/libsmctrl.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright 2024 Joshua Bakita 2 * Copyright 2022-2024 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 */
@@ -15,7 +15,7 @@ typedef unsigned __int128 uint128_t;
15 15
16// Set global default TPC mask for all kernels, incl. CUDA-internal ones 16// Set global default TPC mask for all kernels, incl. CUDA-internal ones
17// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) 17// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks)
18// Supported: CUDA 10.2, and CUDA 11.0 - CUDA 12.1 18// Supported: CUDA 6.5 - CUDA 12.6
19extern void libsmctrl_set_global_mask(uint64_t mask); 19extern void libsmctrl_set_global_mask(uint64_t mask);
20// Set default TPC mask for all kernels launched via `stream` 20// Set default TPC mask for all kernels launched via `stream`
21// (overrides global mask) 21// (overrides global mask)
@@ -27,7 +27,7 @@ extern void libsmctrl_set_stream_mask_ext(void* stream, uint128_t mask);
27// Set TPC mask for the next kernel launch from the caller's CPU thread 27// Set TPC mask for the next kernel launch from the caller's CPU thread
28// (overrides global and per-stream masks, applies only to next launch). 28// (overrides global and per-stream masks, applies only to next launch).
29// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) 29// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks)
30// Supported: CUDA 11.0 - CUDA 12.1 30// Supported: CUDA 6.5 - CUDA 12.6
31extern void libsmctrl_set_next_mask(uint64_t mask); 31extern void libsmctrl_set_next_mask(uint64_t mask);
32 32
33/** 33/**