Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix warnings in CLang. #15270

Merged
merged 1 commit into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/engine/naive_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,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) {
Expand Down Expand Up @@ -176,8 +176,8 @@ class NaiveEngine final : public Engine {
if (profiler->AggregateEnabled()) {
attrs.reset(new profiler::ProfileOperator::Attributes());
}
opr->opr_profile.reset(new profiler::ProfileOperator(display_name, attrs.release()));
opr->opr_profile->start(exec_ctx.dev_type, exec_ctx.dev_id);
opr->opr_profile.reset(new profiler::ProfileOperator(opr->opr_name, attrs.release()));
opr->opr_profile->startForDevice(exec_ctx.dev_type, exec_ctx.dev_id);
}
if (exec_ctx.dev_mask() == gpu::kDevMask) {
#if MXNET_USE_CUDA
Expand Down
2 changes: 1 addition & 1 deletion src/engine/threaded_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,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);
Expand Down
4 changes: 2 additions & 2 deletions src/kvstore/kvstore_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class KVStoreLocal : public KVStore {
std::vector<std::vector<NDArray>> *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
Expand Down Expand Up @@ -323,7 +323,7 @@ class KVStoreLocal : public KVStore {
std::vector<std::vector<RSPVal>> *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();
Expand Down
4 changes: 2 additions & 2 deletions src/profiler/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,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;
if (profiling_) {
Expand Down Expand Up @@ -1247,7 +1247,7 @@ struct ProfileOperator : public ProfileEvent {
*/
void SendStat() override {
Profiler::Get()->AddNewProfileStat<OprExecStat>(
[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());
}
Expand Down