Open nihao1997 opened 5 months ago
我想要创建一个空的npu tensor给Silu函数,这个Silunpu上的函数。我应该怎么办?
void Silu(at::Tensor X); int main() { at::Tensor H = torch::empty({2, 2 2}, at::device().dtype());
Silu(H); return 0;
}
如果是在c++侧使用,可以参考该用例 https://github.com/Ascend/pytorch/tree/master/examples/libtorch_resnet
我想要创建一个空的npu tensor给Silu函数,这个Silunpu上的函数。我应该怎么办?
include
include
include
include <torch/extension.h>
include <torch/torch.h>
void Silu(at::Tensor X); int main() { at::Tensor H = torch::empty({2, 2 2}, at::device().dtype());
}