Skip to content

Commit b6ebea4

Browse files
authored
resize_test_allocate_size (PaddlePaddle#76743)
1 parent b425874 commit b6ebea4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/legacy_test/test_allocator_visitor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def setUp(self):
3636
]
3737
self.cmds2 = [
3838
["Alloc", 1 * self.MB, "0x100000010"],
39-
["Alloc", 2 * self.GB, "0x100000011"],
39+
["Alloc", 2 * self.MB, "0x100000011"],
4040
["Alloc", 1 * self.MB, "0x100000012"],
41-
["Alloc", 2 * self.GB, "0x100000013"],
42-
["Free", 1 * self.GB, "0x100000010"],
43-
["Free", 2 * self.GB, "0x100000013"],
41+
["Alloc", 2 * self.MB, "0x100000013"],
42+
["Free", 1 * self.MB, "0x100000010"],
43+
["Free", 2 * self.MB, "0x100000013"],
4444
]
4545
paddle.set_flags({'FLAGS_use_virtual_memory_auto_growth': True})
4646

@@ -106,7 +106,7 @@ def test_memory_record_with_guard(self):
106106
paddle.set_flags({'FLAGS_use_virtual_memory_auto_growth': True})
107107
for _ in range(2):
108108
with paddle.device.cuda.allocate_record_guard(True):
109-
params = self.allocate_cmds(self.cmds)
109+
params = self.allocate_cmds(self.cmds2)
110110
paddle.set_flags({'FLAGS_record_alloc_event': True})
111111
with paddle.device.cuda.allocate_record_guard(False):
112112
params2 = self.allocate_cmds(self.cmds2)

0 commit comments

Comments
 (0)