HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::LoraAdapter Struct Reference

LoraAdapter holds a set of Lora Parameters loaded from a single file. More...

#include <onnxruntime_cxx_api.h>

+ Inheritance diagram for Ort::LoraAdapter:

Public Types

using Base = detail::Base< OrtLoraAdapter >
 
- Public Types inherited from Ort::detail::Base< OrtLoraAdapter >
using contained_type = OrtLoraAdapter
 

Public Member Functions

 LoraAdapter (std::nullptr_t)
 
- Public Member Functions inherited from Ort::detail::Base< OrtLoraAdapter >
constexpr Base ()=default
 
constexpr Base (contained_type *p) noexcept
 
 Base (const Base &)=delete
 
 Base (Base &&v) noexcept
 
 ~Base ()
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&v) noexcept
 
constexpr operator contained_type * () const noexcept
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed. More...
 

Static Public Member Functions

static LoraAdapter CreateLoraAdapter (const std::basic_string< ORTCHAR_T > &adapter_path, OrtAllocator *allocator)
 Wraps OrtApi::CreateLoraAdapter. More...
 
static LoraAdapter CreateLoraAdapterFromArray (const void *bytes, size_t num_bytes, OrtAllocator *allocator)
 Wraps OrtApi::CreateLoraAdapterFromArray. More...
 

Additional Inherited Members

- Protected Attributes inherited from Ort::detail::Base< OrtLoraAdapter >
contained_typep_
 

Detailed Description

LoraAdapter holds a set of Lora Parameters loaded from a single file.

Definition at line 741 of file onnxruntime_cxx_api.h.

Member Typedef Documentation

using Ort::LoraAdapter::Base = detail::Base<OrtLoraAdapter>

Definition at line 742 of file onnxruntime_cxx_api.h.

Constructor & Destructor Documentation

Ort::LoraAdapter::LoraAdapter ( std::nullptr_t  )
inlineexplicit

Create an empty LoraAdapter object, must be assigned a valid one to be used

Definition at line 745 of file onnxruntime_cxx_api.h.

Member Function Documentation

LoraAdapter Ort::LoraAdapter::CreateLoraAdapter ( const std::basic_string< ORTCHAR_T > &  adapter_path,
OrtAllocator *  allocator 
)
inlinestatic

Wraps OrtApi::CreateLoraAdapter.

The function attempts to load the adapter from the specified file

Parameters
adapter_pathThe path to the Lora adapter
allocatoroptional pointer to a device allocator. If nullptr, the data stays on CPU. It would still be copied to device if required by the model at inference time.

Definition at line 560 of file onnxruntime_cxx_inline.h.

LoraAdapter Ort::LoraAdapter::CreateLoraAdapterFromArray ( const void bytes,
size_t  num_bytes,
OrtAllocator *  allocator 
)
inlinestatic

Wraps OrtApi::CreateLoraAdapterFromArray.

The function attempts to load the adapter from the specified byte array.

Parameters
bytesThe byte array containing file LoraAdapter format
num_bytesThe number of bytes in the byte array
allocatoroptional pointer to a device allocator. If nullptr, the data stays on CPU. It would still be copied to device if required by the model at inference time.

Definition at line 567 of file onnxruntime_cxx_inline.h.


The documentation for this struct was generated from the following files: