aboutsummaryrefslogtreecommitdiffstats
path: root/libsmctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsmctrl.h')
-rw-r--r--libsmctrl.h4
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
65extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev); 66extern int libsmctrl_get_gpc_info(uint32_t* num_enabled_gpcs, uint64_t** tpcs_for_gpc, int dev);
67extern 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