Skip to content

Commit

Permalink
Remove warning msg and fix onednn cpu commit (#2447)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyizh authored Oct 20, 2023
1 parent d3f447a commit 0659c19
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 37 deletions.
27 changes: 0 additions & 27 deletions itex/core/ops/nn_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4075,33 +4075,6 @@ void Register_ITEXForwardAUGRUOp() {
}
}

void Register_QuantizedMaxPool3DOp() {
itex::StatusUniquePtr status(TF_NewStatus());
{
TF_OpDefinitionBuilder* op_builder =
TF_NewOpDefinitionBuilder("_QuantizedMaxPool3D");
TF_OpDefinitionBuilderAddInput(op_builder, "input: T");
TF_OpDefinitionBuilderAddInput(op_builder, "min_input: float");
TF_OpDefinitionBuilderAddInput(op_builder, "max_input: float");
TF_OpDefinitionBuilderAddOutput(op_builder, "output: T");
TF_OpDefinitionBuilderAddOutput(op_builder, "min_output: float");
TF_OpDefinitionBuilderAddOutput(op_builder, "max_output: float");
TF_OpDefinitionBuilderAddAttr(op_builder, "T: quantizedtype");
TF_OpDefinitionBuilderAddAttr(op_builder, "ksize: list(int) >= 5");
TF_OpDefinitionBuilderAddAttr(op_builder, "strides: list(int) >= 5");
TF_OpDefinitionBuilderAddAttr(op_builder,
GetPaddingAttrStringWithExplicit());
TF_OpDefinitionBuilderAddAttr(op_builder, GetExplicitPaddingsAttrString());

// TODO(itex): Implement maxpool_shape_fn in the future
TF_OpDefinitionBuilderSetShapeInferenceFunction(op_builder,
&unknown_shape_fn);
TF_RegisterOpDefinition(op_builder, status.get());
ITEX_CHECK_EQ(TF_OK, TF_GetCode(status.get()))
<< "_QuantizedMaxPool3D op registration failed: ";
}
}

void Register_ITEXQuantizedMaxPool3DOp() {
itex::StatusUniquePtr status(TF_NewStatus());
{
Expand Down
1 change: 0 additions & 1 deletion itex/core/ops/op_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ void Register_TFLegacyOp() {
{"_QuantizedFusedMatMulAndDequantize",
Register_QuantizedFusedMatMulAndDequantizeOp},
{"_QuantizedMatMul", Register_QuantizedMatMulOp},
{"_QuantizedMaxPool3D", Register_QuantizedMaxPool3DOp},
{"_QuantizedTranspose", Register_QuantizedTransposeOp}};

for (auto register_pair : op_register_map) {
Expand Down
1 change: 0 additions & 1 deletion itex/core/ops/op_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ void Register_QuantizedFusedBatchMatMulV2AndDequantizeOp();
void Register_QuantizedFusedMatMulOp();
void Register_QuantizedFusedMatMulAndRequantizeOp();
void Register_QuantizedFusedMatMulAndDequantizeOp();
void Register_QuantizedMaxPool3DOp();
void Register_QuantizedTransposeOp();

// TODO(itex): remove this op definition, once this op is upstreamed from
Expand Down
8 changes: 4 additions & 4 deletions itex/core/utils/onednn/onednn_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ inline dnnl::stream CreateDnnlStream(const OpKernelContext& ctx,
const dnnl::engine& engine,
int num_thread = -1) {
#ifndef INTEL_CPU_ONLY
if (engine.get_kind() == dnnl::engine::kind::gpu) {
auto* ITEX_GPU_stream = ctx.GetDeviceStream();
return dnnl::sycl_interop::make_stream(engine, *ITEX_GPU_stream);
}
ITEX_CHECK(engine.get_kind() == dnnl::engine::kind::gpu)
<< "Create oneDNN stream for unsupported engine.";
auto* ITEX_GPU_stream = ctx.GetDeviceStream();
return dnnl::sycl_interop::make_stream(engine, *ITEX_GPU_stream);
#else
std::call_once(read_env_once_flag, []() {
ITEX_CHECK_OK(
Expand Down
2 changes: 1 addition & 1 deletion itex/core/wrapper/itex_cpu_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ limitations under the License.
#include "itex/core/utils/env_var.h"

static void* onednn_handle;
#endif // ITEX_CORE_WRAPPER_ITEX_CPU_WRAPPER_H_
#endif // ITEX_CORE_WRAPPER_ITEX_CPU_WRAPPER_H_
6 changes: 3 additions & 3 deletions itex/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def itex_workspace(path_prefix = "", tf_repo_name = ""):
system_build_file = clean_dep("//third_party/systemlibs:pybind11.BUILD"),
)

# 2023008017 master
_ONEDNN_CPU_COMMIT = "de0a50ffc4b6601457bfe6efb5ac8b133dcc98f0"
# 202301014 master, rls-v3.4-pc
_ONEDNN_CPU_COMMIT = "5b4f24c"

new_git_repository(
name = "onednn_cpu",
Expand All @@ -79,7 +79,7 @@ def itex_workspace(path_prefix = "", tf_repo_name = ""):

new_git_repository(
name = "onednn_cpu_eigen",
commit = "5b4f24c",
commit = _ONEDNN_CPU_COMMIT,
remote = "https://github.com/oneapi-src/oneDNN.git",
build_file = clean_dep("//third_party/onednn:onednn_cpu_eigen.BUILD"),
verbose = True,
Expand Down

0 comments on commit 0659c19

Please sign in to comment.