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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOnnxModelOptions(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 aOnnxModelOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic OnnxModelOptionsempty()final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionModerecord component.Returns the value of thegpuDevicerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinterOpThreadsrecord component.Returns the value of theintraOpThreadsrecord component.final StringtoString()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 aOnnxModelOptionsrecord class.- Parameters:
executionMode- the value for theexecutionModerecord componentinterOpThreads- the value for theinterOpThreadsrecord componentintraOpThreads- the value for theintraOpThreadsrecord componentgpuDevice- the value for thegpuDevicerecord 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 theexecutionModerecord component.- Returns:
- the value of the
executionModerecord component
-
interOpThreads
Returns the value of theinterOpThreadsrecord component.- Returns:
- the value of the
interOpThreadsrecord component
-
intraOpThreads
Returns the value of theintraOpThreadsrecord component.- Returns:
- the value of the
intraOpThreadsrecord component
-
gpuDevice
Returns the value of thegpuDevicerecord component.- Returns:
- the value of the
gpuDevicerecord component
-