neural_compressor.experimental.benchmark
Benchmarking: measure the model performance with the objective settings.
Module Contents
Classes
Benchmark class is used to evaluate the model performance with the objective settings. |
Functions
|
Set the specified environment variable. |
|
Set all the environment variables with the configuration dict. |
Get the architecture name of the system. |
|
Get the threads per core. |
|
Get the list of threads. |
|
Get the list of sockets. |
|
Get the ids list of the cores. |
|
|
Return the threads id list that we will bind instances to. |
- neural_compressor.experimental.benchmark.set_env_var(env_var, value, overwrite_existing=False)[source]
Set the specified environment variable.
Only set new env in two cases: 1. env not exists 2. env already exists but overwrite_existing params set True
- neural_compressor.experimental.benchmark.set_all_env_var(conf, overwrite_existing=False)[source]
Set all the environment variables with the configuration dict.
Neural Compressor only uses physical cores
- neural_compressor.experimental.benchmark.get_architecture()[source]
Get the architecture name of the system.
- neural_compressor.experimental.benchmark.get_bounded_threads(core_ids, threads, sockets)[source]
Return the threads id list that we will bind instances to.
- class neural_compressor.experimental.benchmark.Benchmark(conf_fname_or_obj=None)[source]
Benchmark class is used to evaluate the model performance with the objective settings.
Users can use the data that they configured in YAML NOTICE: neural_compressor Benchmark will use the original command to run sub-process, which depends on the user’s code and has the possibility to run unnecessary code