Go to the documentation of this file. 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();
TritonCpuShmResource(TritonData< IO > *data, const std::string &name, size_t size)
const uint8_t * copyOutput() override
virtual void copyInput(const void *values, size_t offset)
TritonMemResource(TritonData< IO > *data, const std::string &name, size_t size)
~TritonHeapResource() override
const uint8_t * copyOutput() override
~TritonCpuShmResource() override
virtual const uint8_t * copyOutput()
TritonHeapResource(TritonData< IO > *data, const std::string &name, size_t size)
char data[epos_bytes_allocation]
void copyInput(const void *values, size_t offset) override
virtual ~TritonMemResource()
void copyInput(const void *values, size_t offset) override