Skip to content

Conversation

Guobing-Chen
Copy link
Owner

After previous PR of basic NNC quantization support, there should be a serial of follow-up PRs to fix/implement OP-level quantization and ChannelsLast support. Scopes including existing NNC quantization OPs, non-quant-specific NNC OPs (e.x.: various pooling OPs).

As one of this serial, this PR targets to fix/implement quantization/ChannelsLast support for AdaptiveAvgPool2D. Details as below:

  • Updated AdaptiveAvgPool2D lowering/externcall to support quantization and ChannelsLast
torch/csrc/jit/tensorexpr/operators/reduction.cpp
torch/csrc/jit/tensorexpr/external_functions.cpp
  • Implemented out version of AdaptiveAvgPool2d externalcall to improve memory efficiency when applicable
torch/csrc/jit/tensorexpr/external_functions.cpp
torch/csrc/jit/tensorexpr/codegen.cpp
  • Added new test case to cover quantization/ChannelsLast scenaro of this OP and also udpated UnaryFloat case which uses this OP
test/cpp/tensorexpr/test_external_calls.cpp
test/cpp/tensorexpr/test_quantization.cpp

* Updated AdaptiveAvgPool2D lowering/externcall to support quantization
and ChannelsLast
* Implemented out version of AdaptiveAvgPool2d externalcall to improve
memory efficiency when applicable
* Added new test case to cover quantization/ChannelsLast scenaro of this
OP and also udpated UnaryFloat case which uses this OP
@Guobing-Chen Guobing-Chen force-pushed the nnc_quant_op_adaptiveavgpool2d branch from 1486190 to fc32739 Compare July 18, 2022 06:56
@jgong5 jgong5 mentioned this pull request Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants