1 #ifndef HeterogeneousCore_SonicTriton_TritonMemResource 2 #define HeterogeneousCore_SonicTriton_TritonMemResource 7 #include "grpc_client.h" 10 template <
typename IO>
14 template <
typename IO>
38 template <
typename IO>
45 void set()
override {}
48 template <
typename IO>
53 void close()
override;
76 #ifdef TRITON_ENABLE_GPU 77 #include "cuda_runtime_api.h" 79 template <
typename IO>
83 ~TritonGpuShmResource()
override;
84 void close()
override;
90 std::shared_ptr<cudaIpcMemHandle_t> handle_;
93 using TritonInputGpuShmResource = TritonGpuShmResource<triton::client::InferInput>;
94 using TritonOutputGpuShmResource = TritonGpuShmResource<triton::client::InferRequestedOutput>;
98 void TritonInputGpuShmResource::copyInput(
const void*
values,
size_t offset,
unsigned entry);
100 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)
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
~TritonCpuShmResource() override
~TritonHeapResource() override
TritonHeapResource(TritonData< IO > *data, const std::string &name, size_t size)
char data[epos_bytes_allocation]
void copyOutput() override
virtual ~TritonMemResource()