Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
caffe2::dlpack Namespace Reference

Functions

template<typename C2Context >
DLContext getDLContext ()
 
template<>
DLContext getDLContext< CPUContext > ()
 
template<>
DLContext getDLContext< CUDAContext > ()
 
DLDataType getDLDataType (const TypeMeta &meta)
 
template<typename C2Context >
tc::dlutils::DLTensorUPtr makeConstDLTensor (const caffe2::Tensor< C2Context > &tensor, const vector< TIndex > &shapeOverride={})
 
template<typename C2Context >
tc::dlutils::DLTensorUPtr makeDLTensor (caffe2::Tensor< C2Context > *tensor)
 

Function Documentation

template<typename C2Context >
DLContext caffe2::dlpack::getDLContext ( )
template<>
DLContext caffe2::dlpack::getDLContext< CPUContext > ( )
inline
template<>
DLContext caffe2::dlpack::getDLContext< CUDAContext > ( )
inline
DLDataType caffe2::dlpack::getDLDataType ( const TypeMeta &  meta)
inline
template<typename C2Context >
tc::dlutils::DLTensorUPtr caffe2::dlpack::makeConstDLTensor ( const caffe2::Tensor< C2Context > &  tensor,
const vector< TIndex > &  shapeOverride = {} 
)
template<typename C2Context >
tc::dlutils::DLTensorUPtr caffe2::dlpack::makeDLTensor ( caffe2::Tensor< C2Context > *  tensor)