pytorch
bd4d5cb1 - Sparse CSR: Add torch.empty (#63509)

Commit
3 years ago
Sparse CSR: Add torch.empty (#63509) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63509 The primary use of `torch.empty` is to reserve memory for tensor and set the type, device, size information. The same is done here for SparseCSR. `crow_indices` is initialized as an empty tensor of size `num_rows + 1`. `col_indices` and `values` are initialized as empty tensors of size 0. cc nikitaved pearu cpuhrsch IvanYashchuk Test Plan: Imported from OSS Reviewed By: anjali411 Differential Revision: D31770359 Pulled By: cpuhrsch fbshipit-source-id: c83f2a2e0d7514ba24780add1086e1bccf541dd9
Author
Parents
Loading