implements ValidatedAccelerationConfig
Acceleration config and validation result.
Public Method Summary
AccelerationConfig |
accelerationConfig()
Returns the acceleration config that was tested.
|
void |
apply(InterpreterApi.Options options)
Applies the acceleration config to interpreter options.
|
BenchmarkError |
benchmarkError()
Returns more detailed information about benchmark run failure.
|
BenchmarkResult |
benchmarkResult()
Returns more detailed information from mini-benchmark.
|
static ValidatedAccelerationConfigResult |
deserialize(byte[] bytes)
Deserializes from bytes.
|
boolean |
isValid()
Returns whether the model can run successfully with this
accelerationConfig() .
|
byte[] |
serialize()
Serializes config as bytes.
|
Inherited Method Summary
Public Methods
publicAccelerationConfig accelerationConfig()
Returns the acceleration config that was tested.
public voidapply(InterpreterApi.Options options)
Applies the acceleration config to interpreter options.
publicBenchmarkError benchmarkError()
Returns more detailed information about benchmark run failure. This is only
available when
isValid()
isfalse
.
publicBenchmarkResult benchmarkResult()
Returns more detailed information from mini-benchmark. This is only available when
isValid()
istrue
.
Throws
NullPointerException | if benchmarkResult isnull |
---|
public static ValidatedAccelerationConfigResultdeserialize(byte[] bytes)
Deserializes from bytes.
public booleanisValid()
Returns whether the model can run successfully with this
accelerationConfig()
.This is the minimum requirement for the acceleration
to be turned on.
public byte[]serialize()
Serializes config as bytes.