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

Function IsEnvViewDisabled

oneflow/core/framework/tensor_methods.cpp:37–40  ·  view source on GitHub ↗

NOTE: use env variable 'ONEFLOW_DISABLE_VIEW' control use view mechanism or not If set true, then do not use view mechanism(and view ops)

Source from the content-addressed store, hash-verified

35// NOTE: use env variable 'ONEFLOW_DISABLE_VIEW' control use view mechanism or not
36// If set true, then do not use view mechanism(and view ops)
37bool IsEnvViewDisabled() {
38 static const bool env_view_disabled = ParseBooleanFromEnv("ONEFLOW_DISABLE_VIEW", false);
39 return env_view_disabled;
40}
41
42bool IsViewApplicable(const std::shared_ptr<Tensor>& input) {
43 if (IsEnvViewDisabled()) { return false; }

Callers 1

IsViewApplicableFunction · 0.85

Calls 1

ParseBooleanFromEnvFunction · 0.85

Tested by

no test coverage detected