1 #ifndef HeterogeneousCore_SonicTriton_TritonMemResource 2 #define HeterogeneousCore_SonicTriton_TritonMemResource 7 #include "grpc_client.h" 10 template <
typename IO>
14 template <
typename IO>
37 template <
typename IO>
44 void set()
override {}
47 template <
typename IO>
52 void close()
override;
75 #ifdef TRITON_ENABLE_GPU 76 #include "cuda_runtime_api.h" 78 template <
typename IO>
82 ~TritonGpuShmResource()
override;
83 void close()
override;
89 std::shared_ptr<cudaIpcMemHandle_t> handle_;
92 using TritonInputGpuShmResource = TritonGpuShmResource<triton::client::InferInput>;
93 using TritonOutputGpuShmResource = TritonGpuShmResource<triton::client::InferRequestedOutput>;
97 void TritonInputGpuShmResource::copyInput(
const void*
values,
size_t offset,
unsigned entry);
99 void TritonOutputGpuShmResource::copyOutput();
void copyInput(const void *values, size_t offset, unsigned entry) override
virtual void copyOutput()
virtual void copyInput(const void *values, size_t offset, unsigned entry)
TritonCpuShmResource(TritonData< IO > *data, const std::string &name, size_t size)
~TritonCpuShmResource() override
TritonMemResource(TritonData< IO > *data, const std::string &name, size_t size)
void copyOutput() override
void copyInput(const void *values, size_t offset, unsigned entry) override
~TritonHeapResource() override
TritonHeapResource(TritonData< IO > *data, const std::string &name, size_t size)
char data[epos_bytes_allocation]
void copyOutput() override
virtual ~TritonMemResource()