model_analyzer/record/metrics_manager.py
def _init_state(self):
        """
        Sets MetricsManager object managed
        state variables in AnalyerState
        """

        gpu_info = self._state_manager.get_state_variable(
            'MetricsManager.gpu_info')

        if self._state_manager.starting_fresh_run() or gpu_info is None:
            gpu_info = {}

        for i in range(len(self._gpus)):
            if self._gpus[i].device_uuid() not in gpu_info:
                device_info = {}
                device = numba.cuda.list_devices()[i]
                device_info['name'] = device.name
                with device:
                    # convert bytes to GB
                    device_info['total_memory'] = numba.cuda.current_context(
                    ).get_memory_info().total
                gpu_info[self._gpus[i].device_uuid()] = device_info

        self._state_manager.set_state_variable('MetricsManager.gpus', gpu_info)

        Sets MetricsManager object managed
        state variables in AnalyerState
        
Sets MetricsManager object managed
state variables in AnalyerState
Sets MetricsManager object managed state variables in AnalyerState
def _init_state(self):
        gpu_info = self._state_manager.get_state_variable(
            'MetricsManager.gpu_info')
        if self._state_manager.starting_fresh_run() or gpu_info is None:
            gpu_info = {}
        for i in range(len(self._gpus)):
            if self._gpus[i].device_uuid() not in gpu_info:
                device_info = {}
                device = numba.cuda.list_devices()[i]
                device_info['name'] = device.name
                with device:
                    device_info['total_memory'] = numba.cuda.current_context(
                    ).get_memory_info().total
                gpu_info[self._gpus[i].device_uuid()] = device_info
        self._state_manager.set_state_variable('MetricsManager.gpus', gpu_info)
def _init_state ( self ) : gpu_info = self . _state_manager . get_state_variable ( 'MetricsManager.gpu_info' ) if self . _state_manager . starting_fresh_run ( ) or gpu_info is None : gpu_info = { } for i in range ( len ( self . _gpus ) ) : if self . _gpus [ i ] . device_uuid ( ) not in gpu_info : device_info = { } device = numba . cuda . list_devices ( ) [ i ] device_info [ 'name' ] = device . name with device : device_info [ 'total_memory' ] = numba . cuda . current_context ( ) . get_memory_info ( ) . total gpu_info [ self . _gpus [ i ] . device_uuid ( ) ] = device_info self . _state_manager . set_state_variable ( 'MetricsManager.gpus' , gpu_info )
Sets MetricsManager object managed
state variables in AnalyerState
Sets MetricsManager object managed state variables in AnalyerState
"""
        Sets MetricsManager object managed
        state variables in AnalyerState
        """ # convert bytes to GB
self