From ca4d2fcad00dee33f7426751b21e94417223d115 Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Mon, 30 Aug 2021 10:10:33 +0200 Subject: [PATCH] - candidate fix (#35231) --- paddle/fluid/platform/mkldnn_helper.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/platform/mkldnn_helper.h b/paddle/fluid/platform/mkldnn_helper.h index 0b683a742c..01c2d95a07 100644 --- a/paddle/fluid/platform/mkldnn_helper.h +++ b/paddle/fluid/platform/mkldnn_helper.h @@ -476,10 +476,8 @@ inline std::string CreateKey(const platform::MKLDNNDeviceContext& dev_ctx, inline std::string ExtendKeyWithThreadInfoIfNeeded( const platform::MKLDNNDeviceContext& dev_ctx, const std::string& key) { - return ((paddle::platform::MKLDNNDeviceContext::tls().is_tid_used_in_key() == - true) && - (platform::MKLDNNDeviceContext::tls().get_cur_mkldnn_session_id() == - platform::MKLDNNDeviceContextThreadLocals::kMKLDNNSessionID_Default)) + return (paddle::platform::MKLDNNDeviceContext::tls().is_tid_used_in_key() == + true) ? key + "-t:" + ThreadIDasStr() : key; } -- GitLab