eric-haibin-lin commented on a change in pull request #10649: [WIP] add FResourceRequestEx interface for FComputeEx URL: https://github.com/apache/incubator-mxnet/pull/10649#discussion_r183444619
########## File path: src/executor/attach_op_resource_pass.cc ########## @@ -47,8 +50,13 @@ Graph AttachOpResources(Graph g) { auto& requested = op_execs[nid]->op_ctx.requested; requested.clear(); const auto op = inode.source->op(); - if (fresource.count(op) != 0) { - auto reqs = fresource[op](inode.source->attrs); + const bool rsc_req = (fresource.count(op) != 0); + const bool rsc_ex_req = (fresource_ex.count(op) != 0); + if (rsc_req || rsc_ex_req) { + auto reqs = rsc_ex_req ? fresource_ex[op](inode.source->attrs, + dev_masks[nid], + vdispatch[nid]) + : fresource[op](inode.source->attrs); Review comment: add CHECK(!(rsc_req && rsc_ex_req)) so that only one of them is registered ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services