简单看看tensor/stoage相关的实现,为后面的autograd相关的做一下准备 StorageImpl StorageImpl = 一块连续内存 buffer 的所有者。它只关心三件事:内存在哪(data_ptr_)、有多大(size_bytes_)、谁来分配/释放(allocator_) stride,shape,dtype相关的则是由TensorImpl来负责 注释中: // NB: storage is supposed to uniquely own a data pointer; e.g., //…