(device_id, error_msg)
| 114 | |
| 115 | |
| 116 | def check_bad_device(device_id, error_msg): |
| 117 | test_data_shape = [1, 3, 0, 4] |
| 118 | |
| 119 | def get_data(): |
| 120 | out = [np.empty(test_data_shape, dtype=np.uint8) for _ in range(batch_size)] |
| 121 | return out |
| 122 | |
| 123 | pipe = Pipeline(batch_size=batch_size, num_threads=3, device_id=device_id) |
| 124 | outs = fn.external_source(source=get_data, device="gpu") |
| 125 | pipe.set_outputs(outs) |
| 126 | assert_raises(RuntimeError, pipe.build, glob=error_msg) |
| 127 | |
| 128 | |
| 129 | def test_gpu_op_bad_device(): |
nothing calls this directly
no test coverage detected