You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/10/23 16:09:04 UTC
[GitHub] [incubator-mxnet] vasusingla619 opened a new issue #16596: How to
initialize a CPU tensor in custom cu file?
vasusingla619 opened a new issue #16596: How to initialize a CPU tensor in custom cu file?
URL: https://github.com/apache/incubator-mxnet/issues/16596
I am trying to initialize a CPU tensor for a new operator in .cu file.
Stream<cpu> *cpu_stream = ctx.get_stream<cpu>();
Tensor<cpu, 1> workspace = ctx.requested[proposal::kTempSpace].get_space<cpu>(Shape1(workspace_size * 5), cpu_stream);
but this fails. I believe this issue may be that I am using reference ctx provided in the operator, which may be GPU, and hence can't init a tensor on CPU.
Is there a workaround to initialize tensors on CPU while working on a .cu file?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services