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;
72 #ifdef TRITON_ENABLE_GPU 73 #include "cuda_runtime_api.h" 75 template <
typename IO>
79 ~TritonGpuShmResource()
override;
80 void close()
override;
82 const uint8_t*
copyOutput()
override {
return nullptr; }
86 std::shared_ptr<cudaIpcMemHandle_t> handle_;
89 using TritonInputGpuShmResource = TritonGpuShmResource<triton::client::InferInput>;
90 using TritonOutputGpuShmResource = TritonGpuShmResource<triton::client::InferRequestedOutput>;
94 void TritonInputGpuShmResource::copyInput(
const void*
values,
size_t offset);
96 const uint8_t* TritonOutputGpuShmResource::copyOutput();
void copyInput(const void *values, size_t offset) override
virtual void copyInput(const void *values, size_t offset)
TritonCpuShmResource(TritonData< IO > *data, const std::string &name, size_t size)
~TritonCpuShmResource() override
void copyInput(const void *values, size_t offset) override
TritonMemResource(TritonData< IO > *data, const std::string &name, size_t size)
const uint8_t * copyOutput() override
~TritonHeapResource() override
TritonHeapResource(TritonData< IO > *data, const std::string &name, size_t size)
virtual const uint8_t * copyOutput()
char data[epos_bytes_allocation]
const uint8_t * copyOutput() override
virtual ~TritonMemResource()