MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ParseFloatFromEnv

Function ParseFloatFromEnv

oneflow/core/common/util.cpp:172–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172double ParseFloatFromEnv(const std::string& env_var, double default_value) {
173 const char* env_p = std::getenv(env_var.c_str());
174 if (env_p == nullptr) { return default_value; }
175 double value = default_value;
176 StringToFloat(env_p, &value);
177 return value;
178}
179
180std::string GetStringFromEnv(const std::string& env_var, const std::string& default_value) {
181 const char* env_p = std::getenv(env_var.c_str());

Callers 5

GetTransferCostFunction · 0.85
GetTensorBufferPoolSizeFunction · 0.85
ComputeMemoryVolumeMethod · 0.85

Calls 1

StringToFloatFunction · 0.85

Tested by

no test coverage detected