@@ -167,9 +167,11 @@ def is_ht_enabled():
167
167
168
168
cpu_count = multiprocessing .cpu_count ()
169
169
if is_ht_enabled ():
170
- env ['OMP_NUM_THREADS' ] = str (cpu_count // 2 )
170
+ omp_num_threads = str (cpu_count // 2 )
171
+ omp_places = f'0:{ cpu_count } :1'
171
172
else :
172
- env ['OMP_NUM_THREADS' ] = str (cpu_count )
173
+ omp_num_threads = str (cpu_count )
174
+ omp_places = ''
173
175
174
176
# get parameters that are common for all cases
175
177
common_params = config ['common' ]
@@ -262,6 +264,13 @@ class GenerationArgs:
262
264
'Unknown dataset. Only synthetics datasets '
263
265
'and csv/npy files are supported now' )
264
266
for lib in libs :
267
+ if lib == 'xgboost' :
268
+ env ['OMP_NUM_THREADS' ] = omp_num_threads
269
+ env ['OMP_PLACES' ] = omp_places
270
+ else :
271
+ env ['OMP_NUM_THREADS' ] = ''
272
+ env ['OMP_PLACES' ] = ''
273
+
265
274
for i , case in enumerate (cases ):
266
275
command = f'python { lib } /{ algorithm } .py --batch { batch } ' \
267
276
+ f'--arch { hostname } --header --output-format ' \
@@ -274,7 +283,10 @@ class GenerationArgs:
274
283
stdout , stderr = read_output_from_command (command )
275
284
stderr = filter_stderr (stderr )
276
285
if args .output_format == 'json' :
277
- json_result ['results' ].extend (json .loads (stdout ))
286
+ try :
287
+ json_result ['results' ].extend (json .loads (stdout ))
288
+ except json .JSONDecodeError :
289
+ pass
278
290
elif args .output_format == 'csv' :
279
291
csv_result += stdout + '\n '
280
292
if stderr != '' :
0 commit comments