This is an automated email from the ASF dual-hosted git repository.

haibin 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 8102606  Fix inconsistent handling for FResourceRequestEx for 
imperative and symbolic executor (#14007)
8102606 is described below

commit 8102606bd3118752205be424044df6c7f9a27efa
Author: Haibin Lin <[email protected]>
AuthorDate: Thu Jan 31 09:43:57 2019 -0800

    Fix inconsistent handling for FResourceRequestEx for imperative and 
symbolic executor (#14007)
    
    * Update op_attr_types.h
    
    * Update attach_op_resource_pass.cc
---
 include/mxnet/op_attr_types.h           | 2 ++
 src/executor/attach_op_resource_pass.cc | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/mxnet/op_attr_types.h b/include/mxnet/op_attr_types.h
index 41be554..aba59ce 100644
--- a/include/mxnet/op_attr_types.h
+++ b/include/mxnet/op_attr_types.h
@@ -238,6 +238,8 @@ using FResourceRequest = std::function<
 /*!
  * \brief The resource request from the operator.
  *        An operator could register ResourceRequestEx, or ResourceRequest, or 
neither.
+ *        If an operator registers both ResourceRequestEx and ResourceRequest,
+ *        ResourceRequest is ignored.
  *
  * \note Register under "FResourceRequestEx"
  */
diff --git a/src/executor/attach_op_resource_pass.cc 
b/src/executor/attach_op_resource_pass.cc
index 56122cd..c4a6dc4 100644
--- a/src/executor/attach_op_resource_pass.cc
+++ b/src/executor/attach_op_resource_pass.cc
@@ -55,8 +55,6 @@ void AttachOpResources(
     const auto op = inode.source->op();
     const bool rsc_req = (fresource.count(op) != 0);
     const bool rsc_ex_req = (fresource_ex.count(op) != 0);
-    CHECK(!(rsc_req && rsc_ex_req))
-      << "An operator could not register both ResourceRequestEx and 
ResourceRequest";
     if (rsc_req || rsc_ex_req) {
       auto reqs = rsc_ex_req ? fresource_ex[op](inode.source->attrs,
                                                 dev_masks[nid],

Reply via email to