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

Method ProxyTensor

oneflow/core/framework/tensor.h:353–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351class ProxyTensor : public TensorIf<DerivedT> {
352 public:
353 ProxyTensor(const std::shared_ptr<Tensor>& tensor) : tensor_(tensor) {
354 if (tensor->is_lazy()) { CHECK_JUST(this->BorrowTensorName(tensor.get())); }
355 }
356 virtual ~ProxyTensor() = default;
357
358 virtual std::shared_ptr<const Shape> shape() const override { return tensor_->shape(); }

Callers

nothing calls this directly

Calls 3

BorrowTensorNameMethod · 0.80
is_lazyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected