Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[profiler] Support top-level memory events #51421

Closed
wants to merge 5 commits into from

Commits on Jan 31, 2021

  1. [profiler] Support top-level memory events

    Summary:
    Mark memory events that did not happen within an operator context
    explicitly in the profiler output.
    This PR also adds an API to track memory events outside of or partially
    overlapping with the profiler scope.
    
    Test Plan:
    python test/test_profiler.py -k test_memory_profiler
    
    [ghstack-poisoned]
    ilia-cher committed Jan 31, 2021
    Configuration menu
    Copy the full SHA
    289a14b View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. Update on "[profiler] Support top-level memory events"

    Summary:
    Mark memory events that did not happen within an operator context
    explicitly in the profiler output.
    This PR also adds an API to track memory events outside of or partially
    overlapping with the profiler scope.
    
    Test Plan:
    python test/test_profiler.py -k test_memory_profiler
    ```
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
                  Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg       CPU Mem  Self CPU Mem      CUDA Mem  Self CUDA Mem    # of Calls
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
            aten::rand        40.00%      10.000us       100.00%      25.000us      25.000us         400 b           0 b           0 b           0 b             1
           aten::empty        24.00%       6.000us        24.00%       6.000us       6.000us         400 b         400 b           0 b           0 b             1
        aten::uniform_        36.00%       9.000us        36.00%       9.000us       9.000us           0 b           0 b           0 b           0 b             1
              [memory]         0.00%       0.000us         0.00%       0.000us       0.000us        -400 b        -400 b        -512 b        -512 b             2
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
    ```
    
    Differential Revision: [D26166518](https://our.internmc.facebook.com/intern/diff/D26166518)
    
    [ghstack-poisoned]
    ilia-cher committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    6e974a3 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Update on "[profiler] Support top-level memory events"

    Summary:
    Mark memory events that did not happen within an operator context
    explicitly in the profiler output.
    This PR also adds an API to track memory events outside of or partially
    overlapping with the profiler scope.
    
    Test Plan:
    python test/test_profiler.py -k test_memory_profiler
    ```
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
                  Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg       CPU Mem  Self CPU Mem      CUDA Mem  Self CUDA Mem    # of Calls
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
            aten::rand        40.00%      10.000us       100.00%      25.000us      25.000us         400 b           0 b           0 b           0 b             1
           aten::empty        24.00%       6.000us        24.00%       6.000us       6.000us         400 b         400 b           0 b           0 b             1
        aten::uniform_        36.00%       9.000us        36.00%       9.000us       9.000us           0 b           0 b           0 b           0 b             1
              [memory]         0.00%       0.000us         0.00%       0.000us       0.000us        -400 b        -400 b        -512 b        -512 b             2
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
    ```
    
    Differential Revision: [D26166518](https://our.internmc.facebook.com/intern/diff/D26166518)
    
    [ghstack-poisoned]
    ilia-cher committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    7d1d418 View commit details
    Browse the repository at this point in the history
  2. Update on "[profiler] Support top-level memory events"

    Summary:
    Mark memory events that did not happen within an operator context
    explicitly in the profiler output.
    This PR also adds an API to track memory events outside of or partially
    overlapping with the profiler scope.
    
    Test Plan:
    python test/test_profiler.py -k test_memory_profiler
    ```
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
                  Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg       CPU Mem  Self CPU Mem      CUDA Mem  Self CUDA Mem    # of Calls
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
            aten::rand        40.00%      10.000us       100.00%      25.000us      25.000us         400 b           0 b           0 b           0 b             1
           aten::empty        24.00%       6.000us        24.00%       6.000us       6.000us         400 b         400 b           0 b           0 b             1
        aten::uniform_        36.00%       9.000us        36.00%       9.000us       9.000us           0 b           0 b           0 b           0 b             1
              [memory]         0.00%       0.000us         0.00%       0.000us       0.000us        -400 b        -400 b        -512 b        -512 b             2
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
    ```
    
    Differential Revision: [D26166518](https://our.internmc.facebook.com/intern/diff/D26166518)
    
    [ghstack-poisoned]
    ilia-cher committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    479a7e0 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

  1. Update on "[profiler] Support top-level memory events"

    Summary:
    Mark memory events that did not happen within an operator context
    explicitly in the profiler output.
    
    Test Plan:
    python test/test_profiler.py -k test_memory_profiler
    ```
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
                  Name    Self CPU %      Self CPU   CPU total %     CPU total  CPU time avg       CPU Mem  Self CPU Mem      CUDA Mem  Self CUDA Mem    # of Calls
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
            aten::rand        40.00%      10.000us       100.00%      25.000us      25.000us         400 b           0 b           0 b           0 b             1
           aten::empty        24.00%       6.000us        24.00%       6.000us       6.000us         400 b         400 b           0 b           0 b             1
        aten::uniform_        36.00%       9.000us        36.00%       9.000us       9.000us           0 b           0 b           0 b           0 b             1
              [memory]         0.00%       0.000us         0.00%       0.000us       0.000us        -400 b        -400 b        -512 b        -512 b             2
    ------------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------  ------------
    ```
    
    Differential Revision: [D26166518](https://our.internmc.facebook.com/intern/diff/D26166518)
    
    [ghstack-poisoned]
    ilia-cher committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    326f80c View commit details
    Browse the repository at this point in the history