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

[AOTI] support freezing for MKLDNN #124350

Closed
wants to merge 36 commits into from

Commits on Apr 18, 2024

  1. [AOTI] support freezing on CPU

    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    fef3149 View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    39b354f View commit details
    Browse the repository at this point in the history
  3. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    ade4d60 View commit details
    Browse the repository at this point in the history
  4. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    61e8725 View commit details
    Browse the repository at this point in the history
  5. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    17c1c2a View commit details
    Browse the repository at this point in the history
  6. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    f69260b View commit details
    Browse the repository at this point in the history
  7. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    fe42c1d View commit details
    Browse the repository at this point in the history
  8. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    108f777 View commit details
    Browse the repository at this point in the history
  9. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    69886ec View commit details
    Browse the repository at this point in the history
  10. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    8a40ae7 View commit details
    Browse the repository at this point in the history
  11. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    800f425 View commit details
    Browse the repository at this point in the history
  12. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    2f55458 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    f8ce630 View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    ad15e4e View commit details
    Browse the repository at this point in the history
  3. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    bc8c5f7 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 6, 2024
    Configuration menu
    Copy the full SHA
    ffaa8b0 View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 6, 2024
    Configuration menu
    Copy the full SHA
    fd7bd81 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    a90c2b4 View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    5170d68 View commit details
    Browse the repository at this point in the history
  3. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    9f8ab4a View commit details
    Browse the repository at this point in the history
  4. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    32a3a95 View commit details
    Browse the repository at this point in the history
  5. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    14e23a9 View commit details
    Browse the repository at this point in the history
  6. Update on "[AOTI] support freezing on CPU"

    This PR builds upon the work done in #114451.
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 8, 2024
    Configuration menu
    Copy the full SHA
    d038be4 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Update on "[AOTI] support freezing on CPU"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    The failure of "Check mergeability of ghstack PR" in the CI is because #122472 has been reverted on main. This mergeability issue could be fixed once it relanded.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 9, 2024
    Configuration menu
    Copy the full SHA
    11c9a62 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Update on "[AOTI] support freezing on CPU"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    The failure of "Check mergeability of ghstack PR" in the CI is because #122472 has been reverted on main. This mergeability issue could be fixed once it relanded.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 15, 2024
    Configuration menu
    Copy the full SHA
    9dfba9e View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 17, 2024
    Configuration menu
    Copy the full SHA
    2328330 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b229300 View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 20, 2024
    Configuration menu
    Copy the full SHA
    ba12b18 View commit details
    Browse the repository at this point in the history
  3. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 20, 2024
    Configuration menu
    Copy the full SHA
    e7b5963 View commit details
    Browse the repository at this point in the history
  4. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 20, 2024
    Configuration menu
    Copy the full SHA
    085c0ef View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9a45dae View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. Update

    [ghstack-poisoned]
    chunyuan-w committed May 23, 2024
    Configuration menu
    Copy the full SHA
    d608f9a View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 24, 2024
    Configuration menu
    Copy the full SHA
    88f100e View commit details
    Browse the repository at this point in the history
  2. Update

    [ghstack-poisoned]
    chunyuan-w committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a08e858 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

  1. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 25, 2024
    Configuration menu
    Copy the full SHA
    b1e285b View commit details
    Browse the repository at this point in the history
  2. Update on "[AOTI] support freezing for MKLDNN"

    ## Description
    Fixes #114450. This PR builds upon the work from imzhuhl done in #114451.
    
    This PR requires #122472 to land firstly.
    
    We leverage the serialization and deserialization API from oneDNN v3.4.1 to save the opaque MKLDNN tensor during the compilation and restore the opaque tensor when loading the compiled .so.
    ideep version is updated so that we won't break any pipeline even if third_party/ideep is not updated at the same time.
    
    ### Test plan:
    ```sh
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_conv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_deconv_freezing_non_abi_compatible_cpu
    python -u test/inductor/test_aot_inductor.py -k AOTInductorTestNonABICompatibleCpu.test_linear_freezing_non_abi_compatible_cpu
    ```
    
    ### TODOs in follow-up PRs
    1. We found that using `AOTI_TORCH_CHECK` will cause performance drop on several models (`DistillGPT2`, `MBartForConditionalGeneration`, `T5ForConditionalGeneration`, `T5Small`) compared with JIT Inductor which uses `TORCH_CHECK`. This may need further discussion how to address (`AOTI_TORCH_CHECK` is introduced in 
     #119220).
    2. Freezing in non-ABI compatible mode will work with the support in this PR. While for ABI compatible mode, we need to firstly address this issue: `AssertionError: None, i.e. optional output is not supported`.
    https://github.com/pytorch/pytorch/blob/6c4f43f82675b5fcfe8cf3e5983d0c0f326408aa/torch/_inductor/codegen/cpp_wrapper_cpu.py#L2023-L2024
    
    cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang
    
    [ghstack-poisoned]
    chunyuan-w committed May 25, 2024
    Configuration menu
    Copy the full SHA
    39ed894 View commit details
    Browse the repository at this point in the history