New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Implement torch.stack() / _cat() for also for torch.HalfTensor #6968
Comments
we dont support any operation other than |
@soumith while we don’t want to have any math operations for half on CPU I feel like the argument given by @timothygebhard for having cat is very reasonable. Cat can be implemented efficiently because it doesn’t care how the data looks like, it’s only copying raw bytes around. |
If you do this, it would probably be a good idea to port THTensor_(cat) to ATen while you're at it. |
I got a very similar error: RuntimeError: _cat_out is not implemented for type torch.HalfTensor. To my mind, we could add support for this method for data preparation/loading on CPU so that a single tensor type (namely torch.half) is used on CPU and GPU. |
I ran into this issue with a |
Summary: Fixes pytorch/pytorch#6968 Needed for #14705 Pull Request resolved: pytorch/pytorch#16389 Differential Revision: D13861446 Pulled By: gchanan fbshipit-source-id: 7b8700b95aaf252d9669693dbddccb2302e58409
I'm confused, why did we close this issue? There was an MR for this that looked like it worked, but was subsequently closed, together with this issue/ |
as replied on the PR, it's merged into master, it's available in the nightlies, and will be part of 1.1 |
Issue Description
It seems that stacking is currently (PyTorch 0.4) is not supported for tensors of type
HalfTensor
; see code example.I don't know if this is intentional for some reason (hence I didn't label this issue as a bug), but I couldn't find any issue or documentation pointing to that. Since some methods, like
torch.utils.data.DataLoader
, depend ontorch.stack()
(in this case implicitly through thedefault_collate()
method), it would be great if either stacking for HalfTensors could get implemented, or the documentation could be updated to contain some kind of hint.Code Example
On PyTorch 0.3.1, one gets basically the same error when one tries to do the same thing:
The text was updated successfully, but these errors were encountered: