Skip to content

Add EMON, VTune, psrecord, ITTpy support in benchmarks#115

Draft
masdevas wants to merge 1 commit intoIntelPython:mainfrom
masdevas:dev/amorkovk-analysis
Draft

Add EMON, VTune, psrecord, ITTpy support in benchmarks#115
masdevas wants to merge 1 commit intoIntelPython:mainfrom
masdevas:dev/amorkovk-analysis

Conversation

@masdevas
Copy link
Copy Markdown
Contributor

@masdevas masdevas commented Mar 3, 2022

No description provided.

@masdevas masdevas force-pushed the dev/amorkovk-analysis branch from fb5575f to 1b80bd8 Compare March 29, 2022 07:05
Comment thread bench.py

def time_box_filter(func, *args, n_meas, time_limit, **kwargs):
def detect_LLC_size():
with open('/sys/devices/system/cpu/cpu0/cache/index3/size', 'r') as f:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for all systems or exception for non-Linux

Comment thread bench.py
Comment on lines +651 to +653
print('# Intel(R) Extension for Scikit-learn case result:')
print(json.dumps(output, indent=4))
print('# Intel(R) Extension for Scikit-learn case finished.')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sklbench may not use sklearnex, so, this outputs will be confusing for some cases

Comment thread tools/emon/edp_config.txt
##################################################################################

#ruby interpreter, change it according to the path where ruby is installed in your system
#RUBY_PATH="c:\Ruby192\bin\ruby.exe"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these commented lines required to be included?

Comment thread sklearn_bench/ridge.py
Comment on lines +34 to +37
fit_time, _ = bench.measure_function_time(regr.fit, X_train, y_train, box_filter_measurements=params.box_filter_measurements_fit, time_limit=params.time_limit_fit, params=params, stage='fit')

# Time predict
predict_time, yp = bench.measure_function_time(regr.predict, X_test, params=params)
predict_time, yp = bench.measure_function_time(regr.predict, X_test, box_filter_measurements=params.box_filter_measurements_infer, time_limit=params.time_limit_infer, params=params, stage='infer')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only ridge regression includes box_filter_measurements, time_limit and params arguments?

Comment thread runner.py
common_params = config['common']
for params_set in config['cases']:
params = common_params.copy()
# print('PRE PARAMS:', params)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code

Comment thread tools/emon/edp_config.txt
#RUBY_OPTIONS=--server -J-Xmx5g -J-Xms5g --1.8

#Number of threads to process data in parallel. Typically it should equal to the number of logical CPUs in your processing system.
PARALLELISM=24
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoded number of threads

Comment thread sklearn_bench/dbscan.py

# Time fit
time, _ = bench.measure_function_time(dbscan.fit, X, params=params)
time, _ = bench.measure_function_time(dbscan.fit, X, params=params, stage='fit')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to align stage and stages arguments of bench.measure_function_time and bench.print_output if possible

Comment thread runner.py
analysis_stage_collection = ['default']
if analysis_prefix != None:
analysis_stage_collection.extend(['fit', 'infer'])
for analysis_stage in analysis_stage_collection:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that non-measured stage is not included in single benchmark output

Comment thread bench.py

def flush_caches():
flush_datafile = 'data/flush_data.npy'
if os.path.exists(flush_datafile):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add a check to see if the file is in datasets_root

Comment thread bench.py
try:
import itt
itt_module_installed = True
except:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
except:
except ImportError:

Comment thread bench.py
iterations_to_flush = 3
try:
from sklearnex.cluster import KMeans
except:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
except:
except ImportError:

Comment thread runner.py
if key in analysis_config.keys():
args = dict_to_cmd_args(analysis_config[key])
return args
else:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What condition does this else belong to?

Same for the 107 line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants