Skip to content

Commit

Permalink
Test shared memory cache with reduced size
Browse files Browse the repository at this point in the history
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 <gbae@nvidia.com>
  • Loading branch information
gigony committed Oct 1, 2024
1 parent f5be43c commit 20ff997
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/cucim/tests/unit/clara/test_image_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,24 @@ def test_get_per_process_cache():
def test_get_shared_memory_cache():
from cucim import CuImage

cache = CuImage.cache("shared_memory", memory_capacity=128)
cache = CuImage.cache("shared_memory", memory_capacity=32)
assert int(cache.type) == 2
assert cache.memory_size == 0
# It allocates additional memory
assert cache.memory_capacity > 2**20 * 128
assert cache.free_memory > 2**20 * 128
assert cache.memory_capacity > 2**20 * 32
assert cache.free_memory > 2**20 * 32
assert cache.size == 0
assert cache.capacity > 0
assert cache.hit_count == 0
assert cache.miss_count == 0

config = cache.config
# Check essential properties
# {'type': 'shared_memory', 'memory_capacity': 2048, 'capacity': 682,
# {'type': 'shared_memory', 'memory_capacity': 32, 'capacity': 170,
# 'mutex_pool_capacity': 100003, 'list_padding': 10000,
# 'extra_shared_memory_size': 100, 'record_stat': False}
assert config["type"] == "shared_memory"
assert config["memory_capacity"] == 128
assert config["memory_capacity"] == 32
assert not config["record_stat"]


Expand Down

0 comments on commit 20ff997

Please sign in to comment.