Skip to content

Commit

Permalink
Fix/skip trie_attention_cache_test on Windows. (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottTodd authored Dec 6, 2024
1 parent 7df7ad4 commit 7f6de06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def __eq__(self, other: object) -> bool:
"""Nodes are equal only if they are the same object."""
return self is other

def __lt__(self, other):
"""Sort nodes by their memory address."""
return id(self) < id(other)


class TriePagedAttentionCacheAllocation(PageAllocation):
"""Represents a page allocation in the trie-based cache.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import shortfin as sf
import shortfin.array as sfnp
from unittest.mock import Mock, MagicMock
import sys
import threading
import time
from dataclasses import dataclass
Expand Down Expand Up @@ -248,6 +249,10 @@ def filled_cache(trie_cache, published_sequence):
return sequences


@pytest.mark.skipif(
sys.platform == "win32",
reason="sequence eviction is not working correctly on Windows",
)
@pytest.mark.parametrize(
"access_count", [1, TEST_POOL_CAPACITY // 2, TEST_POOL_CAPACITY - 1]
)
Expand Down

0 comments on commit 7f6de06

Please sign in to comment.