tvm
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
device_api.h File Reference

Abstract device memory management API. More...

#include <tvm/ffi/any.h>
#include <tvm/ffi/optional.h>
#include <tvm/runtime/base.h>
#include <tvm/runtime/logging.h>
#include <string>
Include dependency graph for device_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::runtime::DeviceAPI
 TVM Runtime Device API, abstracts the device specific interface for memory management. More...
 

Namespaces

 tvm
 An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
 
 tvm::runtime
 

Typedefs

typedef void * TVMStreamHandle
 The stream that is specific to device can be NULL, which indicates the default one. More...
 
using tvm::Device = DLDevice
 

Enumerations

enum  tvm::runtime::TVMDeviceExtType { tvm::runtime::TVMDeviceExtType_End = 36 }
 Extension device types in TVM. More...
 
enum  tvm::runtime::DeviceAttrKind : int {
  tvm::runtime::kExist = 0 , tvm::runtime::kMaxThreadsPerBlock = 1 , tvm::runtime::kWarpSize = 2 , tvm::runtime::kMaxSharedMemoryPerBlock = 3 ,
  tvm::runtime::kComputeVersion = 4 , tvm::runtime::kDeviceName = 5 , tvm::runtime::kMaxClockRate = 6 , tvm::runtime::kMultiProcessorCount = 7 ,
  tvm::runtime::kMaxThreadDimensions = 8 , tvm::runtime::kMaxRegistersPerBlock = 9 , tvm::runtime::kGcnArch = 10 , tvm::runtime::kApiVersion = 11 ,
  tvm::runtime::kDriverVersion = 12 , tvm::runtime::kL2CacheSizeBytes = 13 , tvm::runtime::kTotalGlobalMemory = 14 , tvm::runtime::kAvailableGlobalMemory = 15 ,
  tvm::runtime::kImagePitchAlignment = 16
}
 the query type into GetAttr More...
 

Functions

const char * tvm::runtime::DLDeviceType2Str (int type)
 The name of DLDeviceType. More...
 
bool tvm::runtime::IsRPCSessionDevice (Device dev)
 Return true if a Device is owned by an RPC session. More...
 
int tvm::runtime::GetRPCSessionIndex (Device dev)
 Return the RPCSessTable index of the RPC Session that owns this device. More...
 
Device tvm::runtime::RemoveRPCSessionMask (Device dev)
 Remove the RPC session mask from a Device. RPC clients typically do this when encoding a Device for transmission to an RPC remote. On the wire, RPCdevice are expected to be valid on the server without interpretation. More...
 
std::ostream & tvm::runtime::operator<< (std::ostream &os, DLDevice dev)
 
Device tvm::runtime::AddRPCSessionMask (Device dev, int session_table_index)
 Add a RPC session mask to a Device. RPC clients typically do this when decoding a Device received from a RPC remote. More...
 

Variables

constexpr int tvm::runtime::kAllocAlignment = 64
 Number of bytes each allocation must align to. More...
 
constexpr int tvm::runtime::kTempAllocaAlignment = 64
 Number of bytes each allocation must align to in temporary allocation. More...
 
constexpr int tvm::runtime::kMaxStackAlloca = 1024
 Maximum size that can be allocated on stack. More...
 
constexpr int tvm::runtime::kDefaultWorkspaceAlignment = 1
 Number of bytes each allocation must align to by default in the workspace buffer to service intermediate tensors. More...
 
constexpr int tvm::runtime::kRPCSessMask = 128
 The device type bigger than this is RPC device. More...
 

Detailed Description

Abstract device memory management API.

Typedef Documentation

◆ TVMStreamHandle

typedef void* TVMStreamHandle

The stream that is specific to device can be NULL, which indicates the default one.