model_analyzer/config/input/config_command_profile.py
def _add_perf_analyzer_configs(self):
        """
        Add the perf_analyzer related config
        options
        """

        self._add_config(
            ConfigField('perf_analyzer_timeout',
                        flags=['--perf-analyzer-timeout'],
                        field_type=ConfigPrimitive(int),
                        default_value=DEFAULT_PERF_ANALYZER_TIMEOUT,
                        description="Perf analyzer timeout value in seconds."))
        self._add_config(
            ConfigField(
                'perf_analyzer_cpu_util',
                flags=['--perf-analyzer-cpu-util'],
                field_type=ConfigPrimitive(float),
                default_value=psutil.cpu_count() *
                DEFAULT_PERF_ANALYZER_CPU_UTIL,
                description=
                "Maximum CPU utilization value allowed for the perf_analyzer."))
        self._add_config(
            ConfigField('perf_analyzer_path',
                        flags=['--perf-analyzer-path'],
                        field_type=ConfigPrimitive(
                            str, validator=binary_path_validator),
                        default_value=DEFAULT_PERF_ANALYZER_PATH,
                        description=
                        'The full path to the perf_analyzer binary executable'))
        self._add_config(
            ConfigField(
                'perf_output',
                flags=['--perf-output'],
                field_type=ConfigPrimitive(bool),
                default_value=DEFAULT_PERF_OUTPUT_FLAG,
                description=
                'Enables the output from the perf_analyzer to a file specified by'
                ' perf_output_path. If perf_output_path is None, output will be'
                ' written to stdout.'))
        self._add_config(
            ConfigField(
                'perf_output_path',
                flags=['--perf-output-path'],
                field_type=ConfigPrimitive(str),
                description=
                'Path to the file to which write perf_analyzer output, if enabled.'
            ))
        self._add_config(
            ConfigField(
                'perf_analyzer_max_auto_adjusts',
                field_type=ConfigPrimitive(int),
                default_value=DEFAULT_PERF_MAX_AUTO_ADJUSTS,
                description="Maximum number of times perf_analyzer is "
                "launched with auto adjusted parameters in an attempt to profile a model. "
            ))

        Add the perf_analyzer related config
        options
        
Add the perf_analyzer related config
options
Add the perf_analyzer related config options
def _add_perf_analyzer_configs(self):
        self._add_config(
            ConfigField('perf_analyzer_timeout',
                        flags=['--perf-analyzer-timeout'],
                        field_type=ConfigPrimitive(int),
                        default_value=DEFAULT_PERF_ANALYZER_TIMEOUT,
                        description="Perf analyzer timeout value in seconds."))
        self._add_config(
            ConfigField(
                'perf_analyzer_cpu_util',
                flags=['--perf-analyzer-cpu-util'],
                field_type=ConfigPrimitive(float),
                default_value=psutil.cpu_count() *
                DEFAULT_PERF_ANALYZER_CPU_UTIL,
                description=
                "Maximum CPU utilization value allowed for the perf_analyzer."))
        self._add_config(
            ConfigField('perf_analyzer_path',
                        flags=['--perf-analyzer-path'],
                        field_type=ConfigPrimitive(
                            str, validator=binary_path_validator),
                        default_value=DEFAULT_PERF_ANALYZER_PATH,
                        description=
                        'The full path to the perf_analyzer binary executable'))
        self._add_config(
            ConfigField(
                'perf_output',
                flags=['--perf-output'],
                field_type=ConfigPrimitive(bool),
                default_value=DEFAULT_PERF_OUTPUT_FLAG,
                description=
                'Enables the output from the perf_analyzer to a file specified by'
                ' perf_output_path. If perf_output_path is None, output will be'
                ' written to stdout.'))
        self._add_config(
            ConfigField(
                'perf_output_path',
                flags=['--perf-output-path'],
                field_type=ConfigPrimitive(str),
                description=
                'Path to the file to which write perf_analyzer output, if enabled.'
            ))
        self._add_config(
            ConfigField(
                'perf_analyzer_max_auto_adjusts',
                field_type=ConfigPrimitive(int),
                default_value=DEFAULT_PERF_MAX_AUTO_ADJUSTS,
                description="Maximum number of times perf_analyzer is "
                "launched with auto adjusted parameters in an attempt to profile a model. "
            ))
def _add_perf_analyzer_configs ( self ) : self . _add_config ( ConfigField ( 'perf_analyzer_timeout' , flags = [ '--perf-analyzer-timeout' ] , field_type = ConfigPrimitive ( int ) , default_value = DEFAULT_PERF_ANALYZER_TIMEOUT , description = "Perf analyzer timeout value in seconds." ) ) self . _add_config ( ConfigField ( 'perf_analyzer_cpu_util' , flags = [ '--perf-analyzer-cpu-util' ] , field_type = ConfigPrimitive ( float ) , default_value = psutil . cpu_count ( ) * DEFAULT_PERF_ANALYZER_CPU_UTIL , description = "Maximum CPU utilization value allowed for the perf_analyzer." ) ) self . _add_config ( ConfigField ( 'perf_analyzer_path' , flags = [ '--perf-analyzer-path' ] , field_type = ConfigPrimitive ( str , validator = binary_path_validator ) , default_value = DEFAULT_PERF_ANALYZER_PATH , description = 'The full path to the perf_analyzer binary executable' ) ) self . _add_config ( ConfigField ( 'perf_output' , flags = [ '--perf-output' ] , field_type = ConfigPrimitive ( bool ) , default_value = DEFAULT_PERF_OUTPUT_FLAG , description = 'Enables the output from the perf_analyzer to a file specified by' ' perf_output_path. If perf_output_path is None, output will be' ' written to stdout.' ) ) self . _add_config ( ConfigField ( 'perf_output_path' , flags = [ '--perf-output-path' ] , field_type = ConfigPrimitive ( str ) , description = 'Path to the file to which write perf_analyzer output, if enabled.' ) ) self . _add_config ( ConfigField ( 'perf_analyzer_max_auto_adjusts' , field_type = ConfigPrimitive ( int ) , default_value = DEFAULT_PERF_MAX_AUTO_ADJUSTS , description = "Maximum number of times perf_analyzer is " "launched with auto adjusted parameters in an attempt to profile a model. " ) )
Add the perf_analyzer related config
options
Add the perf_analyzer related config options
"""
        Add the perf_analyzer related config
        options
        """
self