From 2be5fa7f48fd550b3787690e88b82428c031985d Mon Sep 17 00:00:00 2001 From: Kenichi Maehashi Date: Tue, 18 Feb 2025 19:17:13 +0900 Subject: [PATCH] Merge pull request #8966 from kmaehashi/increase-memory-allocation Increase host memory in Windows CI, free GPU memory in example code --- .pfnci/config.pbtxt | 16 ++++++++-------- tests/example_tests/example_test.py | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.pfnci/config.pbtxt b/.pfnci/config.pbtxt index 4b893c8b3bb..18884e12787 100644 --- a/.pfnci/config.pbtxt +++ b/.pfnci/config.pbtxt @@ -891,7 +891,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -912,7 +912,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -933,7 +933,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -954,7 +954,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -975,7 +975,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -996,7 +996,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -1017,7 +1017,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" @@ -1038,7 +1038,7 @@ configs { value { requirement { cpu: 8 - memory: 24 + memory: 36 disk: 10 gpu: 2 image: "windows" diff --git a/tests/example_tests/example_test.py b/tests/example_tests/example_test.py index 5c52a62129b..58c658147e6 100644 --- a/tests/example_tests/example_test.py +++ b/tests/example_tests/example_test.py @@ -2,8 +2,16 @@ import subprocess import sys +import cupy + def run_example(path, *args): + # Free memory occupied in the main process before launching an example. + mempool = cupy.get_default_memory_pool() + pinned_mempool = cupy.get_default_pinned_memory_pool() + mempool.free_all_blocks() + pinned_mempool.free_all_blocks() + examples_path = os.path.join( os.path.dirname(__file__), '..', '..', 'examples') fullpath = os.path.join(examples_path, path)