diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a4b8b36d470..ff893ae97a7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -307,6 +307,7 @@ if(USE_MKLDNN) # Also ACL_ROOT_DIR need to be set set(CMAKE_CXX_STANDARD 14) set(DNNL_AARCH64_USE_ACL ON CACHE INTERNAL "" FORCE) + add_definitions(-DDNNL_AARCH64_USE_ACL=1) endif() if (MKLDNN_USE_APL) # APL needs to be added to LD_LIBRARY_PATH diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cd5903de724e..f05421805f68 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -255,6 +255,7 @@ List of Contributors * [Zhaoqi Zhu](https://github.com/zha0q1) * [Harshit Sharma](https://github.com/harshitshrma) * [Andrzej Kotlowski](https://github.com/anko-intel) +* [Crefeda Faviola Rodrigues](https://github.com/cfRod) Label Bot --------- diff --git a/src/operator/operator_common.h b/src/operator/operator_common.h index 2628c80c4f14..808e46c8f306 100644 --- a/src/operator/operator_common.h +++ b/src/operator/operator_common.h @@ -620,6 +620,12 @@ class OpSignature { hash = hash * 2 + arr.dtype(); eles.push_back(arr.dtype()); AddSign(arr.shape()); +// Note:Temporary workaround for the accuracy issue noted here #20265. +// Future releases of Compute Library will aim to fix this. +#if DNNL_AARCH64_USE_ACL == 1 + auto ival = reinterpret_cast(arr.storage_handle().dptr); + AddSign(ival); +#endif #if MXNET_USE_MKLDNN == 1 } #endif @@ -643,6 +649,11 @@ class OpSignature { eles.push_back(val); } + void AddSign(uint64_t val) { + hash = hash * 2 + val; + eles.push_back(val); + } + void AddSign(float val) { hash = dmlc::HashCombine(hash, val); eles.push_back(val);