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

Commit

Permalink
Fix inconsistent handling for FResourceRequestEx for imperative and s…
Browse files Browse the repository at this point in the history
…ymbolic executor (#14007)

* Update op_attr_types.h

* Update attach_op_resource_pass.cc
  • Loading branch information
eric-haibin-lin committed Jan 31, 2019
1 parent 47277b0 commit 8102606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/mxnet/op_attr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
*/
Expand Down
2 changes: 0 additions & 2 deletions src/executor/attach_op_resource_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 8102606

Please sign in to comment.