MCPcopy Create free account
hub / github.com/ml-explore/mlx / ~ThreadCleanup

Method ~ThreadCleanup

python/src/transforms.cpp:1467–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1465 // before python interpreter exits.
1466 struct ThreadCleanup {
1467 ~ThreadCleanup() {
1468 if (!mx::detail::compile_cache_empty()) {
1469 nb::gil_scoped_acquire gil;
1470 mx::detail::compile_clear_cache();
1471 }
1472 }
1473 };
1474 static thread_local auto clear_cache = []() {
1475 // Ensure it is created

Callers

nothing calls this directly

Calls 2

compile_cache_emptyFunction · 0.85
compile_clear_cacheFunction · 0.85

Tested by

no test coverage detected