MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / test_tensor_reshape_strided_error

Function test_tensor_reshape_strided_error

tests/cvcuda/python/test_tensor.py:399–407  ·  view source on GitHub ↗
(shape_arg, layout_arg)

Source from the content-addressed store, hash-verified

397 [((300,), "A")],
398)
399def test_tensor_reshape_strided_error(shape_arg, layout_arg):
400 tensor = cvcuda.Tensor((10, 10, 3), np.uint8, layout="HWC")
401 assert tensor.cuda().strides == (32, 3, 1) # strided rows
402
403 with t.raises(RuntimeError):
404 tensor.reshape(shape_arg, layout=layout_arg)
405
406 with t.raises(RuntimeError):
407 cvcuda.reshape(tensor, shape_arg, layout=layout_arg)
408
409
410@t.mark.parametrize(

Callers

nothing calls this directly

Calls 3

cudaMethod · 0.95
reshapeMethod · 0.95
TensorMethod · 0.45

Tested by

no test coverage detected