MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / eval_impl

Method eval_impl

src/core/tensor/tensor.cpp:171–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 : tensor_ptr_(std::make_shared<Tensor>(std::move(tensor))) {}
170
171 Tensor TensorLeaf::eval_impl() const {
172 // Materialize non-contiguous or offset tensors
173 if (tensor_ptr_->storage_offset() != 0 || !tensor_ptr_->is_contiguous()) {
174 return tensor_ptr_->contiguous();
175 }
176 return *tensor_ptr_;
177 }
178
179 const TensorShape& TensorLeaf::shape_impl() const { return tensor_ptr_->shape(); }
180 Device TensorLeaf::device_impl() const { return tensor_ptr_->device(); }

Callers 1

TESTFunction · 0.45

Calls 2

is_contiguousMethod · 0.80
contiguousMethod · 0.45

Tested by 1

TESTFunction · 0.36