Program Listing for File multi_inference_nlp.hpp

Return to documentation for file (morpheus/_lib/include/morpheus/messages/multi_inference_nlp.hpp)

Copy
Copied!
            

#pragma once #include "morpheus/messages/memory/inference_memory.hpp"// for InferenceMemory #include "morpheus/messages/meta.hpp"// for MessageMeta #include "morpheus/messages/multi_inference.hpp" #include "morpheus/objects/tensor_object.hpp" #include <cudf/types.hpp> #include <pybind11/pytypes.h>// for object #include <cstddef> #include <memory> namespace morpheus { /****** Component public implementations *******************/ /****** MultiInferenceNLPMessage****************************************/ #pragma GCC visibility push(default) class MultiInferenceNLPMessage : public MultiInferenceMessage { public: MultiInferenceNLPMessage(std::shared_ptr<morpheus::MessageMeta> meta, std::size_t mess_offset, std::size_t mess_count, std::shared_ptr<morpheus::InferenceMemory> memory, std::size_t offset, std::size_t count); const TensorObject get_input_ids() const; void set_input_ids(const TensorObject& input_ids); const TensorObject get_input_mask() const; void set_input_mask(const TensorObject& input_mask); const TensorObject get_seq_ids() const; void set_seq_ids(const TensorObject& seq_ids); }; /****** MultiInferenceNLPMessageInterfaceProxy *************************/ struct MultiInferenceNLPMessageInterfaceProxy { static std::shared_ptr<MultiInferenceNLPMessage> init(std::shared_ptr<MessageMeta> meta, cudf::size_type mess_offset, cudf::size_type mess_count, std::shared_ptr<InferenceMemory> memory, cudf::size_type offset, cudf::size_type count); static std::shared_ptr<morpheus::InferenceMemory> memory(MultiInferenceNLPMessage& self); static std::size_t offset(MultiInferenceNLPMessage& self); static std::size_t count(MultiInferenceNLPMessage& self); static pybind11::object input_ids(MultiInferenceNLPMessage& self); static pybind11::object input_mask(MultiInferenceNLPMessage& self); static pybind11::object seq_ids(MultiInferenceNLPMessage& self); }; #pragma GCC visibility pop } // namespace morpheus

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.