MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RangesEnabled

Function RangesEnabled

tensorflow/core/profiler/nvtx_utils.h:35–44  ·  view source on GitHub ↗

A helper function to decide whether to enable CUDA NVTX profiling ranges.

Source from the content-addressed store, hash-verified

33
34// A helper function to decide whether to enable CUDA NVTX profiling ranges.
35inline bool RangesEnabled() {
36 static bool is_enabled = [] {
37 bool _is_enabled = false;
38 TF_CHECK_OK(tensorflow::ReadBoolFromEnvVar("TF_ENABLE_NVTX_RANGES",
39 /*default_val=*/false,
40 &_is_enabled));
41 return _is_enabled;
42 }();
43 return is_enabled;
44}
45
46// Note: The memory backing msg must persist until the result of this function
47// has been consumed by an NVTX API.

Callers 3

ScopedRangeIfEnabledMethod · 0.85
~ScopedRangeIfEnabledMethod · 0.85
resetMethod · 0.85

Calls 1

ReadBoolFromEnvVarFunction · 0.50

Tested by

no test coverage detected