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)
| 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) |
| 37 | bool IsEnvViewDisabled() { |
| 38 | static const bool env_view_disabled = ParseBooleanFromEnv("ONEFLOW_DISABLE_VIEW", false); |
| 39 | return env_view_disabled; |
| 40 | } |
| 41 | |
| 42 | bool IsViewApplicable(const std::shared_ptr<Tensor>& input) { |
| 43 | if (IsEnvViewDisabled()) { return false; } |
no test coverage detected