Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion libkineto/src/CuptiActivityApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ constexpr size_t kBufSize(4 * 1024 * 1024);
#ifdef HAS_CUPTI
inline bool cuptiTearDown_() {
auto teardown_env = getenv("TEARDOWN_CUPTI");
return teardown_env != nullptr && strcmp(teardown_env, "1") == 0;
if (teardown_env != nullptr) {
return strcmp(teardown_env, "1") == 0;
}
// Default: enable teardown for CUDA 12.6+, disable for older versions
#if defined(CUDART_VERSION) && CUDART_VERSION >= 12060
return true;
#else
return false;
#endif
}

inline bool cuptiLazyInit_() {
Expand Down
Loading