Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

AMP improvements + enable bf16 input for quantize_v2 #20983

Merged
merged 18 commits into from
May 17, 2022

Conversation

PawelGlomski-Intel
Copy link
Contributor

@PawelGlomski-Intel PawelGlomski-Intel commented Mar 31, 2022

Changes

  • Fixed asnumpy() for bfloat16 dtype
  • Relaxed some AMP assumptions, added more checks
  • Fixed an issue with ops from LP16_FP32_FUNCS list, for which order of visited nodes during graph pass could have affected whether an op is converted (to low precision) or not.
    • Added tests covering this issue
      • Created a file for common (cpu and gpu) AMP tests: tests/python/amp/common.py
  • Enabled bf16 input for calibrated quantize_v2 ops (removes the need for amp_cast before quantize_v2 for quantized models)
  • Fixed adding forward hooks
  • Add AMP disabling using a context manager

@mxnet-bot
Copy link

Hey @PawelGlomski-Intel , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [windows-gpu, windows-cpu, sanity, unix-gpu, centos-cpu, miscellaneous, clang, centos-gpu, website, edge, unix-cpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Mar 31, 2022
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Mar 31, 2022
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 1, 2022
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 1, 2022
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Apr 4, 2022
@mseth10 mseth10 added pr-awaiting-review PR is waiting for code review pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review labels Apr 28, 2022
@PawelGlomski-Intel
Copy link
Contributor Author

@mxnet-bot run ci [unix-cpu, clang, miscellaneous, unix-gpu, website]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [miscellaneous, website, unix-cpu, clang, unix-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 4, 2022
@bgawrych
Copy link
Contributor

bgawrych commented May 6, 2022

@mxnet-bot run ci [miscellaneous, unix-gpu, website]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-gpu, miscellaneous, website]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 6, 2022
@PawelGlomski-Intel
Copy link
Contributor Author

@mxnet-bot run ci [miscellaneous, unix-gpu, website]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [website, unix-gpu, miscellaneous]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels May 17, 2022
@bgawrych bgawrych merged commit 3098af4 into apache:master May 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants