diff --git a/src/core/include/megbrain/tensor.h b/src/core/include/megbrain/tensor.h index aae45495dcd1895f5445088ee2b6d14c74c40804..3a6133829d0cb08d1058a4d140fd731ce89267a2 100644 --- a/src/core/include/megbrain/tensor.h +++ b/src/core/include/megbrain/tensor.h @@ -548,6 +548,15 @@ class TensorND { ret.reset(storage().proxy_to_default_cpu(), layout()); return ret; } + + template::value>> + HostTensorND proxy_to_comp_node(CompNode cn) const { + HostTensorStorage host_storage; + host_storage.reset(cn, m_storage.size(), m_storage.raw_storage()); + HostTensorND ret; + ret.reset(host_storage, m_layout); + return ret; + } }; /*!