aboutsummaryrefslogtreecommitdiffstats
path: root/libsmctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsmctrl.h')
-rw-r--r--libsmctrl.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/libsmctrl.h b/libsmctrl.h
index 64ae7a7..f144437 100644
--- a/libsmctrl.h
+++ b/libsmctrl.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright 2022 Joshua Bakita 2 * Copyright 2023 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 */
@@ -12,23 +12,20 @@ extern "C" {
12 12
13// Set global default TPC mask for all kernels, incl. CUDA-internal ones 13// Set global default TPC mask for all kernels, incl. CUDA-internal ones
14// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) 14// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks)
15// Supported: CUDA 10.2, and CUDA 11.0 - CUDA 11.8 15// Supported: CUDA 10.2, and CUDA 11.0 - CUDA 12.1
16extern void libsmctrl_set_global_mask(uint64_t mask); 16extern void libsmctrl_set_global_mask(uint64_t mask);
17// Set default TPC mask for all kernels launched via `stream` 17// Set default TPC mask for all kernels launched via `stream`
18// (overrides global mask) 18// (overrides global mask)
19// @param stream A cudaStream_t (aka CUstream_st*) to apply the mask on 19// @param stream A cudaStream_t (aka CUstream_st*) to apply the mask on
20// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) 20// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks)
21// Supported: CUDA 8.0 - CUDA 11.8 21// Supported: CUDA 8.0 - CUDA 12.1
22extern void libsmctrl_set_stream_mask(void* stream, uint64_t mask); 22extern void libsmctrl_set_stream_mask(void* stream, uint64_t mask);
23// Set TPC mask for the next kernel launch from the caller's CPU thread 23// Set TPC mask for the next kernel launch from the caller's CPU thread
24// (overrides global and per-stream masks, applies only to next launch). 24// (overrides global and per-stream masks, applies only to next launch).
25// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks) 25// @param mask A bitmask of enabled/disabled TPCs (see Notes on Bitmasks)
26// Supported: CUDA 11.0 - CUDA 11.8 26// Supported: CUDA 11.0 - CUDA 12.1
27extern void libsmctrl_set_next_mask(uint64_t mask); 27extern void libsmctrl_set_next_mask(uint64_t mask);
28 28
29// **DEPRECATED**: Old name for libsmctrl_set_global_mask()
30extern void set_sm_mask(uint64_t mask) __attribute__((deprecated("Use libsmctrl_set_global_mask()")));
31
32/** 29/**
33 * Notes on Bitmasks 30 * Notes on Bitmasks
34 * 31 *