| 40 | } |
| 41 | |
| 42 | bool IsViewApplicable(const std::shared_ptr<Tensor>& input) { |
| 43 | if (IsEnvViewDisabled()) { return false; } |
| 44 | // NOTE: only eager local tensor support view for now |
| 45 | // elem_cnt() >= 1 used to excluding 0 shape tensor |
| 46 | if (input->is_local() && !(LazyMode::is_enabled()) && input->shape()->elem_cnt() >= 1) { |
| 47 | return true; |
| 48 | } |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | static bool IsOverlappingMemorys(const std::vector<int64_t>& sizes, |
| 53 | const std::vector<int64_t>& strides) { |
no test coverage detected