Display of negative int8 tensor values

🐛 Bug

Display of int8 matrix seems broken.

To Reproduce

>>> import torch
>>> a = torch.tensor([1, -10], dtype=torch.int8)
>>> a[1]
tensor(-10, dtype=torch.int8)
>>> a
tensor([  1, 246], dtype=torch.int8)

Expected behavior

I expect the tensor to be written as tensor([ 1, -10], dtype=torch.int8)

This works fine on pytorch 1.7.1 on x64.

Environment

(pytorch_venv) matthijs@ip-10-100-175-26:~/efficient-deit/deit_lite$ python collect_env.py
Collecting environment information...
PyTorch version: 1.8.0.dev20201210
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (aarch64)
GCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.8 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.0
[pip3] torch==1.8.0.dev20201210
[pip3] torchvision==0.2.2.post3
[conda] Could not collect

Additional context

1 possible answer(s) on “Display of negative int8 tensor values