Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward-merge branch-23.08 to branch-23.10 #602

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_read_region_cuda_memleak(testimg_tiff_stripe_4096x4096_256_jpeg):
gpu = gpus[0]
mem_usage_history = [gpu.memoryUsed]

for i in range(5):
for i in range(10):
_ = img.read_region(device='cuda')
gpus = GPUtil.getGPUs()
gpu = gpus[0]
Expand All @@ -40,8 +40,10 @@ def test_read_region_cuda_memleak(testimg_tiff_stripe_4096x4096_256_jpeg):

# The difference in memory usage should be less than 180MB.
# Note: Since we cannot measure GPU memory usage for a process,
# we use a rough number (experimentally measured).
assert mem_usage_history[4] - mem_usage_history[1] < 180.0
# we use a rough number.
# (experimentally measured, assuming that each image load
# consumes around 50MB of GPU memory).
assert mem_usage_history[5] - mem_usage_history[9] < 180.0


def test_read_region_cpu_memleak(testimg_tiff_stripe_4096x4096_256):
Expand Down