python view (reshape) op doesn't support zero dim tensors
Closed this issue · 1 comments
mruberry commented
RuntimeError: !original_sizes.empty() INTERNAL ASSERT FAILED at "../torch/csrc/jit/codegen/cuda/ops/alias.cpp":87, please report a bug to PyTorch. No support for 0-dim tensors in view support.
jacobhinkle commented
Under the hood I believe this means we'd want to translate view(x, {1, 1, 1}, {})
to squeeze(x, std::vector<bool>({true, true, true}))
and view(x, {}, {1, 1, 1})
to broadcast(x, {true, true, true})
. I think we can just add these special cases to the view
op.