Skip to content

Commit

Permalink
Revert D33716039: [pytorch][PR] Add ONEDNN quantization backend
Browse files Browse the repository at this point in the history
Test Plan: revert-hammer

Differential Revision:
D33716039 (pytorch@989b248)

Original commit changeset: 6f7bb807e857

Original Phabricator Diff: D33716039 (pytorch@989b248)

fbshipit-source-id: ed233c5b99d4edb7d5a9d6c600825c78555f16d0
(cherry picked from commit d3e1f82)
  • Loading branch information
jerryzh168 authored and pytorchmergebot committed Mar 11, 2022
1 parent 44997ef commit 5a89753
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 1,010 deletions.
4 changes: 0 additions & 4 deletions aten/src/ATen/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ const std::vector<at::QEngine>& Context::supportedQEngines() {
engines.push_back(at::kNoQEngine);
#endif // C10_MOBILE

#if AT_MKLDNN_ENABLED()
engines.push_back(at::kONEDNN);
#endif

#ifdef USE_FBGEMM
if (fbgemm::fbgemmSupportedCPU()) {
engines.push_back(at::kFBGEMM);
Expand Down
15 changes: 0 additions & 15 deletions aten/src/ATen/native/quantized/cpu/conv_serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <ATen/core/List.h>
#include <ATen/native/quantized/cpu/fbgemm_utils.h>
#include <ATen/native/quantized/cpu/qnnpack_utils.h>
#include <ATen/native/quantized/cpu/onednn_utils.h>
#include <c10/util/irange.h>

#include <tuple>
Expand Down Expand Up @@ -359,20 +358,6 @@ c10::intrusive_ptr<ConvPackedParamsBase<kSpatialDim>> deserialize_conv(
);
}
#endif // USE_PYTORCH_QNNPACK
#if AT_MKLDNN_ENABLED()
if (ctx.qEngine() == at::QEngine::ONEDNN) {
return PackedConvWeightsOnednn<kSpatialDim>::prepack(
weight.value(),
bias,
stride,
padding,
output_padding,
dilation,
groups,
transpose
);
}
#endif // AT_MKLDNN_ENABLED()
TORCH_CHECK(
false,
"Didn't find engine for when deserializing ConvPackedParams: ",
Expand Down
11 changes: 0 additions & 11 deletions aten/src/ATen/native/quantized/cpu/fbgemm_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <ATen/native/quantized/cpu/embedding_packed_params.h>
#include <ATen/native/quantized/cpu/fbgemm_utils.h>
#include <ATen/native/quantized/cpu/qnnpack_utils.h>
#include <ATen/native/quantized/cpu/onednn_utils.h>
#include <ATen/native/TensorFactories.h>
#include <ATen/quantized/QTensorImpl.h>
#include <ATen/quantized/Quantizer.h>
Expand Down Expand Up @@ -471,16 +470,6 @@ int register_linear_params() {
std::move(weight), std::move(bias));
}
#endif // USE_PYTORCH_QNNPACK
#if AT_MKLDNN_ENABLED()
if (at::globalContext().qEngine() == at::QEngine::ONEDNN) {
TORCH_CHECK(
weight.scalar_type() == at::kQInt8,
"ONEDNN only supports INT8 bit width currently. Got ",
c10::toString(weight.scalar_type()));
return PackedLinearWeightsOnednn::prepack(
std::move(weight), std::move(bias));
}
#endif // #if AT_MKLDNN_ENABLED()
TORCH_CHECK(false, "Unknown qengine");
})
.def("bias", [](const c10::intrusive_ptr<LinearPackedParamsBase>& self) {
Expand Down
154 changes: 0 additions & 154 deletions aten/src/ATen/native/quantized/cpu/onednn_utils.h

This file was deleted.

Loading

0 comments on commit 5a89753

Please sign in to comment.