Closed andreasHan closed 3 years ago
When i use some function which need allocate new cuda memory e.g. tensor.contiguous() ; torch.nn.functional.pad
Like following code:
reader = TensorStreamConverter(v_source) reader.initialize(repeat_number=20) reader.start() frame_parameters = FrameParameters( width=0, height=0, crop_coords=(0, 0, 0, 0), resize_type=ResizeType["NEAREST"], pixel_format=FourCC['RGB24'], normalization=False ) tensor = reader.param_read(frame_parameters) tensor = tensor.permute((2, 0, 1).contiguous()
Then occurs this error:
tensor = tensor.permute(2, 0, 1).contiguous() RuntimeError: CUDA error: an illegal memory access was encountered
But when i remove contiguous(), this error doesn't appear.
Thx~
Hi @andreasHan, I think it's some Pytorch issue, tensor-stream creates tensors via C++ torch from_blob function, maybe Pytorch doesn't support contiguous() feature for tensors created this way?
from_blob
contiguous()
When i use some function which need allocate new cuda memory e.g. tensor.contiguous() ; torch.nn.functional.pad
Like following code:
Then occurs this error:
But when i remove contiguous(), this error doesn't appear.
Thx~