szha commented on a change in pull request #12866: Optimization for embedding
OP for CPU
URL: https://github.com/apache/incubator-mxnet/pull/12866#discussion_r227925620
##########
File path: src/operator/tensor/indexing_op.cc
##########
@@ -39,10 +39,13 @@ template<typename DType>
bool CheckIndexOutOfBound(const DType* data_ptr, size_t data_size,
const DType min, const DType max) {
bool is_valid = true;
- for (size_t i = 0; i < data_size; i++) {
+ // to avoid Jenkins omp check error
+ int64_t size = data_size;
+ int omp_threads = engine::OpenMP::Get()->GetRecommendedOMPThreadCount();
+ #pragma omp parallel for num_threads(omp_threads) if (data_size > 2000)
Review comment:
magic number. should this be a setting similar to #12926 ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services