We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a098b9 commit 4092066Copy full SHA for 4092066
2 files changed
onnx_diagnostic/torch_export_patches/onnx_export_serialization.py
@@ -231,7 +231,7 @@ def serialization_functions(
231
)
232
233
SlidingWindowCache = get_sliding_window_cache_cls()
234
- if SlidingWindowCache:
+ if SlidingWindowCache and SlidingWindowCache.__name__ == "SlidingWindowCache":
235
from .serialization.transformers_impl import (
236
flatten_sliding_window_cache,
237
unflatten_sliding_window_cache,
onnx_diagnostic/torch_export_patches/serialization/transformers_impl.py
@@ -220,7 +220,7 @@ def unflatten_static_cache(
220
####################
221
222
223
-if SlidingWindowCache:
+if SlidingWindowCache and SlidingWindowCache.__name__ == "SlidingWindowCache":
224
225
def flatten_sliding_window_cache(
226
cache: SlidingWindowCache,
0 commit comments