Class: Kreuzberg::Config::Acceleration
- Inherits:
-
Object
- Object
- Kreuzberg::Config::Acceleration
- Defined in:
- lib/kreuzberg/config.rb
Overview
Hardware acceleration configuration for ONNX Runtime
Controls which execution provider (CPU, CoreML, CUDA, TensorRT) is used for inference in layout detection and embedding generation.
Instance Attribute Summary collapse
-
#device_id ⇒ Object
readonly
Returns the value of attribute device_id.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(provider: 'auto', device_id: 0) ⇒ Acceleration
constructor
A new instance of Acceleration.
- #to_h ⇒ Object
Constructor Details
#initialize(provider: 'auto', device_id: 0) ⇒ Acceleration
Returns a new instance of Acceleration.
827 828 829 830 |
# File 'lib/kreuzberg/config.rb', line 827 def initialize(provider: 'auto', device_id: 0) @provider = provider.to_s @device_id = device_id.to_i end |
Instance Attribute Details
#device_id ⇒ Object (readonly)
Returns the value of attribute device_id.
825 826 827 |
# File 'lib/kreuzberg/config.rb', line 825 def device_id @device_id end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
825 826 827 |
# File 'lib/kreuzberg/config.rb', line 825 def provider @provider end |
Instance Method Details
#to_h ⇒ Object
832 833 834 835 836 837 |
# File 'lib/kreuzberg/config.rb', line 832 def to_h { provider: @provider, device_id: @device_id } end |