diff --git a/src/engine/naive_engine.cc b/src/engine/naive_engine.cc index c321e48d562d..94252fbbc3fc 100644 --- a/src/engine/naive_engine.cc +++ b/src/engine/naive_engine.cc @@ -127,7 +127,7 @@ class NaiveEngine final : public Engine { attrs.reset(new profiler::ProfileOperator::Attributes()); } opr->opr_profile.reset(new profiler::ProfileOperator(opr->opr_name, attrs.release())); - opr->opr_profile->start(exec_ctx.dev_type, exec_ctx.dev_id); + opr->opr_profile->startForDevice(exec_ctx.dev_type, exec_ctx.dev_id); } opr->fn(ctx, on_complete); if (opr->profiling) { @@ -169,7 +169,7 @@ class NaiveEngine final : public Engine { attrs.reset(new profiler::ProfileOperator::Attributes()); } opr->opr_profile.reset(new profiler::ProfileOperator(opr->opr_name, attrs.release())); - opr->opr_profile->start(exec_ctx.dev_type, exec_ctx.dev_id); + opr->opr_profile->startForDevice(exec_ctx.dev_type, exec_ctx.dev_id); } if (exec_ctx.dev_mask() == gpu::kDevMask) { #if MXNET_USE_CUDA diff --git a/src/engine/threaded_engine.h b/src/engine/threaded_engine.h index c39f322596ae..7ac17516ebeb 100644 --- a/src/engine/threaded_engine.h +++ b/src/engine/threaded_engine.h @@ -358,7 +358,7 @@ class ThreadedEngine : public Engine { const Context& ctx = opr_block->ctx; opr_block->opr_profile.reset(new profiler::ProfileOperator(threaded_opr->opr_name, attrs.release())); - opr_block->opr_profile->start(ctx.dev_type, ctx.dev_id); + opr_block->opr_profile->startForDevice(ctx.dev_type, ctx.dev_id); } CallbackOnComplete callback = this->CreateCallback(ThreadedEngine::OnCompleteStatic, opr_block); diff --git a/src/kvstore/kvstore_local.h b/src/kvstore/kvstore_local.h index 4e004a3a3008..5c3c80838a36 100644 --- a/src/kvstore/kvstore_local.h +++ b/src/kvstore/kvstore_local.h @@ -278,7 +278,7 @@ class KVStoreLocal : public KVStore { std::vector> *grouped_vals, bool ignore_sparse) { // check if the storage type of a value is valid - auto validator = [this](const int key, const NDArray& nd, bool ignore_sparse) -> bool { + auto validator = [](const int key, const NDArray& nd, bool ignore_sparse) -> bool { CHECK(!ignore_sparse) << "Cannot ignore sparse arrays for push"; auto stype = nd.storage_type(); // valid NDArray @@ -323,7 +323,7 @@ class KVStoreLocal : public KVStore { std::vector> *grouped_vals, bool ignore_sparse) { // check if the storage type of a value is valid - auto validator = [this](const int key, const RSPVal& val_rowid, bool ignore_sparse) -> bool { + auto validator = [](const int key, const RSPVal& val_rowid, bool ignore_sparse) -> bool { CHECK(!ignore_sparse) << "Cannot ignore sparse arrays in row_sparse_pull"; auto val_stype = val_rowid.first->storage_type(); auto rowid_stype = val_rowid.second.storage_type(); diff --git a/src/profiler/profiler.h b/src/profiler/profiler.h index f9eb0af9acc1..4cc1f2080a8e 100644 --- a/src/profiler/profiler.h +++ b/src/profiler/profiler.h @@ -1157,7 +1157,7 @@ struct ProfileOperator : public ProfileEvent { * \param dev_type Device type that the profiling will occur on * \param dev_id Device id associated with this opr */ - void start(mxnet::Context::DeviceType dev_type, uint32_t dev_id) { + void startForDevice(mxnet::Context::DeviceType dev_type, uint32_t dev_id) { dev_type_ = dev_type; dev_id_ = dev_id; ProfileEvent::start(); @@ -1209,7 +1209,7 @@ struct ProfileOperator : public ProfileEvent { */ void SendStat() override { Profiler::Get()->AddNewProfileStat( - [this](OprExecStat *stat) {}, name_.c_str(), dev_type_, dev_id_, + [](OprExecStat *stat) {}, name_.c_str(), dev_type_, dev_id_, start_time_, ProfileStat::NowInMicrosec(), attributes_.get()); }