Skip to content

Commit db2122b

Browse files
authored
optimized QKV bridge a bit (#1046)
* optimized bridge a bit * optimized another test * optimized a bit more * optimized a bit more * made further optimizations * added qkv as submodules * reverted component * removed thread restriction * removed extra collections
1 parent e8fda51 commit db2122b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/conftest.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ def cleanup_memory():
1313
# Clear torch cache
1414
if torch.cuda.is_available():
1515
torch.cuda.empty_cache()
16-
# Force garbage collection multiple times for better cleanup
17-
for _ in range(3):
18-
gc.collect()
16+
# Force garbage collection for cleanup
17+
gc.collect()
1918

2019

2120
@pytest.fixture(autouse=True, scope="class")
@@ -31,9 +30,6 @@ def cleanup_class_memory():
3130
# Configure pytest to be more memory-efficient
3231
def pytest_configure(config):
3332
"""Configure pytest for better memory usage."""
34-
# Set torch to use less memory
35-
torch.set_num_threads(1) # Reduce threading overhead
36-
3733
# Configure garbage collection to be more aggressive
3834
gc.set_threshold(700, 10, 10)
3935

0 commit comments

Comments
 (0)