@@ -19,7 +19,7 @@ std::vector<TestCase> generateTestsParams(std::initializer_list<std::string> fie
19
19
std::vector<TestCase> tests_cases;
20
20
const pugi::xml_document &test_config = Environment::Instance ().getTestConfig ();
21
21
22
- std::vector<int > processes, threads, iterations, api_versions ;
22
+ std::vector<int > processes, threads, iterations;
23
23
std::vector<std::string> devices, models, models_names, precisions;
24
24
25
25
pugi::xml_node values;
@@ -40,10 +40,6 @@ std::vector<TestCase> generateTestsParams(std::initializer_list<std::string> fie
40
40
values = test_config.child (" attributes" ).child (" devices" );
41
41
for (pugi::xml_node val = values.first_child (); val; val = val.next_sibling ())
42
42
devices.emplace_back (val.text ().as_string ());
43
- } else if (field == " api_versions" ) {
44
- values = test_config.child (" attributes" ).child (" api_versions" );
45
- for (pugi::xml_node val = values.first_child (); val; val = val.next_sibling ())
46
- api_versions.push_back (val.text ().as_int ());
47
43
} else if (field == " models" ) {
48
44
values = test_config.child (" attributes" ).child (" models" );
49
45
for (pugi::xml_node val = values.first_child (); val; val = val.next_sibling ()) {
@@ -66,7 +62,6 @@ std::vector<TestCase> generateTestsParams(std::initializer_list<std::string> fie
66
62
processes = !processes.empty () ? processes : std::vector<int >{1 };
67
63
threads = !threads.empty () ? threads : std::vector<int >{1 };
68
64
iterations = !iterations.empty () ? iterations : std::vector<int >{1 };
69
- api_versions = !api_versions.empty () ? api_versions : std::vector<int >{1 , 2 };
70
65
devices = !devices.empty () ? devices : std::vector<std::string>{" NULL" };
71
66
models = !models.empty () ? models : std::vector<std::string>{" NULL" };
72
67
precisions = !precisions.empty () ? precisions : std::vector<std::string>{" NULL" };
@@ -75,11 +70,10 @@ std::vector<TestCase> generateTestsParams(std::initializer_list<std::string> fie
75
70
for (auto &numprocesses: processes)
76
71
for (auto &numthreads: threads)
77
72
for (auto &numiters: iterations)
78
- for (auto &api_version: api_versions)
79
- for (auto &device: devices)
80
- for (int i = 0 ; i < models.size (); i++)
81
- tests_cases.emplace_back (numprocesses, numthreads, numiters, api_version, device, models[i],
82
- models_names[i], precisions[i]);
73
+ for (auto &device: devices)
74
+ for (int i = 0 ; i < models.size (); i++)
75
+ tests_cases.emplace_back (numprocesses, numthreads, numiters, device, models[i],
76
+ models_names[i], precisions[i]);
83
77
return tests_cases;
84
78
}
85
79
@@ -99,7 +93,6 @@ std::vector<MemLeaksTestCase> generateTestsParamsMemLeaks() {
99
93
numprocesses = device.attribute (" processes" ).as_int (1 );
100
94
numthreads = device.attribute (" threads" ).as_int (1 );
101
95
numiterations = device.attribute (" iterations" ).as_int (1 );
102
- std::vector<int > api_versions{1 , 2 };
103
96
104
97
std::vector<std::map<std::string, std::string>> models;
105
98
@@ -117,9 +110,7 @@ std::vector<MemLeaksTestCase> generateTestsParamsMemLeaks() {
117
110
{" precision" , precision}};
118
111
models.push_back (model_map);
119
112
}
120
- for (auto api_version: api_versions) {
121
- tests_cases.emplace_back (numprocesses, numthreads, numiterations, api_version, device_name, models);
122
- }
113
+ tests_cases.emplace_back (numprocesses, numthreads, numiterations, device_name, models);
123
114
}
124
115
125
116
return tests_cases;
@@ -133,16 +124,16 @@ std::string getTestCaseNameMemLeaks(const testing::TestParamInfo<MemLeaksTestCas
133
124
return obj.param .test_case_name ;
134
125
}
135
126
136
- void test_wrapper (const std::function<void (std::string, std::string, int , int )> &tests_pipeline,
127
+ void test_wrapper (const std::function<void (std::string, std::string, int )> &tests_pipeline,
137
128
const TestCase ¶ms) {
138
- tests_pipeline (params.model , params.device , params.numiters , params. api_version );
129
+ tests_pipeline (params.model , params.device , params.numiters );
139
130
}
140
131
141
- void _runTest (const std::function<void (std::string, std::string, int , int )> &tests_pipeline, const TestCase ¶ms) {
132
+ void _runTest (const std::function<void (std::string, std::string, int )> &tests_pipeline, const TestCase ¶ms) {
142
133
run_in_threads (params.numthreads , test_wrapper, tests_pipeline, params);
143
134
}
144
135
145
- void runTest (const std::function<void (std::string, std::string, int , int )> &tests_pipeline, const TestCase ¶ms) {
136
+ void runTest (const std::function<void (std::string, std::string, int )> &tests_pipeline, const TestCase ¶ms) {
146
137
#if DEBUG_MODE
147
138
tests_pipeline (params.model , params.device , params.numiters );
148
139
#else
0 commit comments