Skip to content

Commit 20ff997

Browse files
committed
Test shared memory cache with reduced size
It looks like the RAPIDS CI/CD is launching the docker container with a reduced shared memory size. This is causing the shared memory cache to be failed with 'RuntimeError: No space left on device'. Signed-off-by: Gigon Bae <[email protected]>
1 parent f5be43c commit 20ff997

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/cucim/tests/unit/clara/test_image_cache.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,24 @@ def test_get_per_process_cache():
6868
def test_get_shared_memory_cache():
6969
from cucim import CuImage
7070

71-
cache = CuImage.cache("shared_memory", memory_capacity=128)
71+
cache = CuImage.cache("shared_memory", memory_capacity=32)
7272
assert int(cache.type) == 2
7373
assert cache.memory_size == 0
7474
# It allocates additional memory
75-
assert cache.memory_capacity > 2**20 * 128
76-
assert cache.free_memory > 2**20 * 128
75+
assert cache.memory_capacity > 2**20 * 32
76+
assert cache.free_memory > 2**20 * 32
7777
assert cache.size == 0
7878
assert cache.capacity > 0
7979
assert cache.hit_count == 0
8080
assert cache.miss_count == 0
8181

8282
config = cache.config
8383
# Check essential properties
84-
# {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 682,
84+
# {'type': 'shared_memory', 'memory_capacity': 32, 'capacity': 170,
8585
# 'mutex_pool_capacity': 100003, 'list_padding': 10000,
8686
# 'extra_shared_memory_size': 100, 'record_stat': False}
8787
assert config["type"] == "shared_memory"
88-
assert config["memory_capacity"] == 128
88+
assert config["memory_capacity"] == 32
8989
assert not config["record_stat"]
9090

9191

0 commit comments

Comments
 (0)