ValidatedAccelerationConfigResult

public class ValidatedAccelerationConfigResult extends Object
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

public AccelerationConfig accelerationConfig ()

Returns the acceleration config that was tested.

public void apply (InterpreterApi.Options options)

Applies the acceleration config to interpreter options.

public BenchmarkError benchmarkError ()

Returns more detailed information about benchmark run failure. This is only available when isValid() is false.

public BenchmarkResult benchmarkResult ()

Returns more detailed information from mini-benchmark. This is only available when isValid() is true.

Throws
NullPointerException if benchmarkResult is null

public static ValidatedAccelerationConfigResult deserialize (byte[] bytes)

Deserializes from bytes.

public boolean isValid ()

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.