You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/11/18 21:35:42 UTC
[incubator-mxnet] branch master updated: mac build fix (#8692)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new bdd14a8 mac build fix (#8692)
bdd14a8 is described below
commit bdd14a8de2ccbc70133622d55bfd1a92ea234321
Author: Sheng Zha <sz...@users.noreply.github.com>
AuthorDate: Sat Nov 18 13:35:39 2017 -0800
mac build fix (#8692)
---
src/engine/threaded_engine_perdevice.cc | 6 +++---
src/io/image_io.cc | 2 +-
src/resource.cc | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/engine/threaded_engine_perdevice.cc b/src/engine/threaded_engine_perdevice.cc
index 413a7a5..60bdd8c 100644
--- a/src/engine/threaded_engine_perdevice.cc
+++ b/src/engine/threaded_engine_perdevice.cc
@@ -99,14 +99,14 @@ class ThreadedEnginePerDevice : public ThreadedEngine {
const Context& ctx = opr_block->ctx;
if ((opr_block->opr->prop == FnProperty::kAsync ||
opr_block->opr->prop == FnProperty::kDeleteVar) && pusher_thread) {
- if (ctx.dev_mask() == gpu::kDevMask) {
+ if (ctx.dev_mask() == Context::kGPU) {
#if MXNET_USE_CUDA
MSHADOW_CATCH_ERROR(mshadow::SetDevice<gpu>(ctx.dev_id));
#endif
}
this->ExecuteOprBlock(RunContext{ctx, nullptr}, opr_block);
} else {
- if (ctx.dev_mask() == cpu::kDevMask) {
+ if (ctx.dev_mask() == Context::kCPU) {
if (opr_block->opr->prop == FnProperty::kCPUPrioritized) {
cpu_priority_worker_->task_queue.Push(opr_block, opr_block->priority);
} else {
@@ -129,7 +129,7 @@ class ThreadedEnginePerDevice : public ThreadedEngine {
}
}
} else {
- CHECK_EQ(ctx.dev_mask(), gpu::kDevMask);
+ CHECK_EQ(ctx.dev_mask(), Context::kGPU);
// GPU execution.
FnProperty prop = opr_block->opr->prop;
bool is_copy = (prop == FnProperty::kCopyFromGPU ||
diff --git a/src/io/image_io.cc b/src/io/image_io.cc
index 9081a37..987220c 100644
--- a/src/io/image_io.cc
+++ b/src/io/image_io.cc
@@ -178,7 +178,7 @@ void Imdecode(const nnvm::NodeAttrs& attrs,
#if MXNET_USE_OPENCV
const auto& param = nnvm::get<ImdecodeParam>(attrs.parsed);
- CHECK_EQ(inputs[0].ctx().dev_mask(), cpu::kDevMask) << "Only supports cpu input";
+ CHECK_EQ(inputs[0].ctx().dev_mask(), Context::kCPU) << "Only supports cpu input";
CHECK_EQ(inputs[0].dtype(), mshadow::kUint8) << "Input needs to be uint8 buffer";
inputs[0].WaitToRead();
diff --git a/src/resource.cc b/src/resource.cc
index d591651..287f3cb 100644
--- a/src/resource.cc
+++ b/src/resource.cc
@@ -112,14 +112,14 @@ class ResourceManagerImpl : public ResourceManager {
// request resources
Resource Request(Context ctx, const ResourceRequest &req) override {
- if (ctx.dev_mask() == cpu::kDevMask) {
+ if (ctx.dev_mask() == Context::kCPU) {
switch (req.type) {
case ResourceRequest::kRandom: return cpu_rand_->resource;
case ResourceRequest::kTempSpace: return cpu_space_->GetNext();
default: LOG(FATAL) << "Unknown supported type " << req.type;
}
} else {
- CHECK_EQ(ctx.dev_mask(), gpu::kDevMask);
+ CHECK_EQ(ctx.dev_mask(), Context::kGPU);
#if MSHADOW_USE_CUDA
switch (req.type) {
case ResourceRequest::kRandom: {
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].