|
| class | DataType |
| | Runtime primitive data type. More...
|
| |
| class | DeviceAPI |
| | TVM Runtime Device API, abstracts the device specific interface for memory management. More...
|
| |
| class | DiscoWorker |
| | A worker in Disco. It takes a channel to communication with the controler. The worker can be run in a separate thread or process as long as the channel supports bi-directional communication in-between. More...
|
| |
| struct | ThreadLocalDiscoWorker |
| | A threadlocal wrapper of DiscoWorker. More...
|
| |
| class | DRefObj |
| | An object that exists on all workers. More...
|
| |
| class | DRef |
| | Managed reference to DRefObj. More...
|
| |
| class | SessionObj |
| | A Disco interactive session. It allows users to interact with the Disco command queue with various ffi::Function calling convention. More...
|
| |
| class | Session |
| | Managed reference to SessionObj. More...
|
| |
| class | DiscoChannel |
| | A bi-directional channel for controler-worker communication. This channel is primarily used to transfer control messages but not data. More...
|
| |
| class | WorkerZeroData |
| | A special communication channel between controler and worker-0, assuming they are always collocated in the same process. More...
|
| |
| class | NVTXScopedRange |
| | A class to create a NVTX range. No-op if TVM is not built against NVTX. More...
|
| |
| class | TimerNode |
| | Base class for all implementations. More...
|
| |
| class | Timer |
| | Timer for a specific device. More...
|
| |
| class | Tensor |
| | Managed Tensor. The array is backed by reference counted blocks. More...
|
| |
|
| enum | TVMDeviceExtType { TVMDeviceExtType_End = 36
} |
| | Extension device types in TVM. More...
|
| |
| enum | DeviceAttrKind : int {
kExist = 0
, kMaxThreadsPerBlock = 1
, kWarpSize = 2
, kMaxSharedMemoryPerBlock = 3
,
kComputeVersion = 4
, kDeviceName = 5
, kMaxClockRate = 6
, kMultiProcessorCount = 7
,
kMaxThreadDimensions = 8
, kMaxRegistersPerBlock = 9
, kGcnArch = 10
, kApiVersion = 11
,
kDriverVersion = 12
, kL2CacheSizeBytes = 13
, kTotalGlobalMemory = 14
, kAvailableGlobalMemory = 15
,
kImagePitchAlignment = 16
} |
| | the query type into GetAttr More...
|
| |
| enum class | ReduceKind : int32_t {
kSum = 0
, kProd = 1
, kMin = 2
, kMax = 3
,
kAvg = 4
} |
| | Possible kinds of reduction operations. More...
|
| |
| enum class | DiscoAction : int32_t {
kShutDown = 0
, kKillReg = 1
, kGetGlobalFunc = 2
, kCallPacked = 3
,
kSyncWorker = 4
, kCopyFromWorker0 = 5
, kCopyToWorker0 = 6
, kDebugGetFromRemote = 7
,
kDebugSetRegister = 8
} |
| | All possible kinds of Disco commands. More...
|
| |
| enum | TypeIndex : int32_t {
kRuntimeModule = TVMFFITypeIndex::kTVMFFIModule
, kRuntimeTensor = TVMFFITypeIndex::kTVMFFITensor
, kRuntimeShape = TVMFFITypeIndex::kTVMFFIShape
, kCustomStaticIndex = TVMFFITypeIndex::kTVMFFIDynObjectBegin - 16
,
kRuntimePackedFunc = kCustomStaticIndex + 1
, kRuntimeDiscoDRef = kCustomStaticIndex + 2
, kRuntimeRPCObjectRef = kCustomStaticIndex + 3
, kRuntimeString
,
kRuntimeMap
, kRuntimeArray
, kStaticIndexEnd
} |
| | Namespace for the list of type index. More...
|
| |
|
| int | GetVectorBytes (DataType dtype) |
| | Get the number of bytes needed in a vector. More...
|
| |
| bool | TypeMatch (DLDataType t, int code, int bits, int lanes=1) |
| | Check whether type matches the given spec. More...
|
| |
| bool | TypeEqual (DLDataType lhs, DLDataType rhs) |
| | Check whether two types are equal . More...
|
| |
| std::ostream & | operator<< (std::ostream &os, const DataType &dtype) |
| |
| const char * | DLDeviceType2Str (int type) |
| | The name of DLDeviceType. More...
|
| |
| bool | IsRPCSessionDevice (Device dev) |
| | Return true if a Device is owned by an RPC session. More...
|
| |
| int | GetRPCSessionIndex (Device dev) |
| | Return the RPCSessTable index of the RPC Session that owns this device. More...
|
| |
| Device | 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 & | operator<< (std::ostream &os, DLDevice dev) |
| |
| Device | 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...
|
| |
| std::string | ReduceKind2String (ReduceKind kind) |
| | Converts ReduceKind to string. More...
|
| |
| ffi::Module | LoadVMModule (std::string path, ffi::Optional< Device > device) |
| | Load a runtime Module, then create and initialize a RelaxVM. More...
|
| |
| Tensor | DiscoEmptyTensor (ffi::Shape shape, DataType dtype, ffi::Optional< Device > device) |
| | Create an uninitialized empty Tensor. More...
|
| |
| void | AllReduce (Tensor send, ReduceKind reduce_kind, bool in_group, Tensor recv) |
| | Perform an allreduce operation using the underlying communication library. More...
|
| |
| void | AllGather (Tensor send, bool in_group, Tensor recv) |
| | Perform an allgather operation using the underlying communication library. More...
|
| |
| void | BroadcastFromWorker0 (Tensor send, bool in_group, Tensor recv) |
| | Perform a broadcast operation from worker-0. More...
|
| |
| void | ScatterFromWorker0 (ffi::Optional< Tensor > send, bool in_group, Tensor recv) |
| | Perform a scatter operation from worker-0, chunking the given buffer into equal parts. More...
|
| |
| void | GatherToWorker0 (Tensor send, bool in_group, ffi::Optional< Tensor > recv) |
| | Perform a gather operation to worker-0. More...
|
| |
| void | RecvFromWorker0 (Tensor buffer) |
| | Receive a buffer from worker-0. No-op if the current worker is worker-0. More...
|
| |
| void | SendToNextGroup (Tensor buffer) |
| | Send a buffer to the corresponding worker in the next group. An error is thrown if the worker is already in the last group. More...
|
| |
| void | RecvFromPrevGroup (Tensor buffer) |
| | Receive a buffer from the corresponding worker in the previous group. An error is thrown if the worker is already in the first group. More...
|
| |
| void | SendToWorker (Tensor buffer, int receiver_id) |
| | Send a buffer to the target receiver worker (globally across all groups). More...
|
| |
| void | RecvFromWorker (Tensor buffer, int sender_id) |
| | Receive a buffer from the target sender worker (globally across all groups). More...
|
| |
| int | WorkerId () |
| | Get the local worker id. More...
|
| |
| void | SyncWorker () |
| | Called by the worker thread. Waiting until the worker completes all its tasks. As a specific example, on a CUDA worker, it blocks until all kernels are launched and cudaStreamSynchronize is complete. More...
|
| |
| std::string | DiscoAction2String (DiscoAction action) |
| | Converts the enum class DiscoAction to string. More...
|
| |
| bool | RuntimeEnabled (const ffi::String &target) |
| | Check if runtime module is enabled for target. More...
|
| |
| Timer | DefaultTimer (Device dev) |
| | Default timer if one does not exist for the device. More...
|
| |
| bool | SaveDLTensor (dmlc::Stream *strm, const DLTensor *tensor) |
| | Save a DLTensor to stream. More...
|
| |
| Device | GetPreferredHostDevice (Device device) |
| | Get the preferred host device from the input device. More...
|
| |
| template<typename T > |
| void | parallel_for_with_threading_backend (T flambda, int64_t begin, int64_t end) |
| |
Extension device types in TVM.
Additional enumerators to supplement those provided by DLPack's DLDeviceType enumeration.
MAINTAINERS NOTE #1: We need to ensure that the two devices are identified by the same integer. Currently this requires manual verification. Discussed here: https://github.com/dmlc/dlpack/issues/111 As of DLPack v0.7, the highest-valued enumerator in DLDeviceType is kDLHexagon = 16.
MAINTAINERS NOTE #2: As of DLPack v0.7, the definition for DLDeviceType specifies an underlying storage type of int32_t. That guarantees a variable of type DLDeviceType is capable of holding any integers provided by either of these enumerations.
However, the int32_t specification only applies when the header file is compiled as C++, and this header file is also meant to work as C code. So the unspecified storage type could be a latent bug when compiled as C.
| Enumerator |
|---|
| TVMDeviceExtType_End | |