Skip to content

add UT for mkldnn_cache_capacity#24336

Merged
luotao1 merged 2 commits intoPaddlePaddle:developfrom
luotao1:detect_model_mkldnn
May 8, 2020
Merged

add UT for mkldnn_cache_capacity#24336
luotao1 merged 2 commits intoPaddlePaddle:developfrom
luotao1:detect_model_mkldnn

Conversation

@luotao1
Copy link
Contributor

@luotao1 luotao1 commented May 7, 2020

(&platform::DeviceContextPool::Instance())
->Get(platform::CPUPlace()))
->GetShapeBlobSize();
CHECK_LE(shape_blob_size, config_.mkldnn_cache_capacity_);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid speed impact on inference deployment, we only do CHECK_LE when VLOG>=2 in debug mode.

@luotao1 luotao1 added the Intel label May 7, 2020
@luotao1 luotao1 requested a review from jczaja May 7, 2020 12:43
EXTRA_DEPS ${INFERENCE_EXTRA_DEPS}
ARGS --infer_model=${DENSEBOX_INSTALL_DIR}/model --infer_data=${DENSEBOX_INSTALL_DIR}/detect_input_50.txt
--infer_shape=${DENSEBOX_INSTALL_DIR}/shape_50.txt)
set_property(TEST test_analyzer_detect PROPERTY ENVIRONMENT GLOG_vmodule=analysis_predictor=2)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To enable VLOG_IS_ON(2) in analysis_predictor, here adjust the cmake.

jczaja
jczaja previously approved these changes May 7, 2020
Copy link
Contributor

@jczaja jczaja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NHZlX
Copy link
Contributor

NHZlX commented May 8, 2020

Should add more commets for

void SetMkldnnCacheCapacity(int capacity);
later.

Copy link
Contributor

@NHZlX NHZlX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit c1df704 into PaddlePaddle:develop May 8, 2020
@luotao1 luotao1 deleted the detect_model_mkldnn branch May 8, 2020 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants