Skip to content

Commit 5eaa7c0

Browse files
committed
Fix
1 parent 7ec9073 commit 5eaa7c0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

paddle/fluid/inference/api/analysis_predictor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ void AnalysisPredictor::MkldnnPreSet(
15901590
if (config_.onednn_cache_capacity_ > 0) {
15911591
VLOG(2) << "In mkldnn cache clear mode.";
15921592
phi::OneDNNContext::tls().set_cur_mkldnn_session_id(
1593-
phi::OneDNNContextThreadLocals::kMKLDNNSessionID_CacheClearing);
1593+
phi::OneDNNContextThreadLocals::kONEDNNSessionID_CacheClearing);
15941594
// Set current_input_shape for caching dynamic shape.
15951595
std::stringstream ss;
15961596
for (const auto &input_shape : inputs_shape) {

paddle/phi/backends/onednn/onednn_context.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace phi {
2727

2828
OneDNNContextThreadLocals::Body::Body()
2929
: cur_engine(dnnl::engine::kind::cpu, 0), cur_stream(cur_engine) {
30-
cur_mkldnn_session_id = kMKLDNNSessionID_Default;
30+
cur_mkldnn_session_id = kONEDNNSessionID_Default;
3131
cur_input_shape_str = "";
3232
cur_input_shape_cache_capacity = 1;
3333
cur_paddle_data_layout = DataLayout::kNCHW;
@@ -208,7 +208,7 @@ struct OneDNNContext::Impl {
208208
// In cache clearing mode, cur_input_shape_cache_capacity defines
209209
// max pblob capacity
210210
if ((static_cast<size_t>(sid) ==
211-
OneDNNContextThreadLocals::kMKLDNNSessionID_CacheClearing) &&
211+
OneDNNContextThreadLocals::kONEDNNSessionID_CacheClearing) &&
212212
!sBlob->empty() &&
213213
(sBlob->size() >=
214214
static_cast<size_t>(

paddle/phi/backends/onednn/onednn_context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class OneDNNContextThreadLocals {
7474

7575
public:
7676
// default onednn session id
77-
static constexpr size_t kMKLDNNSessionID_Default = 0;
77+
static constexpr size_t kONEDNNSessionID_Default = 0;
7878
// onednn session id for cache clearing mode
79-
static constexpr size_t kMKLDNNSessionID_CacheClearing = -1;
79+
static constexpr size_t kONEDNNSessionID_CacheClearing = -1;
8080
TEST_API static Body& fetch();
8181
};
8282

0 commit comments

Comments
 (0)