diff --git a/aten/src/ATen/cpu/vec/vec256/vsx/vec256_complex_double_vsx.h b/aten/src/ATen/cpu/vec/vec256/vsx/vec256_complex_double_vsx.h index 705d8436edf..a6a883e53b3 100644 --- a/aten/src/ATen/cpu/vec/vec256/vsx/vec256_complex_double_vsx.h +++ b/aten/src/ATen/cpu/vec/vec256/vsx/vec256_complex_double_vsx.h @@ -478,7 +478,7 @@ class Vectorized { this->store(tmp1); b.store(tmp2); - for (const auto i : c10::irange(Vectorized>::size())) { + for (const auto i : c10::irange(Vectorized>::size())) { out[i] = tmp1[i] / tmp2[i]; } return loadu(out); diff --git a/aten/src/ATen/native/Blas.cpp b/aten/src/ATen/native/Blas.cpp index 2ca484f808b..674ccf11cfb 100644 --- a/aten/src/ATen/native/Blas.cpp +++ b/aten/src/ATen/native/Blas.cpp @@ -296,7 +296,7 @@ _scaled_mm_out_cpu(const Tensor& mat1, const Tensor& mat2, std::optional out_dtype, bool use_fast_accum, Tensor& out) { -#if AT_MKLDNN_ENABLED() +#if AT_MKLDNN_ENABLED() && !defined(__powerpc__) if (at::globalContext().userEnabledMkldnn()) { bool mixed_dtype = mat1.scalar_type() != mat2.scalar_type(); if ((!mixed_dtype && cpuinfo_has_x86_amx_int8()) || diff --git a/cmake/Modules/FindMKLDNN.cmake b/cmake/Modules/FindMKLDNN.cmake index d622261455d..00fd0130d83 100644 --- a/cmake/Modules/FindMKLDNN.cmake +++ b/cmake/Modules/FindMKLDNN.cmake @@ -85,8 +85,12 @@ IF(NOT MKLDNN_FOUND) ENDIF(NOT APPLE AND NOT WIN32 AND NOT BUILD_LITE_INTERPRETER) IF(EXISTS "${MKLDNN_ROOT}/include/oneapi/dnnl/dnnl_ukernel.hpp") - MESSAGE("-- Will build oneDNN UKERNEL") - SET(DNNL_EXPERIMENTAL_UKERNEL ON CACHE BOOL "" FORCE) + IF(CPU_POWER) + SET(DNNL_EXPERIMENTAL_UKERNEL OFF CACHE BOOL "" FORCE) + ELSE() + MESSAGE("-- Will build oneDNN UKERNEL") + SET(DNNL_EXPERIMENTAL_UKERNEL ON CACHE BOOL "" FORCE) + ENDIF() ENDIF(EXISTS "${MKLDNN_ROOT}/include/oneapi/dnnl/dnnl_ukernel.hpp") FIND_PACKAGE(BLAS)