| 416 | ], |
| 417 | ) |
| 418 | def test_tensor_wrap_cuda_array_interface(shape_arg, dtype_arg, layout_arg): |
| 419 | tensor = cvcuda.Tensor(shape_arg, dtype_arg, layout_arg) |
| 420 | |
| 421 | tcuda = tensor.cuda() |
| 422 | cai = tcuda.__cuda_array_interface__ |
| 423 | assert cai["typestr"] == dtype_arg.str |
| 424 | assert cai["shape"] == shape_arg |
| 425 | |
| 426 | wrapped = cvcuda.as_tensor(tcuda, layout_arg) |
| 427 | |
| 428 | assert wrapped.shape == shape_arg |
| 429 | assert wrapped.dtype == dtype_arg |
| 430 | assert wrapped.layout == layout_arg |
| 431 | |
| 432 | |
| 433 | def test_tensor_size_in_bytes(): |