samskalicky commented on a change in pull request #17270: [WIP] Dynamic custom
operator GPU support
URL: https://github.com/apache/incubator-mxnet/pull/17270#discussion_r367703387
##########
File path: src/c_api/c_api.cc
##########
@@ -685,28 +757,26 @@ int MXLoadLib(const char *path) {
using namespace mxnet::op;
regOp.set_num_inputs(DefaultSubgraphOpNumInputs);
regOp.set_num_outputs(DefaultSubgraphOpNumOutputs);
- regOp.set_attr<nnvm::FInferType>("FInferType",
- DefaultSubgraphOpType, plevel);
- regOp.set_attr<mxnet::FInferShape>("FInferShape",
- DefaultSubgraphOpShape, plevel);
- regOp.set_attr<FInferStorageType>("FInferStorageType",
- DefaultSubgraphOpStorageType, plevel);
- regOp.set_attr<FResourceRequest>("FResourceRequest",
- DefaultSubgraphOpResourceRequest,
plevel);
- regOp.set_attr<nnvm::FMutateInputs>("FMutateInputs",
- DefaultSubgraphOpMutableInputs,
plevel);
+ regOp.set_attr<nnvm::FInferType>("FInferType", DefaultSubgraphOpType,
plevel);
+ regOp.set_attr<mxnet::FInferShape>("FInferShape",
DefaultSubgraphOpShape, plevel);
+ regOp.set_attr<FInferStorageType>("FInferStorageType",
DefaultSubgraphOpStorageType, plevel);
+ regOp.set_attr<FResourceRequest>("FResourceRequest",
DefaultSubgraphOpResourceRequest, plevel);
+ regOp.set_attr<nnvm::FMutateInputs>("FMutateInputs",
DefaultSubgraphOpMutableInputs, plevel);
}
// optionally add stateful forward
if (create_opstate_fp != nullptr) {
regOp.set_attr<FCreateOpState>("FCreateOpState", create_opstate, plevel);
regOp.set_attr<FStatefulComputeEx>("FStatefulComputeEx<cpu>",
fstateful_forward, plevel);
+ regOp.set_attr<FStatefulComputeEx>("FStatefulComputeEx<gpu>",
Review comment:
shouldnt we only register this conditionally?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services