| 48 | const char kGPUDevice[] = "/job:a/replica:0/task:0/device:GPU:0"; |
| 49 | |
| 50 | static void InitGraph(const string& s, Graph* graph, |
| 51 | const string& device = kCPUDevice) { |
| 52 | GraphDef graph_def; |
| 53 | |
| 54 | auto parser = protobuf::TextFormat::Parser(); |
| 55 | // parser.AllowRelaxedWhitespace(true); |
| 56 | CHECK(parser.MergeFromString(s, &graph_def)) << s; |
| 57 | GraphConstructorOptions opts; |
| 58 | TF_CHECK_OK(ConvertGraphDefToGraph(opts, graph_def, graph)); |
| 59 | |
| 60 | for (Node* node : graph->nodes()) { |
| 61 | node->set_assigned_device_name(device); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | class MklLayoutPassTest : public ::testing::Test { |
| 66 | public: |
no test coverage detected