Tensor Comprehensions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dlpack_c2.h File Reference
#include <functional>
#include <sstream>
#include <string>
#include <vector>
#include "tc/c2/context.h"
#include "tc/core/utils/dlpack.h"
#include "caffe2/core/common.h"
Include dependency graph for dlpack_c2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 caffe2
 
 caffe2::dlpack
 

Functions

template<typename C2Context >
DLContext caffe2::dlpack::getDLContext ()
 
template<>
DLContext caffe2::dlpack::getDLContext< CPUContext > ()
 
template<>
DLContext caffe2::dlpack::getDLContext< CUDAContext > ()
 
DLDataType caffe2::dlpack::getDLDataType (const TypeMeta &meta)
 
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)