mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Test Plan: revert-hammer
Differential Revision:
D25687465 (4de6b279c8)
Original commit changeset: 89aabce165a5
fbshipit-source-id: fa5def17209d1691e68b1245fa0873fd03e88eaa
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#include <c10/core/UndefinedTensorImpl.h>
|
|
#include <c10/util/Exception.h>
|
|
|
|
namespace c10 {
|
|
|
|
// should this use the globalContext? Can it get a context passed in somehow?
|
|
UndefinedTensorImpl::UndefinedTensorImpl()
|
|
: TensorImpl(DispatchKey::Undefined, caffe2::TypeMeta(), c10::nullopt) {
|
|
}
|
|
|
|
IntArrayRef UndefinedTensorImpl::sizes() const {
|
|
AT_ERROR("sizes() called on undefined Tensor");
|
|
}
|
|
|
|
int64_t UndefinedTensorImpl::size(int64_t d) const {
|
|
AT_ERROR("size(dim) called on an undefined Tensor");
|
|
}
|
|
|
|
int64_t UndefinedTensorImpl::stride(int64_t d) const {
|
|
AT_ERROR("stride(dim) called on an undefined Tensor");
|
|
}
|
|
|
|
int64_t UndefinedTensorImpl::dim() const {
|
|
AT_ERROR("dim() called on undefined Tensor");
|
|
}
|
|
|
|
bool UndefinedTensorImpl::has_storage() const {
|
|
AT_ERROR("has_storage() called on undefined Tensor");
|
|
}
|
|
|
|
const Storage& UndefinedTensorImpl::storage() const {
|
|
AT_ERROR("storage() called on undefined Tensor");
|
|
}
|
|
|
|
int64_t UndefinedTensorImpl::storage_offset() const {
|
|
AT_ERROR("storage_offset() called on an undefined Tensor");
|
|
}
|
|
|
|
IntArrayRef UndefinedTensorImpl::strides() const {
|
|
AT_ERROR("strides() called on undefined Tensor");
|
|
}
|
|
UndefinedTensorImpl UndefinedTensorImpl::_singleton;
|
|
|
|
}
|