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

Function GetDnnWorkspaceLimit

tensorflow/core/kernels/conv_ops.cc:585–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
584
585int64 GetDnnWorkspaceLimit(const string& envvar_in_mb,
586 int64 default_value_in_bytes) {
587 const char* workspace_limit_in_mb_str = getenv(envvar_in_mb.c_str());
588 if (workspace_limit_in_mb_str != nullptr &&
589 strcmp(workspace_limit_in_mb_str, "") != 0) {
590 int64 scratch_limit_in_mb = -1;
591 if (strings::safe_strto64(workspace_limit_in_mb_str,
592 &scratch_limit_in_mb)) {
593 return scratch_limit_in_mb * (1 << 20);
594 } else {
595 LOG(WARNING) << "Invalid value for env-var " << envvar_in_mb << ": "
596 << workspace_limit_in_mb_str;
597 }
598 }
599 return default_value_in_bytes;
600}
601
602// A dummy type to group forward convolution autotune results together.
603struct ConvAutoTuneGroup {

Callers 10

launchMethod · 0.85
operator()Method · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ConvolveScratchSizeFunction · 0.85
operator()Method · 0.85
ComputeMethod · 0.85
launchMethod · 0.85
launchMethod · 0.85
operator()Method · 0.85

Calls 2

safe_strto64Function · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected