![]() |
ONNX Runtime
|
LoraAdapter holds a set of Lora Parameters loaded from a single file. More...
#include <onnxruntime_cxx_api.h>
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 () | |
| Base & | operator= (const Base &)=delete |
| Base & | operator= (Base &&v) noexcept |
| constexpr | operator contained_type * () const noexcept |
| constexpr contained_type & | operator* () const noexcept |
| contained_type * | release () |
| Relinquishes ownership of the contained C object pointer The underlying object is not destroyed. | |
Static Public Member Functions | |
| static LoraAdapter | CreateLoraAdapter (const std::basic_string< char > &adapter_path, OrtAllocator *allocator) |
| Wraps OrtApi::CreateLoraAdapter. | |
| static LoraAdapter | CreateLoraAdapterFromArray (const void *bytes, size_t num_bytes, OrtAllocator *allocator) |
| Wraps OrtApi::CreateLoraAdapterFromArray. | |
Additional Inherited Members | |
Protected Attributes inherited from Ort::detail::Base< OrtLoraAdapter > | |
| contained_type * | p_ |
LoraAdapter holds a set of Lora Parameters loaded from a single file.
|
inlineexplicit |
Create an empty LoraAdapter object, must be assigned a valid one to be used
|
static |
Wraps OrtApi::CreateLoraAdapter.
The function attempts to load the adapter from the specified file
| adapter_path | The path to the Lora adapter |
| allocator | optional 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. |
|
static |
Wraps OrtApi::CreateLoraAdapterFromArray.
The function attempts to load the adapter from the specified byte array.
| bytes | The byte array containing file LoraAdapter format |
| num_bytes | The number of bytes in the byte array |
| allocator | optional 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. |