Package com.yahoo.config.model.api
Record Class OnnxModelOptions
java.lang.Object
java.lang.Record
com.yahoo.config.model.api.OnnxModelOptions
public record OnnxModelOptions(Optional<String> executionMode, Optional<Integer> interOpThreads, Optional<Integer> intraOpThreads, Optional<OnnxModelOptions.GpuDevice> gpuDevice)
extends Record
Onnx model options that are relevant when deciding if an Onnx model needs to be reloaded. If any of the
values in this class change, reload is needed.
- Author:
- hmusum
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionOnnxModelOptions
(String executionMode, int interOpThreads, int intraOpThreads, OnnxModelOptions.GpuDevice gpuDevice) OnnxModelOptions
(Optional<String> executionMode, Optional<Integer> interOpThreads, Optional<Integer> intraOpThreads, Optional<OnnxModelOptions.GpuDevice> gpuDevice) Creates an instance of aOnnxModelOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic OnnxModelOptions
empty()
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexecutionMode
record component.Returns the value of thegpuDevice
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinterOpThreads
record component.Returns the value of theintraOpThreads
record component.final String
toString()
Returns a string representation of this record class.withExecutionMode
(String executionMode) withGpuDevice
(OnnxModelOptions.GpuDevice gpuDevice) withInterOpThreads
(Integer interOpThreads) withIntraOpThreads
(Integer intraOpThreads)
-
Constructor Details
-
OnnxModelOptions
public OnnxModelOptions(String executionMode, int interOpThreads, int intraOpThreads, OnnxModelOptions.GpuDevice gpuDevice) -
OnnxModelOptions
public OnnxModelOptions(Optional<String> executionMode, Optional<Integer> interOpThreads, Optional<Integer> intraOpThreads, Optional<OnnxModelOptions.GpuDevice> gpuDevice) Creates an instance of aOnnxModelOptions
record class.- Parameters:
executionMode
- the value for theexecutionMode
record componentinterOpThreads
- the value for theinterOpThreads
record componentintraOpThreads
- the value for theintraOpThreads
record componentgpuDevice
- the value for thegpuDevice
record component
-
-
Method Details
-
empty
-
withExecutionMode
-
withInterOpThreads
-
withIntraOpThreads
-
withGpuDevice
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
executionMode
Returns the value of theexecutionMode
record component.- Returns:
- the value of the
executionMode
record component
-
interOpThreads
Returns the value of theinterOpThreads
record component.- Returns:
- the value of the
interOpThreads
record component
-
intraOpThreads
Returns the value of theintraOpThreads
record component.- Returns:
- the value of the
intraOpThreads
record component
-
gpuDevice
Returns the value of thegpuDevice
record component.- Returns:
- the value of the
gpuDevice
record component
-