tvm
Namespaces | Enumerations | Functions
builtin.h File Reference
#include <tvm/runtime/data_type.h>
#include <tvm/runtime/module.h>
#include <tvm/runtime/ndarray.h>
#include <string>
Include dependency graph for builtin.h:

Go to the source code of this file.

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 
 tvm::runtime
 

Enumerations

enum class  tvm::runtime::ReduceKind : int32_t {
  tvm::runtime::kSum = 0 , tvm::runtime::kProd = 1 , tvm::runtime::kMin = 2 , tvm::runtime::kMax = 3 ,
  tvm::runtime::kAvg = 4
}
 Possible kinds of reduction operations. More...
 

Functions

std::string tvm::runtime::ReduceKind2String (ReduceKind kind)
 Converts ReduceKind to string. More...
 
Module tvm::runtime::LoadVMModule (std::string path, Device device)
 Load a runtime Module, then create and initialize a RelaxVM. More...
 
NDArray tvm::runtime::DiscoEmptyNDArray (ShapeTuple shape, DataType dtype, Device device)
 Create an uninitialized empty NDArray. More...
 
void tvm::runtime::AllReduce (NDArray send, ReduceKind reduce_kind, bool in_group, NDArray recv)
 Perform an allreduce operation using the underlying communication library. More...
 
void tvm::runtime::AllGather (NDArray send, bool in_group, NDArray recv)
 Perform an allgather operation using the underlying communication library. More...
 
void tvm::runtime::BroadcastFromWorker0 (NDArray send, bool in_group, NDArray recv)
 Perform a broadcast operation from worker-0. More...
 
void tvm::runtime::ScatterFromWorker0 (Optional< NDArray > send, bool in_group, NDArray recv)
 Perform a scatter operation from worker-0, chunking the given buffer into equal parts. More...
 
void tvm::runtime::GatherToWorker0 (NDArray send, bool in_group, Optional< NDArray > recv)
 Perform a gather operation to worker-0. More...
 
void tvm::runtime::RecvFromWorker0 (NDArray buffer)
 Receive a buffer from worker-0. No-op if the current worker is worker-0. More...
 
void tvm::runtime::SendToNextGroup (NDArray 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 tvm::runtime::RecvFromPrevGroup (NDArray 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 tvm::runtime::SendToWorker (NDArray buffer, int receiver_id)
 Send a buffer to the target receiver worker (globally across all groups). More...
 
void tvm::runtime::RecvFromWorker (NDArray buffer, int sender_id)
 Receive a buffer from the target sender worker (globally across all groups). More...
 
int tvm::runtime::WorkerId ()
 Get the local worker id. More...
 
void tvm::runtime::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...