| 61 | } |
| 62 | |
| 63 | Result<std::vector<std::shared_ptr<Tensor>>> Tensors() { |
| 64 | std::vector<std::shared_ptr<Tensor>> tensors; |
| 65 | std::shared_ptr<Tensor> tensor; |
| 66 | std::vector<int64_t> shape = {5, 3, 7}; |
| 67 | std::shared_ptr<DataType> types[] = {int8(), int16(), int32(), int64(), |
| 68 | uint8(), uint16(), uint32(), uint64()}; |
| 69 | uint32_t seed = 0; |
| 70 | for (auto type : types) { |
| 71 | RETURN_NOT_OK( |
| 72 | test::MakeRandomTensor(type, shape, /*row_major_p=*/true, &tensor, seed++)); |
| 73 | tensors.push_back(tensor); |
| 74 | RETURN_NOT_OK( |
| 75 | test::MakeRandomTensor(type, shape, /*row_major_p=*/false, &tensor, seed++)); |
| 76 | tensors.push_back(tensor); |
| 77 | } |
| 78 | return tensors; |
| 79 | } |
| 80 | |
| 81 | Status GenerateTensors(const PlatformFilename& dir_fn) { |
| 82 | int sample_num = 1; |
nothing calls this directly
no test coverage detected