Make cache writes optional in InferenceCalculatorAdvancedGL
Previously, caches were always written, and an error would cause the graph to close abruptly. This prevented services with read-only access to the cache from using the calculator. The new behavior allows services to choose whether or not to write caches. PiperOrigin-RevId: 561866791
This commit is contained in:
committed by
Copybara-Service
parent
dea6ccba25
commit
de0c7f2a30
@@ -122,6 +122,8 @@ describe('TaskRunner', () => {
|
||||
allowPrecisionLoss: true,
|
||||
cachedKernelPath: undefined,
|
||||
serializedModelDir: undefined,
|
||||
cacheWritingBehavior: InferenceCalculatorOptions.Delegate.Gpu
|
||||
.CacheWritingBehavior.WRITE_OR_ERROR,
|
||||
modelToken: undefined,
|
||||
usage: InferenceCalculatorOptions.Delegate.Gpu.InferenceUsage
|
||||
.SUSTAINED_SPEED,
|
||||
|
||||
Reference in New Issue
Block a user