Skip to content

[Feature Request] Universal cache invalidation #27487

@henryruhs

Description

@henryruhs

Describe the feature request

From my research only TensorRT has proper cache invalidation, once onnxruntime has been updated the outdated caches are causing onnxruntime to crash.

EP Auto-invalidation Version Detection
TensorRT (ORT 1.20+) Yes Runtime
MIGraphX Partial Compile-time
CoreML No None

For now I use this workaround.

import os
import onnxruntime

cache_path = os.path.join('.caches', onnxruntime.get_version_string())

session = onnxruntime.InferenceSession('model.onnx', providers = [('CoreMLExecutionProvider',
{
	'ModelCacheDirectory': cache_path
})])

Describe scenario use case

I recommend a universal solution to handle caches, it should not be EP specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:CoreMLissues related to CoreML execution providerep:MIGraphXissues related to AMD MI GraphX execution providerfeature requestrequest for unsupported feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions