(self, executor, model_name, batch_size, num_workers)
| 30 | num_workers=st.sampled_from([8])) |
| 31 | @executor_test_settings |
| 32 | def test_executor(self, executor, model_name, batch_size, num_workers): |
| 33 | model = build_conv_model(model_name, batch_size) |
| 34 | model.Proto().num_workers = num_workers |
| 35 | |
| 36 | def run_model(): |
| 37 | iterations = ITERATIONS |
| 38 | if model_name == "MLP": |
| 39 | iterations = 1 # avoid numeric instability with MLP gradients |
| 40 | workspace.RunNet(model.net, iterations) |
| 41 | |
| 42 | self.compare_executors( |
| 43 | model, |
| 44 | ref_executor="simple", |
| 45 | test_executor=executor, |
| 46 | model_run_func=run_model, |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | @unittest.skipIf(not workspace.has_gpu_support, "no gpu") |
nothing calls this directly
no test coverage detected