Skip to content

The result of "params of model" in profiler is miscalculated.[BUG] #2036

@Neleon

Description

@Neleon

In flops_profiler/profiler.py, Line290 and Line299, both the result are 1, see screenshot below.

Dingtalk_20220621205517

original code:

 print('{:<60}  {:<8}'.format(
            'params of model = params per GPU * mp_size: ',
            params_to_string(total_params *
                             (self.ds_engine.mp_world_size) if self.ds_engine else 1)))

fixed code:

 print('{:<60}  {:<8}'.format(
            'params of model = params per GPU * mp_size: ',
            params_to_string(total_params *
                             ((self.ds_engine.mp_world_size) if self.ds_engine else 1))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions